05实用技术/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

  • blackhole register:"_
  • default register :""
  • yank register: "0

使用方法

删除:"_d

粘贴:"0p

其他

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

缩进

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

1
2
3
:set expandtab
:set shiftwidth=2
:set softtabstop=2

显示空白字符

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