Coder Social home page Coder Social logo

learn-vim's Introduction

learn-vim

第一天熟悉一下快捷键 三种模式:命令模式,插入模式,底行模式 i→ 插入模式. 按ESC键返回普通模式 x→ 删除光标所在的字符 :wq→ 保存退出(:w 保存,:q 退出) dd→ 删除(拷贝)当前行 p→ 粘贴 <<<<<<< HEAD yy→复制一行 hjkl(高度推荐) → 基本的光标移动 (←↓↑→), hj按行移动。 :help → 显示关于的帮助,可以使用help不带获得常规帮助。 第二天 适应学习 1.命令模式转换插入模式 a→ 在光标后插入 o→ 在当前行之后插入新行 O→ 在当前行之前插入新行 cw→ 替换从光标到单词结束 2.基本移动命令 0→ 跳到第一列 ^→ 跳到本行第一个非空字符 $→ 跳到本行末尾 g_→ 跳到本行最后一个非空字符 /pattern→ 搜索pattern 3.复制/粘贴 P→ 在当前位置之前粘贴,记住 p 是在当前位置之前粘贴. yy→ 复制当前行,与dd和P命令相比更简单。 4. 取消/恢复 u→ 取消 → 恢复 5.加载/保存/退出/修改 文件(缓存) :e <文件路径>→ 打开 :w→ 保存 :saveas <文件路径>→ 保存到这个文件 :x,ZZ或者:wq→ 保存和退出 (:x 如果可能的话,只保存) :q!→ 退出但不保存,使用:qa!,即使在缓存中还有已经修改的也会退出。 :bn(对比:bp) → 显示下一个(上一个)文件缓存 第三天

  1. 点(.)会重做最后一个命令的 2.N<命令>会重复做这个命令N次 3.NG 跳到第N行 4.gg 是1G的快捷键方式-跳到文件的开始 5.G 跳到最后一行开头 6.单词间的移动:

    1. w/W 跳到下一个单词的开头/W 跳到下一行的开头
    2. e/E 跳到这个单词的末尾/E 跳到行的结尾 高效率的移动: % 跳到对应的(,(,[处 *(对比#)跳到当前光标的下一个(上一个)相同单词的地方

    0→ 跳到本行开头 y→ 从这里开始复制 $→ 直到本行结束

learn-vim's People

Contributors

daisy-dai avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.