Simply my own config for the great editor VIm
This VIm configuration use Vundle: A plugin manager with GIT support. I've put my own plugins in several Github repositories to take advantage of it. The main, VIm-tweaks, contains my configuration options and provides a few custom features / keyboard shortcuts to speed up development, especialy for PHP projects.
- VIm, from Linux packages, Mac pre-installed version,
brew
orport
, ... - Git used by Vundle to install / update plugins
Before to install, backup your VIm configuration if any (in your home folder: .vimrc
file and .vim
folder).
- Clone recursively this repository (recurse if to automaticaly get Vundle repository cloned too)
- Copy both
.vimrc
file and.vim
folder to your home directory - (optional) Edit
.vimrc
to feet your needs - Launch VIm as usual (errors could be displayed, ignore them for now: Plugins are not yet installed)
- Execute
:PluginInstall
(cf Vundle's plugin doc) - Restart VIm and enjoy
Replace the first two steps with:
- Download this repository from Github
- Download Vundle repository from Github
- Extract them somewhere (
download
folder for example) - Copy
download
/webastien-vim/.vimrc in your home (/home/your-name/.vimrc
) - Copy
download
/webastien-vim/.vim in your home (/home/your-name/.vim
) - Copy
download
/Vundle.vim into your vim configuration (/home/your-name/.vim/bundle/Vundle.vim
)
# Clone the repository (into "/tmp/webastien-vim" directory)
git clone --recursive https://github.com/webastien/vim.git /tmp/webastien-vim
# Copy .vimrc file and .vim folder in your home folder
cp /tmp/webastien-vim/.vimrc ~/.vimrc && rm -fr ~/.vim && cp -r /tmp/webastien-vim/.vim ~/.vim
# Install plugins using Vundle
vim -E -s -c "source ~/.vimrc" -c "PluginInstall" -c "qa!"
The plugin install step will fail and VIm will certainly gives you errors on startup... Install manualy Vundle to fix it:
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
Then, re-execute the plugin install.
Follow the Vundle methods: Use :PluginInstall
/:PluginUpdate
and/or :PluginClean
commands. Keep in mind the .vimrc
file is not automaticaly updated, but this is expected because it contains YOUR settings, plugins list, etc. If you want to stricly use mine, you have to manually update it when I publish a modified version.
Note: vim-tweaks plugin provides the command :UpdateVimrc
to update the .vimrc
file, based on a configurable URL, by default, mine.
The following command will read your .vimrc
, remove all un-necessary plugins, install the new ones and finaly update all plugins:
vim -E -s -c "source ~/.vimrc" -c "PluginClean" -c "PluginInstall" -c "PluginUpdate" -c "qa!"
- Remove both
.vimrc
file and.vim
folder from your home directory - (optional) Restore your
.vimrc
file and.vim
folder to your home directory
rm ~/.vimrc && rm -fr ~/.vim
- Vundle to manage plugins (one plugin to rule them all)
- Syntastic to check syntax errors
- NERD commenter to easily toggle comments
- PHP Complete for a better PHP support
- Tagbar to have an outline
- Autopreview to quickly see functions' signature
- Vim Omni Completion VimL files omnicompletion support
- vim-less to have LESS files highlighting
- vim-twig to have Twig files highlighting
- vim-yaml for a better syntax highlighting of YAML files
- Tabular for easy alignments (on '=' for example)
- vim-autoclose to automaticaly close brackets, ...
- Emmet-vim Emmet style HTML abbreviations
- PaperColor theme a nice colorscheme which is (a bit) configurable and supposed to become more
- vim-tabs to simplify tab names
- vim-ctags to manage tags index and navigate into code
- vim-folding a light folding plugin
- vim-tweaks which contains my keyboard mappings and a few custom features
My custom keyboard mappings are described on the vim-tweaks README.md file.