This Vim configurations base form kaochenlong/eddie-vim
My personal Vim configurations and some plugins which I used in my daily job.
I put Vim related settings in plugin/settings/Settings.vim
, and isolate other plugins' settings in plugin/settings
directory.
you can link your ~/.vimrc
to any one of them as you wish :)
( Windows users see Vundle for Windows PLZ)
-
BACKUP your
.vim
directory and.vimrc
first.(IMPORTANT!) -
cd ~
to change directory to your home directory if your like. -
copy files to your home directory:
git clone git://github.com/ywjno/vundle-vimfiles.git
-
make a symbolic link
.vim
tovundle-vimfiles
that you just cloned, or just rename it to.vim
also be fine:ln -s vundle-vimfiles ~/.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
-
Setup Vundle
git clone git://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
-
if you use Powerline under Ubuntu or something which can not show the correct icons/fonts on the bottom, you can check this link, it looks pretty nice.
-
you may need to install
ack
orsilver searcher
first if you useack.vim
.
Launch vim
, run :BundleInstall
(or vim +BundleInstall +qall
for CLI lovers)
Launch vim
, run :BundleInstall!
-
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
<leader>z
, but only work in GUI version Vim. You can check here to see how it looks like. (stole from Mike Skalnik) -
some usually used key mappings in normal mode:
a.
<F1>
to toggle a Calendar window on and off.b.
<F2>
to toggle NERDTree on and off.c.
<F4>
to toggle Tagbar window.d.
<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.e.
<F7>
to switch to previous tab, and<F8>
to the next tab.f. 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.g. hit
<leader>
twice to toggle comment on and off.h.
<tab>
and<shift><tab>
to increase and decrease the syntax identation. -
Remove tailing whitespace automatically while saving.
if you can not found ctags
command, just find your ctags path and replace my settings in plugin/settings/Ctags.vim
file:
let g:tagbar_ctags_bin = '/your/path/to/ctags'
and Exuberant Ctags is recommended.