<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Vim on Ricky</title><link>https://linzeyan.github.io/categories/vim/</link><description>Recent content in Vim on Ricky</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Thu, 07 Jul 2022 17:36:22 +0800</lastBuildDate><atom:link href="https://linzeyan.github.io/categories/vim/index.xml" rel="self" type="application/rss+xml"/><item><title>Using Vim as a Diff Tool</title><link>https://linzeyan.github.io/posts/2022/20220707-vim-diff-tool/</link><pubDate>Thu, 07 Jul 2022 17:36:22 +0800</pubDate><guid>https://linzeyan.github.io/posts/2022/20220707-vim-diff-tool/</guid><description>&lt;ul>
&lt;li>&lt;a href="https://www.baeldung.com/linux/vim-diff-tool" target="_blank" rel="noopener">Using Vim as a Diff Tool&lt;/a>&lt;/li>
&lt;/ul>
&lt;h4 id="command">command&lt;/h4>
&lt;p>&lt;code>vim -d file1.txt file2.txt&lt;/code>
or
&lt;code>vimdiff file1.txt file2.txt&lt;/code>&lt;/p>
&lt;ul>
&lt;li>Switching Between Diff Windows: &lt;code>Ctrl-w + Ctrl-w&lt;/code>&lt;/li>
&lt;li>Changing Split Window Orientation
&lt;ul>
&lt;li>&lt;code>ctrl-w + K&lt;/code> key combination to change window orientation from vertical to horizontal.&lt;/li>
&lt;li>&lt;code>ctrl-w + H&lt;/code> shortcut to switch back window orientation to a vertical split.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Jumping Between Changes
&lt;ul>
&lt;li>&lt;code>]c&lt;/code> key combination to go to the next change.&lt;/li>
&lt;li>&lt;code>[c&lt;/code> shortcut to jump to the previous change.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Applying Changes From the Diff Window: &lt;code>:diffget&lt;/code>, &lt;code>:diffput&lt;/code>&lt;/li>
&lt;li>Export Diff to the HTML Web Page: &lt;code>:TOhtml | w ~/diff.html&lt;/code>&lt;/li>
&lt;/ul></description></item><item><title>Vim Tips - Edit Remote Files With Vim On Linux</title><link>https://linzeyan.github.io/posts/2020/20200314-vim-tips-edit-remote-files-with-vim-on-linux/</link><pubDate>Sat, 14 Mar 2020 15:43:38 +0800</pubDate><guid>https://linzeyan.github.io/posts/2020/20200314-vim-tips-edit-remote-files-with-vim-on-linux/</guid><description>&lt;ul>
&lt;li>&lt;a href="https://www.ostechnix.com/vim-tips-edit-remote-files-with-vim-on-linux/" target="_blank" rel="noopener">Vim Tips - Edit Remote Files With Vim On Linux&lt;/a>&lt;/li>
&lt;/ul>
&lt;h4 id="edit-remote-files-with-vim-on-linux">Edit remote files with Vim on Linux&lt;/h4>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ vim scp://sk@192.168.225.22/info.txt
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ol>
&lt;li>
&lt;p>&lt;code>user@remotesystem:port&lt;/code> (E.g. &lt;code>sk@192.168.225.22&lt;/code>)&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Single slash (&lt;code>/&lt;/code>) - If you want to edit a file that is stored in the $HOME directory of a remote system, you must use a trailing slash to separate remote system&amp;rsquo;s IP address or hostname from the file path.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Double slashes (&lt;code>//&lt;/code>) - To specify full path of a file, you must use double slashes. For example, let us say you are editing a file named info.txt that is located in /home/sk/Documents/ directory of your remote system. In this case, the command would be: &lt;code>vim scp://sk@192.168.225.22//home/sk/Documents/info.txt&lt;/code>&lt;/p></description></item><item><title>vimrc Configuration Guide</title><link>https://linzeyan.github.io/posts/2018/20181103-vimrc/</link><pubDate>Sat, 03 Nov 2018 23:30:52 +0800</pubDate><guid>https://linzeyan.github.io/posts/2018/20181103-vimrc/</guid><description>&lt;ul>
&lt;li>
&lt;p>&lt;a href="https://wiki.csie.ncku.edu.tw/vim/vimrc" target="_blank" rel="noopener">vimrc Configuration Guide&lt;/a>&lt;/p>
&lt;/li>
&lt;li>
&lt;p>:set nu&lt;/p>
&lt;ul>
&lt;li>Show line numbers: useful for debugging.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>:set ai&lt;/p>
&lt;ul>
&lt;li>Auto-indent: if the previous line has two tab widths, pressing Enter keeps those two tab widths on the next line.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>:set cursorline&lt;/p>
&lt;ul>
&lt;li>Cursor line: underline the current line to help locate the cursor.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>:set bg=light&lt;/p>
&lt;ul>
&lt;li>Color scheme for light backgrounds.&lt;/li>
&lt;li>The default assumes a light background (white, etc), but if your terminal background is dark purple, text may disappear (for example, comments in dark blue). Change this to :set bg=dark.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>:set tabstop=4&lt;/p></description></item></channel></rss>