您的位置:首页

vim使用技巧

2016-08-31 13:29 288 查看
1.普通模式下

  h:向前移动

  J:向下

  k:向上

  l:向右

  i -> insert befroe letter

  I ->insert beginning line

  a ->append after letter

  A->append after line

  O -> open a new line before the current line

  0 -> open a new lint after current line

  w -> navigates cursor to next word

  W -> navigates cursor to next word(not worrying about symbols)

  e -> navigates to the next end of a word

  E -> navigates to the next end of a word(not worrying about symbols)

  

  r -> Replaces a single character

  R -> Replaces untill we tell it to stop

  c -> Changes whatever we specifiy(using a modifier)

  C -> Changes untill the end of a line

  x -> Deletes a single character at the cursor

  X -> Deletes a single character before the cursor

  d -> Deletes whatever we specify (using a modifier)

  D -> Deletes untill the end of a line

  

  y -> Yanks whatever we specify (using a modifier)

  Y -> Yanks the entire current line

  p -> pastes from the vim buffer after the current cursor position

  P -> pastes from this vim buffer before the current cursor position

  u -> 撤销 http://blog.csdn.net/xiongzhengxiang/article/details/7206691
  

  gg -> scoll to top

  G -> scoll to buttom

  :split (ctrl + w + s)-> 上下分割

  :vsplit (ctrl + w + v)->左右分割--类似于tmux

  :tabnew -> 创建新的tab

  :tabp -> 前一个tab,:tabn->下一个tab

  

  : set nu - line Numbers

  : set rnu relative Line Numbers

  :
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: