<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Text Editor on Tech Notes by ClaudeXu</title>
        <link>https://blog.claudexu.top/categories/text-editor/</link>
        <description>Recent content in Text Editor on Tech Notes by ClaudeXu</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en-us</language>
        <lastBuildDate>Sat, 15 Aug 2026 15:35:08 +0800</lastBuildDate><atom:link href="https://blog.claudexu.top/categories/text-editor/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>Vim - a Fancy Text Editor</title>
        <link>https://blog.claudexu.top/post/tools/vi/vim/</link>
        <pubDate>Sat, 15 Aug 2026 15:35:08 +0800</pubDate>
        
        <guid>https://blog.claudexu.top/post/tools/vi/vim/</guid>
        <description>&lt;h2 id=&#34;motion&#34;&gt;Motion
&lt;/h2&gt;&lt;p&gt;Below are some advanced motion tips beyond basic &lt;code&gt;hjkl&lt;/code&gt;, &lt;code&gt;^$&lt;/code&gt; and &lt;code&gt;wWeE&lt;/code&gt; motion&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;0&lt;/code&gt;: move to the very beginning of the line&lt;/li&gt;
&lt;li&gt;&lt;code&gt;^&lt;/code&gt;: move to the first non-blank character of the line&lt;/li&gt;
&lt;li&gt;&lt;code&gt;I&lt;/code&gt;: move to the first non-blank character of the line and &lt;strong&gt;enter insert mode&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;A&lt;/code&gt;: move to the last character of the line and &lt;strong&gt;enter insert mode&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;%&lt;/code&gt;: jump to the corresponding pair (e.g., matching parentheses, brackets, braces, or quotes)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl+d&lt;/code&gt;: move half page down&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl+u&lt;/code&gt;: move half page up&lt;/li&gt;
&lt;li&gt;&lt;code&gt;f&amp;lt;char&amp;gt;&lt;/code&gt;: move forward to the next occurrence of &lt;code&gt;&amp;lt;char&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;F&amp;lt;char&amp;gt;&lt;/code&gt;: move backward to the previous occurrence of &lt;code&gt;&amp;lt;char&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;t&amp;lt;char&amp;gt;&lt;/code&gt;: move forward until before the next occurrence of &lt;code&gt;&amp;lt;char&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;T&amp;lt;char&amp;gt;&lt;/code&gt;: move backward until after the previous occurrence of &lt;code&gt;&amp;lt;char&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;*&lt;/code&gt;: move forward to the next occurrence of the current word&lt;/li&gt;
&lt;li&gt;&lt;code&gt;#&lt;/code&gt;: move backward to the previous occurrence of the current word&lt;/li&gt;
&lt;li&gt;&lt;code&gt;g*&lt;/code&gt;: move forward to the next occurrence of the current word, &lt;strong&gt;including partial matches&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;g#&lt;/code&gt;: move backward to the previous occurrence of the current word, &lt;strong&gt;including partial matches&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;After using any of &lt;code&gt;*#g*g#&lt;/code&gt;, &lt;code&gt;n&lt;/code&gt; repeats the search in the same direction&lt;/strong&gt;.&lt;/p&gt;
&lt;h3 id=&#34;easymotion&#34;&gt;EasyMotion
&lt;/h3&gt;&lt;p&gt;&lt;em&gt;EasyMotion&lt;/em&gt; is a plugin of Vim. It&amp;rsquo;s highly recommended to move cursor with it.&lt;/p&gt;
&lt;h4 id=&#34;installation&#34;&gt;Installation
&lt;/h4&gt;&lt;p&gt;To install EasyMotion, we utilize a &lt;strong&gt;plugin manager&lt;/strong&gt; called &lt;a class=&#34;link&#34; href=&#34;https://github.com/junegunn/vim-plug&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Vim-Plug&lt;/a&gt;. Install the plugin manager first:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;curl --proxy http://127.0.0.1:10809 -fLo ~/.vim/autoload/plug.vim --create-dirs &lt;span style=&#34;color:#ae81ff&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;&lt;/span&gt;    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Update your &lt;code&gt;~/.vimrc&lt;/code&gt; file:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-vim&#34; data-lang=&#34;vim&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;call&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;plug&lt;/span&gt;#&lt;span style=&#34;color:#a6e22e&#34;&gt;begin&lt;/span&gt;()
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;Plug&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;easymotion/vim-easymotion&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;call&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;plug&lt;/span&gt;#&lt;span style=&#34;color:#a6e22e&#34;&gt;end&lt;/span&gt;()
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; If you&amp;rsquo;re behind a proxy, you may need to configure it:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Configure git proxy (if needed)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git config --global http.https://github.com.proxy http://127.0.0.1:10809
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Configure curl proxy (if needed)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;export http_proxy&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;http://127.0.0.1:10809
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;export https_proxy&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;http://127.0.0.1:10809
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Start Vim and in command mode &lt;strong&gt;issue &lt;code&gt;:PlugInstall&lt;/code&gt;&lt;/strong&gt; to install the plugins according to your &lt;code&gt;~/.vimrc&lt;/code&gt; file. Once done, start Vim and try &lt;code&gt;&amp;lt;leader&amp;gt;&amp;lt;leader&amp;gt;w&lt;/code&gt; to verify if EasyMotion works. The default leader key is &lt;code&gt;&amp;lt;leader&amp;gt;&lt;/code&gt; (typically &lt;code&gt;\&lt;/code&gt; or &lt;code&gt;,&lt;/code&gt;).&lt;/p&gt;
&lt;h4 id=&#34;usage&#34;&gt;Usage
&lt;/h4&gt;&lt;p&gt;Some commonly used keystrokes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;leader&amp;gt;&amp;lt;leader&amp;gt;w&lt;/code&gt; - Jump to start of words forward&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;leader&amp;gt;&amp;lt;leader&amp;gt;b&lt;/code&gt; - Jump to start of words backward&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;leader&amp;gt;&amp;lt;leader&amp;gt;j&lt;/code&gt; - Jump to lines below&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;lt;leader&amp;gt;&amp;lt;leader&amp;gt;k&lt;/code&gt; - Jump to lines above&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;configuration-for-bidirectional-motion&#34;&gt;Configuration for Bidirectional Motion
&lt;/h4&gt;&lt;p&gt;EasyMotion provides bidirectional motion. Configure key bindings in &lt;code&gt;~/.vimrc&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-vim&#34; data-lang=&#34;vim&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&amp;#34; Other configuration in ~/.vimrc&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&amp;#34; Bidirectional word motion&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;nmap&lt;/span&gt; &amp;lt;&lt;span style=&#34;color:#a6e22e&#34;&gt;Leader&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&#34;color:#a6e22e&#34;&gt;Leader&lt;/span&gt;&amp;gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;w&lt;/span&gt; &amp;lt;&lt;span style=&#34;color:#a6e22e&#34;&gt;Plug&lt;/span&gt;&amp;gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;easymotion&lt;/span&gt;-&lt;span style=&#34;color:#a6e22e&#34;&gt;bd&lt;/span&gt;-&lt;span style=&#34;color:#a6e22e&#34;&gt;w&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;nmap&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;gw&lt;/span&gt; &amp;lt;&lt;span style=&#34;color:#a6e22e&#34;&gt;Plug&lt;/span&gt;&amp;gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;easymotion&lt;/span&gt;-&lt;span style=&#34;color:#a6e22e&#34;&gt;bd&lt;/span&gt;-&lt;span style=&#34;color:#a6e22e&#34;&gt;w&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&amp;#34; Bidirectional word-end motion&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;nmap&lt;/span&gt; &amp;lt;&lt;span style=&#34;color:#a6e22e&#34;&gt;Leader&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&#34;color:#a6e22e&#34;&gt;Leader&lt;/span&gt;&amp;gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;e&lt;/span&gt; &amp;lt;&lt;span style=&#34;color:#a6e22e&#34;&gt;Plug&lt;/span&gt;&amp;gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;easymotion&lt;/span&gt;-&lt;span style=&#34;color:#a6e22e&#34;&gt;bd&lt;/span&gt;-&lt;span style=&#34;color:#a6e22e&#34;&gt;e&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;nmap&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;ge&lt;/span&gt; &amp;lt;&lt;span style=&#34;color:#a6e22e&#34;&gt;Plug&lt;/span&gt;&amp;gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;easymotion&lt;/span&gt;-&lt;span style=&#34;color:#a6e22e&#34;&gt;bd&lt;/span&gt;-&lt;span style=&#34;color:#a6e22e&#34;&gt;e&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;grammar&#34;&gt;Grammar
&lt;/h2&gt;&lt;p&gt;Vim supports &lt;code&gt;&amp;lt;num&amp;gt; &amp;lt;operation&amp;gt;&lt;/code&gt; syntax. For example, &lt;code&gt;5yy&lt;/code&gt; copies the current line and the following 4 lines.&lt;/p&gt;
&lt;p&gt;Vim also supports &lt;code&gt;&amp;lt;operation&amp;gt; &amp;lt;motion&amp;gt;&lt;/code&gt; syntax. For example, &lt;code&gt;c$&lt;/code&gt; changes from the current position to the end of the line.&lt;/p&gt;
&lt;h3 id=&#34;text-objects&#34;&gt;Text Objects
&lt;/h3&gt;&lt;p&gt;Vim supports &lt;strong&gt;text objects&lt;/strong&gt; to further improve productivity. Text objects allow you to operate on linguistic units (words, sentences, paragraphs) rather than character positions.&lt;/p&gt;
&lt;p&gt;Common text objects:&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Text Object&lt;/th&gt;
          &lt;th&gt;Description&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;iw&lt;/code&gt; / &lt;code&gt;aw&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;inner/around word&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;is&lt;/code&gt; / &lt;code&gt;as&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;inner/around sentence&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;ip&lt;/code&gt; / &lt;code&gt;ap&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;inner/around paragraph&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;it&lt;/code&gt; / &lt;code&gt;at&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;inner/around tag&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;i&amp;lt;delimiters&amp;gt;&lt;/code&gt; / &lt;code&gt;a&amp;lt;delimiters&amp;gt;&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;inner/around delimiters (quotes, brackets, etc.)&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Common delimiter examples:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;i&amp;quot;&lt;/code&gt; / &lt;code&gt;a&amp;quot;&lt;/code&gt; - inside/around double quotes&lt;/li&gt;
&lt;li&gt;&lt;code&gt;i&#39;&lt;/code&gt; / &lt;code&gt;a&#39;&lt;/code&gt; - inside/around single quotes&lt;/li&gt;
&lt;li&gt;&lt;code&gt;i(&lt;/code&gt; / &lt;code&gt;a(&lt;/code&gt; - inside/around parentheses&lt;/li&gt;
&lt;li&gt;&lt;code&gt;i[&lt;/code&gt; / &lt;code&gt;a[&lt;/code&gt; - inside/around brackets&lt;/li&gt;
&lt;li&gt;&lt;code&gt;i{&lt;/code&gt; / &lt;code&gt;a{&lt;/code&gt; - inside/around braces&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;operation&amp;gt; &amp;lt;text object&amp;gt;&lt;/code&gt; is supported in Vim. For example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;yiw&lt;/code&gt; - yank (copy) the current word&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ci&amp;quot;&lt;/code&gt; - change the content inside the current quotes&lt;/li&gt;
&lt;li&gt;&lt;code&gt;daw&lt;/code&gt; - delete (remove) the current word including surrounding whitespace&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ca&amp;quot;&lt;/code&gt; - change the content around the current quotes (including the quotes themselves)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Why use text objects?&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;More intuitive than character-based motions&lt;/li&gt;
&lt;li&gt;Works with varying content sizes automatically&lt;/li&gt;
&lt;li&gt;Less prone to errors from incorrect character counts&lt;/li&gt;
&lt;li&gt;Consistent behavior regardless of content length&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;unnecessary-motion&#34;&gt;Unnecessary Motion
&lt;/h3&gt;&lt;p&gt;With some shortcuts and the Vim &amp;lsquo;grammar&amp;rsquo; concept, many motions become unnecessary. Here are some examples:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Insert mode shortcuts:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;A&lt;/code&gt; - move to end of line and enter insert mode (no need for &lt;code&gt;$a&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;I&lt;/code&gt; - move to first non-blank character and enter insert mode (no need for &lt;code&gt;^i&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;o&lt;/code&gt; - open a new line below and enter insert mode&lt;/li&gt;
&lt;li&gt;&lt;code&gt;O&lt;/code&gt; - open a new line above and enter insert mode&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Text object operations:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ci&amp;quot;&lt;/code&gt; - change inside quotes (works even if cursor is outside the quotes, searches forward)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;da&amp;quot;&lt;/code&gt; - delete around quotes (removes quotes and their content)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ca&amp;quot;&lt;/code&gt; - change around quotes (replaces quotes and their content)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Why &lt;code&gt;ci&amp;quot;&lt;/code&gt; works without being inside the quote:&lt;/strong&gt;
Vim&amp;rsquo;s text object operations perform a &lt;strong&gt;forward search&lt;/strong&gt; to find the target. This means:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If you&amp;rsquo;re already inside the quote, it targets the current pair&lt;/li&gt;
&lt;li&gt;If you&amp;rsquo;re outside the quote, it finds the &lt;strong&gt;next&lt;/strong&gt; matching pair&lt;/li&gt;
&lt;li&gt;It does &lt;strong&gt;not&lt;/strong&gt; perform backward search&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Comparison table:&lt;/strong&gt;&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Command&lt;/th&gt;
          &lt;th&gt;Behavior&lt;/th&gt;
          &lt;th&gt;Note&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;ci&amp;quot;&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;Change inside quotes&lt;/td&gt;
          &lt;td&gt;Searches forward, even from outside&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;ca&amp;quot;&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;Change around quotes&lt;/td&gt;
          &lt;td&gt;Includes the quotes themselves&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;da&amp;quot;&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;Delete around quotes&lt;/td&gt;
          &lt;td&gt;Removes quotes and content&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;di&amp;quot;&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;Delete inside quotes&lt;/td&gt;
          &lt;td&gt;Removes content only, keeps quotes&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;caw&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;Change around word&lt;/td&gt;
          &lt;td&gt;Includes surrounding whitespace&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;ciw&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;Change inside word&lt;/td&gt;
          &lt;td&gt;Only the word characters&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Common pitfalls to avoid:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Using &lt;code&gt;d$&lt;/code&gt; when you could use &lt;code&gt;D&lt;/code&gt; (delete to end of line)&lt;/li&gt;
&lt;li&gt;Using &lt;code&gt;^i&lt;/code&gt; when you could use &lt;code&gt;I&lt;/code&gt; (insert at start of line)&lt;/li&gt;
&lt;li&gt;Using &lt;code&gt;a&amp;quot;&lt;/code&gt; when you meant &lt;code&gt;i&amp;quot;&lt;/code&gt; (includes extra quotes unexpectedly)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;command-mode&#34;&gt;Command Mode
&lt;/h2&gt;&lt;p&gt;Command‑line mode (also called Ex mode) allows you to run colon commands beyond simple commands like &lt;code&gt;:q&lt;/code&gt;, &lt;code&gt;:w&lt;/code&gt;, etc. Many practical operations can be done with command mode. &lt;code&gt;:help ex-cmd-index&lt;/code&gt; shows the list of EX commands&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;==============================================================================
6. EX commands                                  ex-cmd-index :index

This is a brief but complete listing of all the &amp;#34;:&amp;#34; commands, without
mentioning any arguments.  The optional part of the command name is inside [].
The commands are sorted on the non-optional part of their name.

tag             command         action
------------------------------------------------------------------------------
:               :               nothing
:range          :{range}        go to last line in {range}
:!              :!              filter lines or execute an external command
:!!             :!!             repeat last &amp;#34;:!&amp;#34; command
:#              :#              same as &amp;#34;:number&amp;#34;
:&amp;amp;              :&amp;amp;              repeat last &amp;#34;:substitute&amp;#34;
:star           :*              execute contents of a register
:&amp;lt;              :&amp;lt;              shift lines one &amp;#39;shiftwidth&amp;#39; left
:=              :=              print the cursor line number
:&amp;gt;              :&amp;gt;              shift lines one &amp;#39;shiftwidth&amp;#39; right
...
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To view help for a specific command, use &lt;code&gt;:help :&amp;lt;cmd&amp;gt;&lt;/code&gt;, e.g. &lt;code&gt;:help :s&lt;/code&gt;. To get &lt;strong&gt;word completion in command mode&lt;/strong&gt;, use &lt;code&gt;Ctrl-d&lt;/code&gt; and TAB key**.&lt;/p&gt;
&lt;h3 id=&#34;range&#34;&gt;Range
&lt;/h3&gt;&lt;p&gt;A range defines the set of lines an Ex command operates on. The syntax is &lt;code&gt;&amp;lt;start_position&amp;gt;,&amp;lt;end_position&amp;gt;&lt;/code&gt;, for example&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;1, 5&lt;/code&gt; - lines 1 through 5&lt;/li&gt;
&lt;li&gt;&lt;code&gt;1,.&lt;/code&gt; - from the first line to the current line&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.,$&lt;/code&gt; - from the current line to the end of the buffer&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.-1,.+1&lt;/code&gt; - one line above to one line below the cursor&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In &lt;strong&gt;Visual mode, when multiple lines are selected, pressing &lt;code&gt;:&lt;/code&gt; will enter command mode with &lt;code&gt;:&#39;&amp;lt;,&#39;&amp;gt;&lt;/code&gt;&lt;/strong&gt; shown in the command mode prompt. &lt;code&gt;&#39;&amp;lt;,&#39;&amp;gt;&lt;/code&gt; represents from the entire first line to the entire last line of the selected multiple lines.&lt;/p&gt;
&lt;p&gt;Similary &lt;code&gt;&#39;[,&#39;]&lt;/code&gt; represents from the entire first line to the entire last line of the most recently changed area.&lt;/p&gt;
&lt;h3 id=&#34;move-lines&#34;&gt;Move Lines
&lt;/h3&gt;&lt;p&gt;To move the current line and the next 3 lines to the bottom of the file:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;:.,.+3m$
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To move lines 1–4 to the current cursor position:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;:1,4m.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The m command places the moved lines after the destination line.&lt;/p&gt;
&lt;h3 id=&#34;copy-lines&#34;&gt;Copy Lines
&lt;/h3&gt;&lt;p&gt;To copy lines, use &lt;code&gt;co&lt;/code&gt; command. For example, below command copies the current line with 1 line &amp;lsquo;context&amp;rsquo; to the bottom of the buffer:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;:.-1,.+1co$
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;contents-substitution&#34;&gt;Contents Substitution
&lt;/h3&gt;&lt;p&gt;To replace text in the entire buffer, use &lt;code&gt;s&lt;/code&gt; command:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;:%s#Hello#Hi#g
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Some useful options&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;g&lt;/code&gt; — replace all matches on each line&lt;/li&gt;
&lt;li&gt;&lt;code&gt;i&lt;/code&gt; — ignore case&lt;/li&gt;
&lt;li&gt;&lt;code&gt;c&lt;/code&gt; — confirm each substitution&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;global-command&#34;&gt;Global Command
&lt;/h3&gt;&lt;p&gt;Sometimes, instead of using range, we need to perform the operation on matching items. For example, to get a &amp;ldquo;clean&amp;rdquo; version of Nginx configuration, we need to delete all comment lines in the configuration file.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;:g/^#/d
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Explanation&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;g&lt;/code&gt; means to globally apply the command, so the entire buffer is impacted.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;^#&lt;/code&gt; is the regular expression to match the leading pond sign, aka the comment line.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;d&lt;/code&gt; means to delete the matching lines.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To operate on non‑matching lines, use &lt;code&gt;v&lt;/code&gt;. For example, to copy all non‑comment lines to the bottom:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;:v/^#/co$
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;shell-interaction&#34;&gt;Shell Interaction
&lt;/h2&gt;&lt;p&gt;In Vim command-line mode, you can execute shell command directly &lt;strong&gt;using exclamation mark&lt;/strong&gt; like &lt;code&gt;:!&amp;lt;shell_cmd&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;:!date
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;read-from-command-output&#34;&gt;Read from Command Output
&lt;/h3&gt;&lt;p&gt;To &lt;strong&gt;read the output of a shell command&lt;/strong&gt; into the current buffer, use &lt;code&gt;:r&lt;/code&gt; with &lt;code&gt;!&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;:r !date
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Beyond that, Vim can read the output of any program that writes to STDOUT:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;:r !python my_script.py
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;treat-contents-as-command-string-to-execute&#34;&gt;Treat Contents as Command String to Execute
&lt;/h3&gt;&lt;p&gt;If a line contains a shell command such as &lt;code&gt;ls ~/Videos&lt;/code&gt;, you can send it to shell as a command to execute using &lt;code&gt;!!&lt;/code&gt;. Once entered, you will be navigated to the command mode with below command prompt&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;:.!
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Appending a shell name (e.g., &lt;code&gt;sh&lt;/code&gt;) runs the line through that shell&lt;/strong&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;:.!sh
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This replaces the command string in the buffer with the output produced by the shell.&lt;/p&gt;
&lt;h2 id=&#34;marks&#34;&gt;Marks
&lt;/h2&gt;&lt;p&gt;A mark labels a specific position in a file so you can quickly jump back to it or use it in Ex commands. Create a mark with &lt;code&gt;m&amp;lt;letter&amp;gt;&lt;/code&gt;. Notes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Lowercase marks (a–z) are local to the current file&lt;/li&gt;
&lt;li&gt;Uppercase marks (A–Z) are global across files&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To jump to a mark&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&#39;a&lt;/code&gt; jump to the line of mark &lt;code&gt;a&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&amp;lsquo;&lt;code&gt;a&lt;/code&gt; jump to the exact position of mark &lt;code&gt;a&lt;/code&gt;, considering the mark created on the position like the second character of the line&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;use-marks-with-commands&#34;&gt;Use Marks with Commands
&lt;/h3&gt;&lt;p&gt;Marks can be used as line addresses in command mode. If mark &lt;code&gt;a&lt;/code&gt; is set on a line:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;:&#39;am.&lt;/code&gt; - move the marked line to the current line&lt;/li&gt;
&lt;li&gt;&lt;code&gt;:&#39;aco$&lt;/code&gt; - copy the marked line to the end of the buffer&lt;/li&gt;
&lt;li&gt;&lt;code&gt;:&#39;ad&lt;/code&gt; - delete the marked line&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;register--macro&#34;&gt;Register &amp;amp; Macro
&lt;/h2&gt;&lt;h3 id=&#34;register-basics&#34;&gt;Register Basics
&lt;/h3&gt;&lt;p&gt;Registers are containers that store text for later retrieval. View all registers with &lt;code&gt;:registers&lt;/code&gt; or &lt;code&gt;:reg&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;:reg
Type Name Content
  c  &amp;#34;&amp;#34;   ?asdf ad
  c  &amp;#34;0   ??
  l  &amp;#34;1   asdfa1234asdf^J
  l  &amp;#34;2   1234asdf^J
  l  &amp;#34;3   9866756^J
  l  &amp;#34;4   asdfasd1234^J879-0iasdf^J
  l  &amp;#34;5   asdfasdfasdf^Jasdfasd1234^J
  l  &amp;#34;6   ^J
  l  &amp;#34;7   adsf 134 asdf^J
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Notes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;c&lt;/code&gt; means characterwise&lt;/li&gt;
&lt;li&gt;&lt;code&gt;l&lt;/code&gt; means linewise&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To &lt;strong&gt;use a register&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;in &lt;strong&gt;normal mode&lt;/strong&gt;: use &lt;code&gt;&amp;quot;&amp;lt;reg_name&amp;gt;&lt;/code&gt;, such as &lt;code&gt;&amp;quot;add&lt;/code&gt; to cut the current line into &lt;code&gt;a&lt;/code&gt; register&lt;/li&gt;
&lt;li&gt;in &lt;strong&gt;insert mode&lt;/strong&gt;: use &lt;code&gt;Ctrl-r&amp;lt;reg_name&amp;gt;&lt;/code&gt;, such as &lt;code&gt;Ctrl-ra&lt;/code&gt; to paste the contents stored in &lt;code&gt;a&lt;/code&gt; register&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Register types:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;unamed register&lt;/li&gt;
&lt;li&gt;numbered registers&lt;/li&gt;
&lt;li&gt;named registers&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;unamed-register&#34;&gt;Unamed Register
&lt;/h4&gt;&lt;p&gt;The unnamed register (&amp;quot;&amp;quot;) is used when no register is specified. For example, dd stores the deleted line in &amp;ldquo;&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;A practical use case - surrounding a word with quotes:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;ciw&lt;/code&gt; - &amp;lsquo;cut&amp;rsquo; the word into unnamed register&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;&lt;/code&gt; - the opening quote&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl-r &amp;quot;&lt;/code&gt; - read the unnamed register&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;&lt;/code&gt; - the closing quote&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&#34;numbered-registers&#34;&gt;Numbered Registers
&lt;/h4&gt;&lt;p&gt;Numbered registers &lt;code&gt;&amp;quot;0&lt;/code&gt; – &lt;code&gt;&amp;quot;9&lt;/code&gt; behave as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;0&lt;/code&gt; - contains the last yanked contents (&lt;code&gt;y&lt;/code&gt;), including characterwise and linewise&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;1&lt;/code&gt; to &lt;code&gt;&amp;quot;9&lt;/code&gt; - deletion history (&lt;code&gt;dd&lt;/code&gt;), linewise only, newest in &lt;code&gt;&amp;quot;1&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These registers can help recover mistakenly deleted lines.&lt;/p&gt;
&lt;h4 id=&#34;named-registers&#34;&gt;Named Registers
&lt;/h4&gt;&lt;p&gt;Named registers &lt;code&gt;&amp;quot;a&lt;/code&gt;–&lt;code&gt;&amp;quot;z&lt;/code&gt; and &lt;code&gt;&amp;quot;A&lt;/code&gt;–&lt;code&gt;&amp;quot;Z&lt;/code&gt; provide 52 registers total. They can store characterwise or linewise text, and they can also &lt;strong&gt;store macros&lt;/strong&gt;.&lt;/p&gt;
&lt;h3 id=&#34;use-macro-to-repeat-operations&#34;&gt;Use Macro to Repeat Operations
&lt;/h3&gt;&lt;p&gt;Macros are recorded in named registers as characterwise. To record a macro, in normal mode perform&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;q&amp;lt;named register&amp;gt;&lt;/code&gt; - start recording&lt;/li&gt;
&lt;li&gt;perform desired operation&lt;/li&gt;
&lt;li&gt;&lt;code&gt;q&lt;/code&gt; - stop recording&lt;/li&gt;
&lt;li&gt;&lt;code&gt;@&amp;lt;named register&amp;gt;&lt;/code&gt; - replay the macro&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To edit a macro stored in a register:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;:let @&amp;lt;named_register&amp;gt;=&#39;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl-r &amp;lt;named_register&amp;gt;&lt;/code&gt; - insert the macro contents for modification&lt;/li&gt;
&lt;li&gt;edit as needed&lt;/li&gt;
&lt;li&gt;press ENTER to save&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Replay the most recently executed macro with &lt;code&gt;@@&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;undo-redo--repeat&#34;&gt;Undo, Redo &amp;amp; Repeat
&lt;/h2&gt;&lt;p&gt;Keystrokes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Undo: &lt;code&gt;u&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Redo: &lt;code&gt;Ctrl-r&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Repeat: &lt;code&gt;.&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Notice the &lt;strong&gt;difference between redo and repeat&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Redo - re-apply an undone change&lt;/li&gt;
&lt;li&gt;Repeat - re-execute the last change command&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example: if a line is deleted with &lt;code&gt;dd&lt;/code&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;u&lt;/code&gt; restores the deleted line&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.&lt;/code&gt; deletes the current line again&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;work-with-multiple-files&#34;&gt;Work with Multiple Files
&lt;/h2&gt;&lt;p&gt;Netrw is Vim’s &lt;strong&gt;built‑in file explorer&lt;/strong&gt;. Open it with &lt;code&gt;:Exp&lt;/code&gt;. To open and edit a file directly, use &lt;code&gt;:e &amp;lt;file&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;To open a file in a split windows, use&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;:sp &amp;lt;file&amp;gt;&lt;/code&gt; - horizontal split&lt;/li&gt;
&lt;li&gt;&lt;code&gt;:vs &amp;lt;file&amp;gt;&lt;/code&gt; - vertical split&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To move betwen windows, using &lt;code&gt;Ctrl-w&lt;/code&gt; followed by&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;h&lt;/code&gt; - move the cursor to the left window&lt;/li&gt;
&lt;li&gt;&lt;code&gt;j&lt;/code&gt; - move the cursor to the bottom window&lt;/li&gt;
&lt;li&gt;&lt;code&gt;k&lt;/code&gt; - move the cursor to the top window&lt;/li&gt;
&lt;li&gt;&lt;code&gt;l&lt;/code&gt; - move the cursor to the right window&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;buffer&#34;&gt;Buffer
&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;File contents are loaded into buffers&lt;/strong&gt; before being written to disk. View all buffers with &lt;code&gt;:buffers&lt;/code&gt;.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;:buffers
  2      &amp;#34;lab.scala&amp;#34;            line 2
  3 #a   &amp;#34;sample.scala&amp;#34;         line 1
  4 %a   &amp;#34;lab2.scala&amp;#34;           line 1
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Explanation&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;To open a specific buffer in the current winwdow, use &lt;code&gt;b &amp;lt;buffer_number&amp;gt;&lt;/code&gt;. For instance, &lt;code&gt;b 2&lt;/code&gt; to open &amp;ldquo;lab.scala&amp;rdquo; in the current window&lt;/li&gt;
&lt;li&gt;&lt;code&gt;a&lt;/code&gt; - the active buffer (visible in at least one window)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;%&lt;/code&gt; - the current buffer (visible in the current window)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;#&lt;/code&gt; - alternative buffer (last visited buffer)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To &lt;strong&gt;delete a buffer&lt;/strong&gt;, use &lt;code&gt;:bd &amp;lt;buffer_number&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;options&#34;&gt;Options
&lt;/h2&gt;&lt;p&gt;Options can be configured in command‑line mode using &lt;code&gt;:set &amp;lt;option&amp;gt;&lt;/code&gt;. Common useful options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;hls&lt;/code&gt; - highlight search matches&lt;/li&gt;
&lt;li&gt;&lt;code&gt;nu&lt;/code&gt; - show absolute line numbers
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;rnu&lt;/code&gt; - show relative line numbers&lt;/li&gt;
&lt;li&gt;&lt;code&gt;nu rnu&lt;/code&gt; - show relative line numbers with an absolute line number on the current line&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ic&lt;/code&gt; - ignore case when searching&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To toggle an option, use &lt;code&gt;:set &amp;lt;option&amp;gt;!&lt;/code&gt;. For example &lt;code&gt;:set hls!&lt;/code&gt; to disable search highlighting.&lt;/p&gt;
&lt;h2 id=&#34;use-vim-key-binding-elsewhere&#34;&gt;Use Vim Key Binding Elsewhere
&lt;/h2&gt;&lt;p&gt;Vim keybindings can be used in many other applications to improve productivity. Examples include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Tmux — a terminal multiplexer with Vim‑style navigation&lt;/li&gt;
&lt;li&gt;VS Code Vim — an extension that enables Vim keybindings in Visual Studio Code&lt;/li&gt;
&lt;li&gt;Vifm — a file manager with native Vim‑like commands&lt;/li&gt;
&lt;li&gt;Vimium — a browser extension that brings Vim navigation to Chrome and Firefox&lt;/li&gt;
&lt;/ul&gt;
</description>
        </item>
        
    </channel>
</rss>
