`
beefcow
  • 浏览: 44148 次
  • 性别: Icon_minigender_1
  • 来自: 武汉
最近访客 更多访客>>
社区版块
存档分类
最新评论

Vim tips

 
阅读更多
o => open
y => yank
p => put
w => next word start
e => next word end
d => delete
  dw => word
  d$ => until end

x => delete character
a => append after cursor
A => append at end of line

0(zero) => move to start
$ => to end

r => replace character
R => lot charaters

ce/cw=> change until end of a word
c$ => change until end of line

% => find the matching sign

:s/old/new/g(lobal) => substitute
velect a section and then :s => only substitute in this section

:!ls => exec external cmd
:w FILENAME => write current working file to FILENAME
velect a section and :w FileName => write section to FileName

:r FileName => retrieve the content of FileName into currently woking file
:r !dir => retrieve the output of a cmd into current file

set option <= :set ic(ignore case) 
              :set hls(highlight search)
              :set noic( no ignore case)

CTRL+D => show a list of possible cmds

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics