Vim 设置代码折叠
1.有6种方法来选定折叠:
- manual 手工定义折叠
- indent 更多的缩进表示更高级别的折叠
- expr 用表达式来定义折叠
- syntax 用语法高亮来定义折叠
- diff 对没有更改的文本进行折叠
- marker 对文中的标志折叠
2.折叠命令
- zc 折叠
- zC 对所在范围内所有嵌套的折叠点进行折叠
- zo 展开折叠
- zO 对所在范围内所有嵌套的折叠点展开
- zR 打开所有折叠
- zM 关闭所有折叠
- zE 删除所有的折叠标签
了解spf13
1.spf13高亮问题
在 ~/.vimrc.local 中添加:
autocmd VimEnter * set nospell
2.spf13-vim常用插件NERDTree
Vim:3rd level——Better. Stronger. Faster.
1.Better
. → (dot) will repeat the last command,
N → will repeat the command N times
2.Stronger
NG → Go to line N
gg → shortcut for 1G - go to the start of the file
G → Go to last line
3.Faster
0 → go to the beginning of this line
y → yank from here
$ → up to the end of this line
参考文献:
【1】Vim技巧#Vim foldmethod代码折叠功能
【2】安装spf13之后,设置nospell和colorcolumns
【3】vim终极配置:spf13-vim
【4】Learn Vim Progressively
Thursday, 09. August 2018 03:58AM
Authon : Z