diff --git a/README.md b/README.md index 81ab984..ccfdf2d 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,28 @@ # My settings for VIM -## Usage +## Contents -If you find yourself wanting to use these settings, `git clone` this -repository, and copy or link the following directories: +* `colors/`: A light and a dark colorscheme. +* `plugin/settings.vim`: Main configuration file with settings usable on + all of my computers. +* `.vimrc_template`: A template used to populate the `~/.vimrc`, that contains + settings that are individual for each computer. +* `plugin/statusline.vim`: Configuration of the statusline. +* `plugin/comment.vim`: A dumb implementation for filetype-based + commenting/uncommenting. +* `plugin/pudb.vim`: **NEW**. Set breakpoints for PuDB from Vim. +* `setup.sh`: Copies `.vimrc_template` as `~/.vimrc` (asks first), installs + plugin manager [Vundle](https://github.com/VundleVim/Vundle.vim) (asks too), + and creates the following symlinks (without asking, but not overwriting + if the targets exist): ``` colors -> ~/.vim/colors ftplugin -> ~/.vim/ftplugin plugin -> ~/.vim/plugin ``` - -In `plugin/settings.vim` are settings that you can use on every workstation. -You can put into `~/.vimrc` settings that are local to the machine (such as -plugins, settings for plugins, font settings, etc.). Some reasonable default -local settings can be found in `.vimrc_template`. - -If you are on UNIX and haven't configured VIM yet, you could just -run `setup.sh`, which will create links from the repository to the `~/.vim` -folder and install plugin manager Vundle. Because of links, you shouldn't move -or remove the directory in which you cloned this repo. The benefit is that you -can get updates to the settings with just `git pull`. +The `plugin/{comment,pudb,statusline}.vim` and also the colorschemes are +probably independent of the rest of the code and can be used just by copying +them to `~/.vim/{plugin,colors}` (or copying their code to `~/.vimrc`?). The +`plugin/settings.vim` is rather opinionated and isn't really intended to be +used as an independent plugin. diff --git a/plugin/statusline.vim b/plugin/statusline.vim index 8fe7d6f..7df2bc0 100644 --- a/plugin/statusline.vim +++ b/plugin/statusline.vim @@ -53,7 +53,7 @@ set statusline+=\ @%-2c "at column set statusline+=\ hi def link StatusLineNormal StatusLine -hi def link StatusLineInsert StatusLineNC +hi def link StatusLineInsert StatusLineNC augroup statushl autocmd! diff --git a/setup.sh b/setup.sh index 12da422..8a9a6eb 100755 --- a/setup.sh +++ b/setup.sh @@ -37,10 +37,16 @@ WARNING: if you do, the existing ~/.screenrc will be deleted! && echo "~/.vim/ftplugin already exists, deal with it manually" \ || ln -vs "$repo/ftplugin" "$HOME/.vim/ftplugin" -[ -d "$HOME/.vim/bundle" ] \ +read -p " +Would you like to install plugin manager Vundle? +[y/n]: " responce + +[[ "$responce" = "y" ]] \ + && { [ -d "$HOME/.vim/bundle" ] \ && echo "You seem to already have some plugin manager installed" \ || { mkdir -v "$HOME/.vim/bundle"; \ git clone -v https://github.com/VundleVim/Vundle.vim.git \ - "$HOME/.vim/bundle/Vundle.vim"; } + "$HOME/.vim/bundle/Vundle.vim"; } } \ + || echo 'Not installing Vundle' echo "Setup finished."