<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Linux on Shengting Cao</title>
    <link>https://shengtingcao.top/categories/linux/</link>
    <description>Recent content in Linux on Shengting Cao</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <copyright>© 2026 Shengting Cao</copyright>
    <lastBuildDate>Sun, 28 Sep 2014 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://shengtingcao.top/categories/linux/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>VIM Note</title>
      <link>https://shengtingcao.top/blog/vimnote/</link>
      <pubDate>Sun, 28 Sep 2014 00:00:00 +0000</pubDate>
      <guid>https://shengtingcao.top/blog/vimnote/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://vim.rtorr.com/&#34;&gt;reference 1, vim cheat sheet&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://www.cs.oberlin.edu/~kuperman/help/vim/home.html&#34;&gt;reference 2, vim command summary&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h4 id=&#34;multi-window&#34;&gt;multi-window&lt;/h4&gt;&#xA;&lt;h5 id=&#34;lmuti-window-basic-operations&#34;&gt;&lt;span style=&#34;color:blue&#34;&gt;lmuti-window basic operations &lt;/span&gt;&lt;/h5&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt; :e filename      - edit another file&#xA; :split filename  - split window and load another file&#xA; ctrl-w up arrow  - move cursor up a window&#xA; ctrl-w ctrl-w    - move cursor to another window (cycle)&#xA; ctrl-w_          - maximize current window&#xA; ctrl-w=          - make all equal size&#xA; 10 ctrl-w+       - increase window size by 10 lines&#xA; :vsplit file     - vertical split&#xA; :sview file      - same as split, but readonly&#xA; :hide            - close current window&#xA; :only            - keep only this window open&#xA; :ls              - show current buffers&#xA; :b 2             - open buffer #2 in this window&#xA; :bnext or :bn - go to the next buffer&#xA; :bprev or :bp - go to the previous buffer&#xA; :bd - delete a buffer (close a file)&#xA; :ls - list all open buffers&#xA; :sp file - open a file in a new buffer and split window&#xA; :vsp file - open a file in a new buffer and vertically split window&#xA; Ctrl + ws - split window&#xA; Ctrl + ww - switch windows&#xA; Ctrl + wq - quit a window&#xA; Ctrl + wv - split window vertically&#xA; Ctrl + wh - move cursor to the left window (vertical split)&#xA; Ctrl + wl - move cursor to the right window (vertical split)&#xA; Ctrl + wj - move cursor to the window below (horizontal split)&#xA; Ctrl + wk - move cursor to the window above (horizontal split)&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;cursor-movement&#34;&gt;cursor movement&lt;/h4&gt;&#xA;&lt;h5 id=&#34;cursor-movement-1&#34;&gt;&lt;span style=&#34;color:blue&#34;&gt;cursor movement&lt;/span&gt;&lt;/h5&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;h - move cursor left&#xA;j - move cursor down&#xA;k - move cursor up&#xA;l - move cursor right&#xA;H - move to top of screen&#xA;M - move to middle of screen&#xA;L - move to bottom of screen&#xA;w - jump forwards to the start of a word&#xA;W - jump forwards to the start of a word (words can contain punctuation)&#xA;e - jump forwards to the end of a word&#xA;E - jump forwards to the end of a word (words can contain punctuation)&#xA;b - jump backwards to the start of a word&#xA;B - jump backwards to the start of a word (words can contain punctuation)&#xA;% - move to matching character (default supported pairs: &amp;#39;()&amp;#39;, &amp;#39;{}&amp;#39;, &amp;#39;[]&amp;#39; - use &amp;lt;code&amp;gt;:h matchpairs&amp;lt;/code&amp;gt; in vim for more info)&#xA;0 - jump to the start of the line&#xA;^ - jump to the first non-blank character of the line&#xA;$ - jump to the end of the line&#xA;g_ - jump to the last non-blank character of the line&#xA;gg - go to the first line of the document&#xA;G - go to the last line of the document&#xA;5G - go to line 5&#xA;fx - jump to next occurrence of character x&#xA;tx - jump to before next occurrence of character x&#xA;Fx - jump to previous occurence of character x&#xA;Tx - jump to after previous occurence of character x&#xA;; - repeat previous f, t, F or T movement&#xA;, - repeat previous f, t, F or T movement, backwards&#xA;} - jump to next paragraph (or function/block, when editing code)&#xA;{ - jump to previous paragraph (or function/block, when editing code)&#xA;zz - center cursor on screen&#xA;Ctrl + e - move screen down one line (without moving cursor)&#xA;Ctrl + y - move screen up one line (without moving cursor)&#xA;Ctrl + b - move back one full screen&#xA;Ctrl + f -&#xA;Ctrl + d -&#xA;Ctrl + u -&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;search-and-replace&#34;&gt;Search and replace&lt;/h4&gt;&#xA;&lt;h5 id=&#34;search-and-replace-1&#34;&gt;&lt;span style=&#34;color:blue&#34;&gt;Search and replace&lt;/span&gt;&lt;/h5&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;/pattern - search for pattern&#xA;?pattern - search backward for pattern&#xA;\vpattern - &amp;#39;very magic&amp;#39; pattern: non-alphanumeric characters are interpreted as special regex symbols (no escaping needed)&#xA;n - repeat search in same direction&#xA;N - repeat search in opposite direction&#xA;:%s/old/new/g - replace all old with new throughout file&#xA;:%s/old/new/gc - replace all old with new throughout file with confirmations&#xA;:noh - remove highlighting of search matches&#xA;Search in multiple files&#xA;:vimgrep /pattern/ {file} - search for pattern in multiple files&#xA;&#x9;e.g.:vimgrep /foo/ **/*&#xA;:cn - jump to the next match&#xA;:cp - jump to the previous match&#xA;:copen - open a window containing the list of matches&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
  </channel>
</rss>
