美文网首页
50个有用的 Vim 命令

50个有用的 Vim 命令

作者: 涅槃快乐是金 | 来源:发表于2022-12-04 22:09 被阅读0次

这里有50个有用的Vim命令,在正常模式下工作。这些可以再次组合形成新的命令。使用他们能极大的提升你的工作效率。排名不分先后:

  1. gg 移动到文件的第一行
  2. G 移到最后一行
  3. gg=G 选择整个文件
  4. gv 回到最后一次定位
  5. ``<` 跳到最后一个视觉选择的开始Jump to beginning of last visual selection
  6. ``>` Jump to end of last visual selection
  7. ^ Move to first non-blank character of the line
  8. g_ Move the last non-blank character of the line (but you remove trailing whitespace, right)
  9. g_lD Delete all the trailing whitespace on the line
  10. ea Append to the end of the current word
  11. gf Jump to the file name under the cursor
  12. xp Swap character forward
  13. Xp Swap character backward
  14. yyp Duplicate the current line
  15. yapP Duplicate the current paragraph
  16. dat Delete around an HTML tag, including the tag
  17. dit Delete inside an HTML tag, excluding the tag
  18. w Move one word to the right
  19. b Move one word to the left
  20. dd Delete the current line
  21. zc Close current fold
  22. zo Open current fold
  23. za Toggle current fold
  24. zi Toggle folding entirely
  25. << Outdent current line
  26. >> Indent current line
  27. z= Show spelling corrections
  28. zg Add to spelling dictionary
  29. zw Remove from spelling dictionary
  30. ~ Toggle case of current character
  31. gUw Uppercase until end of word (u for lower, ~ to toggle)
  32. gUiw Uppercase entire word (u for lower, ~ to toggle)
  33. gUU Uppercase entire line
  34. gu$ Lowercase until the end of the line
  35. da" Delete the next double-quoted string
  36. + Move to the first non-whitespace character of the next line
  37. S Delete current line and go into insert mode
  38. I insert at the beginning of the line
  39. ci" Change what’s inside the next double-quoted string
  40. ca{ Change inside the curly braces (try [, (, etc.)
  41. vaw Visually select word
  42. dap Delete the whole paragraph
  43. r Replace a character
  44. ``[` Jump to beginning of last yanked text
  45. ``]` Jump to end of last yanked text
  46. g; Jump to the last change you made
  47. g, Jump back forward through the change list
  48. & Repeat last substitution on current line
  49. g& Repeat last substitution on all lines
  50. ZZ Save the current file and close it

相关文章

  • Vim 常用命令

    VIM 命令 文件命令 VIM的模式 VIM导航命令 VIM插入命令 VIM查找命令 VIM替换命令 VIM使用技...

  • 50个有用的 Vim 命令

    这里有50个有用的Vim命令,在正常模式下工作。这些可以再次组合形成新的命令。使用他们能极大的提升你的工作效率。排...

  • 第三周

    1,定义一个对所有用户都生效的命令别名,例如:lftps='lftp 172.168.0.1/pub' vim /...

  • vim编辑器-vim基本命令

    相关文章:vin命令大全 vim基本命令 本文来源 vim在命令行中输入vim,进入vim编辑器 i/insert...

  • 增强 Vim 编辑器,提高编辑效率

    这 20 多个有用的命令可以增强你使用 Vim 的体验。 Vim 作为一款功能强大、选项丰富的编辑器,为许多用户所...

  • 4-2 vim 的使用

    启动vim 文件命令 vim的模式 导航命令 插入命令 查找命令 替换命令 移动命令 撤销和重做 删除命令 拷贝和...

  • vim 命令

    启动vim vim的模式 导航命令 插入命令 查找命令 替换命令 移动命令 撤销和重做 删除命令 拷贝和粘贴 剪切...

  • vim常用命令笔记

    vim基础操作 vim三种模式 命令模式(Command mode)首次进入vim即命令模式,输入命令可进行相应的...

  • Deepin/Ubuntu/Debina 配置 zsh

    安装zsh 安装zsh在终端执行如下命令: 安装 Powerline (一个 vim 的插件,随后有用)pip i...

  • 入坑!VIM编辑器(最强整理版)

    VIM的三种模式 VIM 小抄图 VIM具体操作 进入vi的命令 移动光标命令 操作在命令模式下 插入文本命令 操...

网友评论

      本文标题:50个有用的 Vim 命令

      本文链接:https://www.haomeiwen.com/subject/swjutdtx.html