摘要:不過(guò)近日來(lái)隨著最后幾個(gè)補(bǔ)全插件的加入和配置調(diào)整,這個(gè)配置文件已經(jīng)比較完整,因此可以好好坐下來(lái),對(duì)使用方法和注意點(diǎn)作一介紹。更建議你打開(kāi)里面的各個(gè)文件查看,學(xué)習(xí)。
中文介紹
原來(lái)的repo放在 spf13-vim-leoatchina,因?yàn)樵瓉?lái)一時(shí)腦抽,把中文字體放進(jìn)去后導(dǎo)致體積較大,影響速度,所以重開(kāi)一個(gè)repo并把windows下的工具分開(kāi),以增加clone速度。
現(xiàn)在的配置是在 leoatchina-vim,把原來(lái)的windows下面的工具扔到另一個(gè)repo下以減少體積
這里是我本人的vim配置,從spf13-vim:steve francia"s vim distribution fork而來(lái)。作為幾年前的作品,原配置已經(jīng)不大適合這個(gè)vim8/neovim當(dāng)?shù)赖臅r(shí)代。因此在近兩年的使用時(shí)間里, 我不斷調(diào)整,從其他人的配置中吸取經(jīng)驗(yàn),對(duì)參數(shù)進(jìn)行微調(diào),以適應(yīng)在不同的系統(tǒng)環(huán)境條件下達(dá)到較好的使用體驗(yàn)。
長(zhǎng)期以來(lái),這個(gè)repo的README一直處于遠(yuǎn)遠(yuǎn)落后于配置改變的進(jìn)度,細(xì)碎調(diào)整特別是快捷鍵的改動(dòng),實(shí)在是提不勁來(lái)進(jìn)行說(shuō)明。不過(guò)近日來(lái)隨著最后幾個(gè)補(bǔ)全插件的加入和配置調(diào)整,這個(gè)配置文件已經(jīng)比較完整,因此可以好好坐下來(lái),對(duì)使用方法和注意點(diǎn)作一介紹。(其實(shí),在這寫(xiě)這個(gè)文檔的時(shí)候還在不停地改快捷鍵)
主要特點(diǎn):
根據(jù)系統(tǒng)情況,自動(dòng)選擇安裝用的插件,并可在~/.vimrc.local里半定制化
漂亮,選擇了兼容256色終端的多個(gè)主題
功能豐富:自動(dòng)補(bǔ)全、語(yǔ)法高亮、語(yǔ)法檢查、運(yùn)行、格式化都有相應(yīng)插件
這里我把README里的前面部分貼出來(lái),后面的各個(gè)插件的介紹,和快捷鍵,請(qǐng)去原repo查看。更建議你打開(kāi)里面的各個(gè)文件查看,學(xué)習(xí)。
RequirementsGit 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 fearutures
And I wish you have a basic understanding for vim, know how to read the config files to find what I not mention here.
Install Linux, *nix, Mac OSXgit clone https://github.com/leoatchina/leoatchina-vim.git cd leoatchina-vim ./install.shwindows
git clone https://github.com/leoatchina/tools-leoatchina-vim.git cd leoatchina-vim click setup.cmd with administrator rights open vim, do :PlugInstallUpdate Linux, *nix, Mac OSX
./install.sh ,chosse y|Y, the scipt will do git pull and do reinstall pluginswindows
cd leoatchina-vi#m git pull open vim, do :PlugReinstallUpgrade plugins Linux, *nix, Mac OSX
cd leoatchina-vim ./updata.sh
OR
~/.vimrc.update
OR
open vim; do :PlugNewwindows
open vim; do :PlugNewDelete Linux, *nix, Mac OSX
cd leoatchina-vim ./uninstall.shWindows
click delete.cmd with administrator rightsHow it works
After the installation, a .vimrcsymbol 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
Main changes from spf13use vim-plug instead of vundle, more quick and more smart
totally simplify, delete fork,before files , which are redundent for most users
delete lots of variables for feature settings
just have mentioned before, the link is from the cloned folder
not support XP
Some featuresno backup file
no backup
no sound
no scroll bars
no menu, no tools when gui-running
line number
highlight search results
smart indent
In Visual, keep selection after indention change with >,<
Main shortcuts
c-a to the head of a line, c-e to end in normal/visual/inesert mode, compatible with linux
c-f, c-b, c-k, c-l, g work like Leader key in normal mode
c-f to right c-b to left in insert mode
c-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 help
F2: toggle search results highlight
F3: show register strings
F4: toggle quickrun windows
F5: run script (with plugin vim-quickrun)
F11: full screen toggle, but sometimes not work
F12: paste toggle
tab/buffer control
set tabpagemax=10
cmap Tabe tabe
nnoremap
nnoremap
nnoremap
nnoremap
nnoremap
nnoremap
nnoremap
nnoremap
nnoremap
nnoremap
nnoremap
nnoremap
nnoremap
nnoremap
nnoremap
copy & paste
vnoremap
nnoremap
nnoremap
nnoremap
vnoremap
nnoremap Y y$
vnoremap Y *y$
nnoremap
nnoremap
vnoremap
vnoremap
Some other shortcuts
nmap
nnoremap
nnoremap
nmap
nmap
nmap
nmap
nmap
nmap
nmap
nmap
nmap
nmap
nmap
nmap
vnoremap < vnoremap > >gv nnoremap < << nnoremap > >>
文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請(qǐng)注明本文地址:http://systransis.cn/yun/25016.html
摘要:效果最開(kāi)始的想法是最簡(jiǎn)配置實(shí)現(xiàn)最高效的使用。幾個(gè)有用的配置顯示空格和。打開(kāi)時(shí),用的語(yǔ)法進(jìn)行高亮顯示。使用后,不顯示工作目錄問(wèn)題。 效果 showImg(https://segmentfault.com/img/bVkBdC); showImg(https://segmentfault.com/img/bVkBdx); showImg(https://segmentfault.co...
摘要:我們都知道和都是文本編輯器中的上古神器,你也許用,配合完成過(guò)大型或者的開(kāi)發(fā),你也許配合過(guò)其他插件,完成過(guò),代碼的開(kāi)發(fā),但是很少有人試過(guò)的開(kāi)發(fā)吧,畢竟的框架包含了很多東西,以及天生很長(zhǎng)的名字,讓我們沒(méi)辦法把此神器用起來(lái),今天我就來(lái)給大家講下 我們都知道 Vim 和 Emacs 都是文本編輯器中的上古神器,你也許用 ctags,cscopes 配合 Vim 完成過(guò)大型 C 或者 C++ 的...
摘要:華為云全新計(jì)算實(shí)例商用,智能加速引擎再度開(kāi)啟近年來(lái),人工智能的快速發(fā)展給云計(jì)算能力帶來(lái)新的挑戰(zhàn),數(shù)據(jù)與訓(xùn)練的指數(shù)級(jí)增長(zhǎng)激發(fā)了對(duì)算力巨大的需求。 華為云全新計(jì)算實(shí)例C6、S6商用,智能加速引擎再度開(kāi)啟 近年來(lái),人工智能的快速發(fā)展給云計(jì)算能力帶來(lái)新的挑戰(zhàn),數(shù)據(jù)與訓(xùn)練的指數(shù)級(jí)增長(zhǎng)激發(fā)了對(duì)算力巨大的需求。同時(shí),隨著數(shù)字世界向智能世界的轉(zhuǎn)變,行業(yè)+智能開(kāi)始成為各行各業(yè)構(gòu)建競(jìng)爭(zhēng)力的關(guān)鍵所在。 4月...
閱讀 2544·2021-11-18 10:02
閱讀 2027·2021-11-09 09:45
閱讀 2510·2021-09-26 09:47
閱讀 1070·2021-07-23 10:26
閱讀 1110·2019-08-30 15:47
閱讀 3390·2019-08-30 15:44
閱讀 1008·2019-08-30 15:43
閱讀 915·2019-08-29 13:50