zjffun blog

Vim

更新于 写于

Vim documentation: usr_toc

标准术语与 Vim 术语对照

Standard terminology Vim’s jargon
paste put
copy yank
cut delete
delete delete and write to “blackhole” register

寄存器

Meet the yank register How to copy to clipboard in Vim? - Stack Overflow

  • blackhole register: "_
  • default register: ""
  • yank register: "0
  • system clipboard: "* or "+

使用方法

删除:"_d

粘贴:"0p

其他

  • 显示行号::set number:set nu
  • 隐藏行号::set nonumber:set nonu

缩进

Indenting source code | Vim Tips Wiki | FANDOM powered by Wikia

:set expandtab
:set shiftwidth=2
:set softtabstop=2

显示空白字符

:e ++ff=unix
:set list
  • ^M: CR
  • ^I: tab