原來的repo放在 spf13-vim-leoatchina,由於原來一時腦抽,把中文字體放進去後致使體積較大,影響速度,因此重開一個repo並把windows下的工具分開,以增長clone速度。javascript
如今的配置是在 leoatchina-vim,把原來的windows下面的工具扔到另外一個repo下以減小體積php
這裏是我本人的vim配置,從spf13-vim:steve francia's vim distribution fork而來。做爲幾年前的做品,原配置已經不大適合這個vim8/neovim當道的時代。所以在近兩年的使用時間裏, 我不斷調整,從其餘人的配置中吸收經驗,對參數進行微調,以適應在不一樣的系統環境條件下達到較好的使用體驗。html
長期以來,這個repo的README一直處於遠遠落後於配置改變的進度,細碎調整特別是快捷鍵的改動,實在是提不勁來進行說明。不過近日來隨着最後幾個補全插件的加入和配置調整,這個配置文件已經比較完整,所以能夠好好坐下來,對使用方法和注意點做一介紹。(其實,在這寫這個文檔的時候還在不停地改快捷鍵)java
主要特色:python
~/.vimrc.local
裏半定製化這裏我把README裏的前面部分貼出來,後面的各個插件的介紹,和快捷鍵,請去原repo查看。更建議你打開裏面的各個文件查看,學習。linux
Git 1.7
and Vim7.0
with any of +job
,+python
,+python3
,+lua
is at least required, Vim8
or neovim
and Git 2.0+
is prefered for advanced fearuturesgit
And I wish you have a basic understanding for vim, know how to read the config files to find what I not mention here.github
git clone https://github.com/leoatchina/leoatchina-vim.git cd leoatchina-vim ./install.sh
git clone https://github.com/leoatchina/tools-leoatchina-vim.git cd leoatchina-vim click setup.cmd with administrator rights open vim, do :PlugInstall
./install.sh ,chosse y|Y, the scipt will do git pull and do reinstall plugins
cd leoatchina-vi#m git pull open vim, do :PlugReinstall
cd leoatchina-vim ./updata.sh
ORvim
~/.vimrc.update
ORwindows
open vim; do :PlugNew
open vim; do :PlugNew
cd leoatchina-vim ./uninstall.sh
click delete.cmd with administrator rights
After the installation, a .vimrc
symbol link in the ~
folder (for neovim, to its config file ~/.config/nvim/init.vim
in Linux ) which links to the .vimrc
file in the leoatchina-vim
folder.
The .vimrc
or init.vim
sources ~/.vimrc.plug
for plugins definition, and ~/.vimrc.plug
sources ~/.vimrc.local
when the file exists, the local
file contains an import variable called g:plug_groups
for the supporting features for vim, and you do :PlugClean
, :PlugInstall
, the plugsin will change. The default contents of .vimrc.local
is
let g:plug_groups=['smartcomplete', 'php', 'javascript', 'html', 'snippet']
And you can also create ~/.gvimrc.local
for gvim
, ~/.nvimrc.local
for nvim
to intall diffent plugins for gvim and nvim. If these two local file not exist, .vimrc.local
works.
The typical variables that could be add to g:plug_groups
are pymode
,go
,airline
, youcompleteme
, etc.
Here is a trick that I set diffent PLUG_PATH
for vim/gvim/neovim
, ~/.vim/plug
for vim
, ~/.gvim/plug
for gvim
, ~/.nvim/plug
for neovim
.
.vimrc.clean
it is an bash file which is set to delete ~/.vimswap
& ~/.vimviews
folders. Also be linked as ~/.vimrc.clean
vim-plug
instead of vundle
, more quick and more smartfork
,before
files , which are redundent for most users>
,<
<Leader>
to <Space>
, so the biggest key on keyboard is more usefull<LocalLeader>
to \
<Leader>.
for number + 1, <Leader>,
for number -1<Leader><cr>
: source ~/.vimrc
. It is for config develop & debug myself<LocalLeader><LocalLeader
for bracket jumpc-a
to the head of a line, c-e
to end in normal/visual/inesert mode, compatible with linuxc-f
, c-b
, c-k
, c-l
, g
work like Leader
key in normal modec-f
to right c-b
to left in insert modec-x
instead of 'c-e' for fullscreen jump, pairs with c-y
c-p
invoke browser tools fzf
or LeaderF
or denite
or Ctrlp
gc
for gcommit, +
for :Git
~
instead of Q
, and Q
for quit current buffer at once.
for exit visual mode!
for :!
F1
: tab helpF2
: toggle search results highlightF3
: show register stringsF4
: toggle quickrun windowsF5
: run script (with plugin vim-quickrun)F11
: full screen toggle, but sometimes not workF12
: paste toggletab/buffer control
copy & paste
Some other shortcuts