This collection is inspired by the youtube video: How to Do 90% of What Plugins Do (With Just Vim)vim
g:netrw_browse_split是重要的选项,直接影响体验:ide
*g:netrw_browse_split* when browsing, <cr> will open the file by: =0: re-using the same window (default) =1: horizontally splitting the window first =2: vertically splitting the window first =3: open file in new tab =4: act like "P" (ie. open previous window)
*g:netrw_liststyle* Set the default listing style: = 0: thin listing (one file per line) = 1: long listing (one file per line with time stamp information and file size) = 2: wide listing (multiple files in columns) = 3: tree style listing
# Fuzzy recursively search file in current folder & open it :find *test.py** # Fuzzy search buffers ever opened & open it :b *file*
用了一天倒腾自动补全插件,实在是崩溃,但凡是有点名气的都对vim自己的编译有很麻烦的要求。搜索过程当中才发现Vim实际上是自带补全功能的,称为OmniComplete
。
输代码的过程当中,直接按Ctrl+X
而后再按Ctrl+O
,就会弹出vim猜想的一系列补全内容。能够在菜单里按“上下键”选择,注意是方向上下键,不是JK键。
通过测试,原生支持不少种语言。工具
在Insert编辑模式时,输入某个词,而后:测试
Ctrl+x
再按Ctrl+l
,就会显示出一个提示列表。Ctrl+n
或Ctrl+p
上下选择。固然,这样按键太麻烦,咱们要作键盘映射了:spa
" 按Ctrl+d显示自动补全 inoremap <C-d> <C-x><C-l>