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初探系列——3

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

相关文章:

  • 2021-07-26
  • 2022-01-14
  • 2021-11-04
  • 2022-12-23
  • 2021-08-18
  • 2021-08-03
  • 2021-10-16
  • 2022-01-14
猜你喜欢
  • 2021-06-29
  • 2022-12-23
  • 2021-12-12
  • 2022-12-23
  • 2021-11-15
  • 2021-06-15
  • 2022-12-23
相关资源
相似解决方案