• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            coreBugZJ

            此 blog 已棄。

            Vim學習筆記 (轉)


            1. Type 0 (zero) to move to the start of the line.
            Type 2w to move the cursor two words forward.
            Type 3e to move the cursor to the end of the third word forward.

            2. Type x to delete the first unwanted character.
            Type rx to replace the character at the cursor with x

            3. To change until the end of a word, type ce (ce + 修正的單詞)

            4. C就類似于d。de,dw,d$都對應著ce,cw,c$

            5. Type CTRL-G to show your location in the file and the file status.
            Type G to move to a line in the file.

            6. Press G to move you to the bottom of the file.
            Type gg to move you to the start of the file.

            7. Type / followed by a phrase to search for the phrase.

            8. To search for the same phrase again, simply type n .
            To search for the same phrase in the opposite direction, type N

            9. To search for a phrase in the backward direction, use ? instead of /

            10. To go back to where you came from press CTRL-O

            11. 匹配使用%,放置在一個括號下面,然后輸入%,就會跳轉到另外一個上面。

            12. type :#,#s/old/new/g where #,# are the line numbers of the range
            of lines where the substitution is to be done. (兩行之間的所有文本)
            Type :%s/old/new/g to change every occurrence in the whole file.(不提示,但是是整個文件)
            Type :%s/old/new/gc to find every occurrence in the whole file,
            with a prompt whether to substitute or not.(提示是否代替)

            13.g表示取代該行所有的。
            比如:s/thee/the/g表示取代該行中所有的thee為the。

            14. CTRL-G displays your location in the file and the file status.
            G moves to the end of the file.
            number G moves to that line number.
            gg moves to the first line.

            15. :! 運行執行外部程序。(冒號是必須的,命令模式都必須的,比如:w表示保存) (外部命令如ls,pwd需要使用!,而內部命令則是直接:w等等,不需要使用!)

            16. 輸入v進入視覺模式,此時鼠標向下會選中部分文字,然后可以對選中的文字操作。
            比如:w TEST則會把選中的保存位文本。
            :d則會刪除選中的文本。

            17. 插入一個文件的部分內容,使用:r FILENAME即可插入一個文件到該行。

            18. 在下方新建一個空行,使用o,
            在上方新建一個空行,使用O。(命令模式下) (輸入命令后會進入插入模式)

            NOTE: a, i and A all go to the same Insert mode, the only difference is where
            the characters are inserted.(a是在光標后,A是在行末尾,i則是光標處)

            19. e跳轉一個單詞。e.g: 2e表示跳轉兩個單詞,比向右鍵更快捷。
            G跳轉行。e.g: 721G表示跳轉到第721行

            20. 替換:
            R:替換位多個字母
            r:替換位單個字母

            21. Move the cursor to the end of the next line: j$

            22. Use the y operator to copy text and p to paste it

            NOTE: you can also use y as an operator; yw yanks one word.

            23. Set the 'ic' (Ignore case) option by entering: :set ic(包含大小寫匹配的都顯示出來,比如Ignore,IGNORE)
            Set the 'hlsearch' and 'incsearch' options: :set hls is(高亮顯示)

            (set option)
            24. Typing ":set xxx" sets the option "xxx". Some options are:
            'ic' 'ignorecase' ignore upper/lower case when searching
            'is' 'incsearch' show partial matches for a search phrase
            'hls' 'hlsearch' highlight all matching phrases
            You can either use the long or the short option name.

            25. Prepend "no" to switch an option off: :set noic

            26. 在命令模式下,輸入e然后按TAB鍵,會自動出現很多相關的命令(以e開頭的命令)。(第一個相關的)
            按Ctrl + D能夠出現所有以他開頭的命令。

            posted on 2011-10-09 14:09 coreBugZJ 閱讀(256) 評論(0)  編輯 收藏 引用 所屬分類: Linux 、Editor

            精品蜜臀久久久久99网站| 久久99久久99小草精品免视看| 国产精品嫩草影院久久| 久久精品国产99国产精偷| 中文字幕一区二区三区久久网站| 精品久久久久久久中文字幕| 亚洲国产精品综合久久网络 | 精品熟女少妇aⅴ免费久久| 亚洲国产精品热久久| 亚洲国产成人精品久久久国产成人一区二区三区综 | 久久精品国产亚洲Aⅴ香蕉 | 久久人人爽人人精品视频| 久久99精品国产麻豆宅宅| 国产精品一久久香蕉国产线看观看| 色偷偷888欧美精品久久久| 婷婷久久五月天| 国产一区二区三区久久| 午夜精品久久久久成人| 亚洲国产精品热久久| 久久人人爽爽爽人久久久| 韩国三级中文字幕hd久久精品 | 99久久国产亚洲综合精品| 久久久久国产一级毛片高清版| 久久精品人妻中文系列| 99精品伊人久久久大香线蕉| 亚洲午夜久久久久久久久电影网| 久久99精品久久久久久不卡| 久久精品麻豆日日躁夜夜躁| 亚洲欧美一区二区三区久久| 国产午夜福利精品久久| 久久精品国产亚洲av水果派 | 国产91色综合久久免费| 久久午夜夜伦鲁鲁片免费无码影视| 99久久精品久久久久久清纯| www性久久久com| 久久精品国产亚洲AV电影 | 无码人妻久久久一区二区三区| 欧美性大战久久久久久| 狠狠人妻久久久久久综合蜜桃| 99久久综合国产精品二区| 天天久久狠狠色综合|