/\ == \ /\ \ _ \ \ /\ \ / / /\ \ /\ "-./ \
\ \ _-/ \ \ \/ ".\ \ \ \ \'/ \ \ \ \ \ \-./\ \
\ \_\ \ \__/".~\_\ \ \__| \ \_\ \ \_\ \ \_\
\/_/ \/_/ \/_/ \/_/ \/_/ \/_/ \/_/
pw-vim is a distribution of vim plugins and resources for Vim, Gvim and MacVim, an forked repository from spf13-vim.
To make all the plugins work, specifically neocomplete, you need vim with lua.
The easiest way to install pw-vim is to use our automatic installer by simply copying and pasting the following line into a terminal. This will install pw-vim and backup your existing vim configuration. If you are upgrading from a prior version (before 3.0) this is also the recommended installation.
curl https://raw.githubusercontent.com/e7h4n/pw-vim/master/bootstrap.sh -L -o - | sh
The simpliest (and safest) way to update is to simply rerun the installer. It will completely and non destructively upgrade to the latest version.
curl https://raw.githubusercontent.com/e7h4n/pw-vim/master/bootstrap.sh -L -o - | sh
Alternatively you can manually perform the following steps. If anything has changed with the structure of the configuration you will need to create the appropriate symlinks.
cd $HOME/to/pw-vim/
git pull
vim +NeoBundleInstall! +NeoBundleClean +q
Create ~/.vimrc.local
and ~/.gvimrc.local
for any local
customizations.
For example, to override the default color schemes:
echo colorscheme ir_black >> ~/.vimrc.local
Create a ~/.vimrc.before.local
file to define any customizations
that get loaded before the spf13-vim .vimrc
.
For example, to prevent autocd into a file directory:
echo let g:spf13_no_autochdir = 1 >> ~/.vimrc.before.local
For a list of available spf13-vim specific customization options, look at the ~/.vimrc.before
file.
There is an additional tier of customization available to those who want to maintain a
fork of pw-vim specialized for a particular group. These users can create .vimrc.fork
and .vimrc.bundles.fork
files in the root of their fork. The load order for the configuration is:
.vimrc.before
- spf13-vim before configuration.vimrc.before.fork
- fork before configuration.vimrc.before.local
- before user configuration.vimrc.bundles
- spf13-vim bundle configuration.vimrc.bundles.fork
- fork bundle configuration.vimrc.bundles.local
- local user bundle configuration.vimrc
- spf13-vim vim configuration.vimrc.fork
- fork vim configuration.vimrc.local
- local user configuration
See .vimrc.bundles
for specifics on what options can be set to override bundle configuration. See .vimrc.before
for specifics
on what options can be overridden. Most vim configuration options should be set in your .vimrc.fork
file, bundle configuration
needs to be set in your .vimrc.bundles.fork
file.
You can specify the default bundles for your fork using .vimrc.before.fork
file. Here is how to create an example .vimrc.before.fork
file
in a fork repo for the default bundles.
echo let g:spf13_bundle_groups=[\'general\', \'programming\', \'misc\', \'youcompleteme\'] >> .vimrc.before.fork
Once you have this file in your repo, only the bundles you specified will be installed during the first installation of your fork.
You may also want to update your README.markdown
file so that the bootstrap.sh
link points to your repository and your bootstrap.sh
file to pull down your fork.
For an example of a fork of spf13-vim that provides customization in this manner see taxilian's fork.
<Leader>ev
opens a new tab containing the .vimrc configuration files listed above. This makes it easier to get an overview of your
configuration and make customizations.
<Leader>sv
sources the .vimrc file, instantly applying your customizations to the currently running vim instance.
These two mappings can themselves be customized by setting the following in .vimrc.before.local:
let g:spf13_edit_config_mapping='<Leader>ev'
let g:spf13_apply_config_mapping='<Leader>sv'
pw-vim contains a curated set of popular vim plugins, colors, snippets and syntaxes. Great care has been made to ensure that these plugins play well together and have optimal configuration.
Create ~/.vimrc.bundles.local
for any additional bundles.
To add a new bundle, just add one line for each bundle you want to install. The line should start with the word "Bundle" followed by a string of either the vim.org project name or the githubusername/githubprojectname. For example, the github project spf13/vim-colors can be added with the following command
echo NeoBundle \'spf13/vim-colors\' >> ~/.vimrc.bundles.local
Once new plugins are added, they have to be installed.
vim +BundleInstall! +BundleClean +q
Create ~/.vimrc.local
if it doesn't already exist.
Add the NeoBundleDisable command to this line. It takes the same input as the Bundle line, so simply copy the line you want to disable and add 'Un' to the beginning.
For example, disabling the 'AutoClose' and 'scrooloose/syntastic' plugins
echo NeoBundleDisable \'AutoClose\' >> ~/.vimrc.local
echo NeoBundleDisable \'scrooloose/syntastic\' >> ~/.vimrc.local
Remember to run ':NeoBundleClean!' after this to remove the existing directories
Difference betweet pw-vim and spf13-vim
Main changes:
- Use [Unite] instead ctrlp.
- Use snipmate instead neocomplete.
- Map
jj
to<ESC>
. - Swap
0
and^
,0
is more convenience. - Use my favorite color theme [molokai] instead solarized.
- Reset some Vim settings to default:
- Unbind vim register and system clipboard.
- Remove
options
fromviewoptions
. nospell
.wrap
.scrolljump
to 0.scrolloff
to 0.
- Reset some map to default setting
- Unmap
<C-J>
,<C-K>
,<C-L>
,<C-H>
. - Unmap
<
and>
. - Unmap
j
/k
.
- Unmap
The reason is very simple: I don't need them.
I'm always happy to take pull requests from others. Go ahead and fork me.