vim使用技巧

本文详细介绍了Vim编辑器的基本操作与快捷键使用方法,包括文本导航、编辑、复制粘贴等常用功能,同时提供了如何进行文件分割及标签页管理的操作指南。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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.youkuaiyun.com/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

  : 

转载于:https://www.cnblogs.com/Iqiaoxun/p/5825549.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值