<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Vim on Raveen Kumar</title>
    <link>https://raveenkumar.com/tags/vim/</link>
    <description>Recent content in Vim on Raveen Kumar</description>
    <generator>Hugo</generator>
    <language>en-US</language>
    <copyright>Raveen Kumar</copyright>
    <lastBuildDate>Fri, 19 May 2023 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://raveenkumar.com/tags/vim/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Vim not retaining file and command history</title>
      <link>https://raveenkumar.com/posts/2023-05-19-vim-not-retaining-file-and-command-history/</link>
      <pubDate>Fri, 19 May 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/posts/2023-05-19-vim-not-retaining-file-and-command-history/</guid>
      <description>&lt;p&gt;This solved the problem.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://unix.stackexchange.com/questions/43033/what-would-cause-vim-not-to-retain-command-history&#34;&gt;https://unix.stackexchange.com/questions/43033/what-would-cause-vim-not-to-retain-command-history&lt;/a&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Check presence and rights for ~/.viminfo. Usually that&amp;rsquo;s it which keeps command history, file editing positions, etc. One possible case is that this file belongs to root.&lt;/p&gt;&#xA;&lt;/blockquote&gt;</description>
    </item>
    <item>
      <title>Text Editors</title>
      <link>https://raveenkumar.com/library/text-editors/</link>
      <pubDate>Sun, 19 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/text-editors/</guid>
      <description></description>
    </item>
    <item>
      <title>Flying with vim</title>
      <link>https://raveenkumar.com/library/text-editors/flying_with_vim2---copy/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/text-editors/flying_with_vim2---copy/</guid>
      <description>&lt;p&gt;vimtutor&#xA;:help&#xA;:help &amp;lt;command&amp;gt;&#xA;:helpgrep text&#xA;&lt;a href=&#34;https://vim-adventures.com&#34;&gt;https://vim-adventures.com&lt;/a&gt;&#xA;&lt;a href=&#34;https://en.wikipedia.org/wiki/Vim_%28text_editor%29/&#34;&gt;https://en.wikipedia.org/wiki/Vim_(text_editor)/&lt;/a&gt;&#xA;&lt;a href=&#34;https://en.wikipedia.org/wiki/Vi&#34;&gt;https://en.wikipedia.org/wiki/Vi&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;why-ggvg&#34;&gt;Why ggVG?&lt;/h2&gt;&#xA;&lt;p&gt;gg - go to first line&#xA;V - Select Current line and dont exit select&#xA;G - Go to last line&lt;/p&gt;&#xA;&lt;h3 id=&#34;because-of-this&#34;&gt;Because of this:&lt;/h3&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://upload.wikimedia.org/wikipedia/commons/a/a0/KB_Terminal_ADM3A.svg&#34; alt=&#34;ADM-3A&#34;&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;vim-run-commands&#34;&gt;Vim run commands&lt;/h2&gt;&#xA;&lt;h3 id=&#34;opening-more-than-one-file&#34;&gt;Opening more than one file&lt;/h3&gt;&#xA;&lt;p&gt;In vertical split:&#xA;gvim -O file1 file2&lt;/p&gt;&#xA;&lt;p&gt;In horizontal split:&#xA;gvim -o file1 file2&lt;/p&gt;&#xA;&lt;h3 id=&#34;buffers&#34;&gt;Buffers&lt;/h3&gt;&#xA;&lt;p&gt;:b&#xA;:ls&#xA;Add all files in a folder to buffer&#xA;gvim *&lt;/p&gt;&#xA;&lt;h3 id=&#34;diff&#34;&gt;Diff&lt;/h3&gt;&#xA;&lt;p&gt;:windo diffthis&#xA;gvimdiff file1 file2&lt;/p&gt;</description>
    </item>
    <item>
      <title>Vifm</title>
      <link>https://raveenkumar.com/library/text-editors/vifm/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/text-editors/vifm/</guid>
      <description>&lt;pre&gt;&lt;code&gt;:sync&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;filter-or-find-files-under-current-directory&#34;&gt;Filter or find files under current directory&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;:!find -L -name &amp;quot;*.csv&amp;quot; %u | grep &amp;quot;72\|82&amp;quot; | grep si &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;go-to-shell&#34;&gt;Go to shell&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;s&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;diff-2-files-between-2-panes&#34;&gt;Diff 2 files, between 2 panes&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;:diff&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;change-dirs&#34;&gt;Change dirs&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;:cd or :cd ~ or :cd $HOME  &amp;quot; change to home directory.  &#xA;:cd - &amp;quot; go to the last visited directory.  &#xA;:cd ~/dir  &amp;quot; change directory to ~/dir.  &#xA;:cd /curr/dir /other/dir  &amp;quot; change directory of the current pane to /curr/dir and directory of the other pane to /other/dir.&#xA;:cd! /dir  &amp;quot; same as :cd /dir /dir.  &#xA;:cds &#xA;:cds[!] pattern string &amp;quot; navigate to path obtained by substituting first match in current path. Available flags: i - ignore case, I - don&#39;t ignore case&#xA;:cds[!]/pattern/string/[flags] &amp;quot; same as above, but with :substitute-like syntax.&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Vim</title>
      <link>https://raveenkumar.com/library/text-editors/vim/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/text-editors/vim/</guid>
      <description>&lt;p&gt;You mean emacs?&lt;/p&gt;&#xA;&lt;h2 id=&#34;plugins&#34;&gt;Plugins&lt;/h2&gt;&#xA;&lt;h2 id=&#34;2022-11-27-sun--ctrl-y-in-insert-mode-to-insert-text-from-above-and-ctrl-e-to-insert-from-below&#34;&gt;&lt;span class=&#34;timestamp-wrapper&#34;&gt;&lt;span class=&#34;timestamp&#34;&gt;[2022-11-27 Sun] &lt;/span&gt;&lt;/span&gt; Ctrl-y in insert mode to insert text from above and Ctrl-e to insert from below&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;#ZgotmplZ&#34;&gt;file:///home/raveensrk/my_repos/raveenkumar.xyz/Blog/linux_and_programming/vim-ctrl-y-in-insert-mode.mov&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;2022-11-27-sun--map-movement-to-meta-keys&#34;&gt;&lt;span class=&#34;timestamp-wrapper&#34;&gt;&lt;span class=&#34;timestamp&#34;&gt;[2022-11-27 Sun] &lt;/span&gt;&lt;/span&gt; &lt;a href=&#34;https://vi.stackexchange.com/a/18080&#34;&gt;Map movement to meta keys&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h2 id=&#34;2022-11-27-sun--vim-build-options&#34;&gt;&lt;span class=&#34;timestamp-wrapper&#34;&gt;&lt;span class=&#34;timestamp&#34;&gt;[2022-11-27 Sun] &lt;/span&gt;&lt;/span&gt; Vim build options&lt;/h2&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://raveenkumar.com/home/raveensrk/my_repos/raveenkumar.xyz/Blog/linux_and_programming/image.png&#34; alt=&#34;img&#34;&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;working-with-csv-files-in-vim&#34;&gt;Working with CSV files in Vim&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.getrevue.co/profile/vim_tricks/issues/csv-files-in-vim-1357150&#34;&gt;CSV files in vim&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;2022-08-20-sat--copy-pasting-from-and-to-system-clipboard-in-vim&#34;&gt;&lt;span class=&#34;timestamp-wrapper&#34;&gt;&lt;span class=&#34;timestamp&#34;&gt;&amp;lt;2022-08-20 Sat&amp;gt; &lt;/span&gt;&lt;/span&gt; Copy pasting from and to system clipboard in Vim&lt;/h2&gt;&#xA;&lt;h3 id=&#34;normal-mode--visual-mode&#34;&gt;Normal Mode / Visual Mode:&lt;/h3&gt;&#xA;&lt;p&gt;Pasting from system clipboard: &lt;code&gt;&amp;quot;+p&lt;/code&gt;&#xA;Copy to system clipboard: &lt;code&gt;&amp;quot;+y&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>vim auto complete words from dictionary</title>
      <link>https://raveenkumar.com/library/text-editors/2022-01-10-vim-auto-complete-words-from-dictionary/</link>
      <pubDate>Fri, 17 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/library/text-editors/2022-01-10-vim-auto-complete-words-from-dictionary/</guid>
      <description>&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;-webkit-text-size-adjust:none;&#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;&amp;lt;&lt;span style=&#34;color:#a6e22e&#34;&gt;C&lt;/span&gt;-&lt;span style=&#34;color:#a6e22e&#34;&gt;x&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&#34;color:#a6e22e&#34;&gt;C&lt;/span&gt;-&lt;span style=&#34;color:#a6e22e&#34;&gt;k&lt;/span&gt;&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Thoughts on vim and emacs</title>
      <link>https://raveenkumar.com/posts/2022-11-27-rambling-about-switching-to-vim-but-i-am-back-to-emacs-again/</link>
      <pubDate>Sun, 27 Nov 2022 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/posts/2022-11-27-rambling-about-switching-to-vim-but-i-am-back-to-emacs-again/</guid>
      <description>&lt;p&gt;I will keep using this for 1 more year.&lt;/p&gt;&#xA;&lt;p&gt;Switch to vim when required.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&amp;ldquo;A blade can cut a hair, but an axe can cut a tree. But a blade can&amp;rsquo;t cut a tree and an axe can&amp;rsquo;t cut a hair.&amp;rdquo;&lt;/p&gt;&#xA;&lt;/blockquote&gt;</description>
    </item>
    <item>
      <title>Vim goto file under cursor</title>
      <link>https://raveenkumar.com/posts/2022-01-25-vim-goto-file-under-cursor/</link>
      <pubDate>Tue, 25 Jan 2022 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/posts/2022-01-25-vim-goto-file-under-cursor/</guid>
      <description>&lt;h2 id=&#34;vim-goto-file-under-cursor&#34;&gt;Vim goto file under cursor&lt;/h2&gt;&#xA;&lt;p&gt;Usually &lt;code&gt;gf&lt;/code&gt; takes you to the file under cursor. But there is also &lt;code&gt;gF&lt;/code&gt;. When a&#xA;number followed by non file path character occurs it takes you to that line&#xA;number.&lt;/p&gt;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&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;-webkit-text-size-adjust:none;&#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:#ae81ff&#34;&gt;2022-01-25&lt;/span&gt;-&lt;span style=&#34;color:#a6e22e&#34;&gt;vim&lt;/span&gt;-&lt;span style=&#34;color:#a6e22e&#34;&gt;goto&lt;/span&gt;-&lt;span style=&#34;color:#a6e22e&#34;&gt;file&lt;/span&gt;-&lt;span style=&#34;color:#a6e22e&#34;&gt;under&lt;/span&gt;-&lt;span style=&#34;color:#a6e22e&#34;&gt;cursor&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;md&lt;/span&gt;:&lt;span style=&#34;color:#ae81ff&#34;&gt;3&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Vim modeline</title>
      <link>https://raveenkumar.com/posts/2022-01-10-vim-modeline-settings/</link>
      <pubDate>Mon, 10 Jan 2022 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/posts/2022-01-10-vim-modeline-settings/</guid>
      <description>&lt;h2 id=&#34;vim-modeline-settings&#34;&gt;Vim modeline settings&lt;/h2&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;:help modeline&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;a href=&#34;https://www.cs.swarthmore.edu/oldhelp/vim/modelines.html&#34;&gt;https://www.cs.swarthmore.edu/oldhelp/vim/modelines.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;modelines allow you to set variables specific to a file. By default, the first&#xA;and last five lines are read by vim for variable settings. For example, if you&#xA;put the following in the last line of a C program, you would get a textwidth of&#xA;60 chars when editing that file:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;/* vim: tw=60 ts=2: */&#xA;&#xA;# vim: set nowrap:&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The modelines variable sets the number of lines (at the beginning and end of&#xA;each file) vim checks for initializations.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Vim append yank</title>
      <link>https://raveenkumar.com/posts/2021-12-27-vim-append-yank/</link>
      <pubDate>Mon, 27 Dec 2021 00:00:00 +0000</pubDate>
      <guid>https://raveenkumar.com/posts/2021-12-27-vim-append-yank/</guid>
      <description>&lt;h2 id=&#34;vim-append-yank&#34;&gt;Vim append yank&lt;/h2&gt;&#xA;&lt;p&gt;Append vim yank&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://stackoverflow.com/questions/380379/how-to-add-lines-to-a-vim-register-without-overwriting-it&#34;&gt;https://stackoverflow.com/questions/380379/how-to-add-lines-to-a-vim-register-without-overwriting-it&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;If you want to append to a named register use it&amp;rsquo;s corresponding upper case character. i.e. In your example:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;&amp;#34;ayy&#xA;&amp;#34;Ayy&#xA;&amp;#34;ap&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
  </channel>
</rss>
