<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Vim on Micha Kops&#39; Tech Notes</title>
    <link>https://www.hascode.com/tags/vim/</link>
    <description>Recent content in Vim on Micha Kops&#39; Tech Notes</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>Copyright © 2010 - 2025 Micha Kops. #e9d956c0c0154a221ad83c925346a8fa0e72f866</copyright>
    <lastBuildDate>Mon, 01 Mar 2010 00:00:00 +0100</lastBuildDate>
    <atom:link href="https://www.hascode.com/tags/vim/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Git Snippets</title>
      <link>https://www.hascode.com/git-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/git-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_show_commits_from_another_branch_not_contained_in_current_branch&#34;&gt;Show commits from another branch not contained in current branch&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;git cherry -v otherbranch
+ f7d6a569bb6912aac97fce9ac92c4302863fb0d9 thecommit&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_find_deleted_files&#34;&gt;Find deleted files&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;git log --diff-filter=D --summary&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_create_empty_commit&#34;&gt;Create empty commit&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;sometimes necessary for build/deploy pipelines …​&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;git commit --allow-empty -m &amp;#34;Empty-Commit&amp;#34;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_cherry_pick_without_commit&#34;&gt;Cherry pick without commit&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;git cherry-pick -n HASH&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_using_vimdiff_for_diff&#34;&gt;Using vimdiff for diff&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;set it via git config&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;git config --global diff.tool vimdiff
git config --global merge.tool vimdiff&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;set it via ~/.gitconfig&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;[diff]
    tool = vimdiff
[merge]
    tool = vimdiff&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Vim Snippets</title>
      <link>https://www.hascode.com/vim-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/vim-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_format_json_with_jq&#34;&gt;Format JSON with jq&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;:%!jq .&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_vim_plugin_manager&#34;&gt;Vim Plugin Manager&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_installation&#34;&gt;Installation&lt;/h3&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Download it from its &lt;a href=&#34;https://github.com/junegunn/vim-plug&#34;&gt;GitHub repository&lt;/a&gt; or the risky but easy way using curl:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect2&#34;&gt;
&lt;h3 id=&#34;_adding_plugins&#34;&gt;Adding Plugins&lt;/h3&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Add a plugin section to the &lt;code&gt;.vimrc&lt;/code&gt;:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;.vimrc&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;call plug#begin()
&amp;#34; The default plugin directory will be as follows:
&amp;#34;   - Vim (Linux/macOS): &amp;#39;~/.vim/plugged&amp;#39;
&amp;#34;   - Vim (Windows): &amp;#39;~/vimfiles/plugged&amp;#39;
&amp;#34;   - Neovim (Linux/macOS/Windows): stdpath(&amp;#39;data&amp;#39;) . &amp;#39;/plugged&amp;#39;
&amp;#34; You can specify a custom plugin directory by passing it as the argument
&amp;#34;   - e.g. `call plug#begin(&amp;#39;~/.vim/plugged&amp;#39;)`
&amp;#34;   - Avoid using standard Vim directory names like &amp;#39;plugin&amp;#39;

&amp;#34; Make sure you use single quotes

&amp;#34; Gruvbox Theme
Plug &amp;#39;sainnhe/gruvbox-material&amp;#39;

&amp;#34; Initialize plugin system
&amp;#34; - Automatically executes `filetype plugin indent on` and `syntax enable`.
call plug#end()
&amp;#34; You can revert the settings after the call like so:
&amp;#34;   filetype indent off   &amp;#34; Disable file-type-specific indentation
&amp;#34;   syntax off            &amp;#34; Disable syntax highlighting&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
  </channel>
</rss>
