Recently I forked a project on Github.com, and renamed it to vim4Lin which is a vim configuration. The project can be used to help to synchronize the configuration files of vim on multiple machines. However, I intentionally want to focus its experiences on Linux, such as Ubuntu. The project you can find in this following url: https://github.com/bfeng/vim4Lin
Overview
This is another vim configuration, which I normally use under terminal. So default theme is changed to molokai
, which is optimized for C under terminals.
Vim related settings are in plugin/settings/Settings.vim
, and other plugins’ settings are in plugin/settings
corresponding directories.
Two vimrc files:
vimrc
, standard version vimrc.gvimrc
, same as vimrc, but added some features only available in GUI mode.
you can link your ~/.vimrc
to any one of them as you wish :)
It’s a screenshot of the up-to-date configuration:
The content above is from http://flask.pocoo.org/snippets/5/
Installation and Update
BACKUP your
.vim
directory and.vimrc
first.(IMPORTANT!)cd ~
to change directory to your home directory.Clone files to your home directory:
git clone https://github.com/bfeng/vim4Lin.git
cd to
vim4Lin
directory and execute theupdate.sh
to get latest version modules:cd vim4Lin ./update.sh
make a symbolic link
.vim
tovim4Lin
that you just cloned, or just rename it to.vim
also be fine:ln -s vim4Lin .vim
link the vimrc to
ln -s .vim/vimrc .vimrc
if you use GUI version VIM, such as MacVim or GVim, you can also link to
.gvimrc
:ln -s .vim/gvimrc .gvimrc
change directory to
~/.vim
and execute./update.sh
script, it should do all the updates automatically.
Features and Key Mappings
Resize splited windows automatically, so that you get a bigger editing room if you’re working with a smaller screen. (stole from Gary Bernhardt)
Toggle between working mode and presentation mode by
\``z
, but only work in GUI version Vim. You can check here to see how it looks like. (stolen from Mike Skalnik)some usually used key mappings in normal mode:
<F1>
to toggle a Calendar window on and off.<F2>
to toggle NERDTree on and off.<F4>
to toggle Taglist window.<F5>
is the script runner, according to it’s filetype, it will run Ruby(.rb) ,Python(.py) or Javascript(.js) file(SpiderMonkey is needed), even CoffeeScript(.coffee, but you may have to install CoffeeScript first). If the filetype is VimScript,<F5>
will run:source %
for you.<F7>
to switch to previous tab, and<F8>
to the next tab.hit
<ctrl>p
will launch a quick window to match keywords from your current working directory, not only file name, but also path name. And<ctrl>w u
will match from your MRU(Mostly Recent Used) files, which is also frequently used.hit
\
twice to toggle comment on and off.<tab>
and<shift><tab>
to increase and decrease the syntax indentation. By default,<tab>
will invoke the code-completion prompt. If you need to input a real<tab>
into text, hit<ctrl>v
and<tab>
.\``v
to open.vimrc
in a new tab.\``0
to edit or createREADME.md
in current working directory.
Remove tailing whitespace automatically while saving.
- Exuberant Ctags is recommended for the executable of ctags.
Reference
This work was forked from Eddie Kao’s eddie-vim. Thanks!
Some modules, such as which support flex
and css colors, are moved out, and add some modules which support latex
are added in.
The molokai
theme is now supported as the main coding theme and vim-airline
replaces the obsolte vim-powerline
. Much work were done to focus on the compatibility between the GUI mode and the console mode.