updated README and the setup script

This commit is contained in:
2020-03-01 14:29:04 +01:00
parent b2981723be
commit c52b5cf302
3 changed files with 28 additions and 17 deletions

View File

@@ -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.

View File

@@ -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."