<?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 Lloyd Rochester's Geek Blog</title><link>https://lloydroc.github.io/categories/vim/</link><description>Recent content in Vim on Lloyd Rochester's Geek Blog</description><generator>Hugo</generator><language>en</language><copyright>Copyright © 2025, Lloyd Rochester.</copyright><lastBuildDate>Sat, 11 Apr 2020 00:00:00 +0000</lastBuildDate><atom:link href="https://lloydroc.github.io/categories/vim/index.xml" rel="self" type="application/rss+xml"/><item><title>VIM formatting JSON</title><link>https://lloydroc.github.io/post/vim/format_json/</link><pubDate>Tue, 28 Jan 2020 08:44:41 +0000</pubDate><guid>https://lloydroc.github.io/post/vim/format_json/</guid><description>&lt;h1 id="hahahugoshortcode103s0hbhb">VIM formatting JSON&lt;/h1>
&lt;p>Have you ever needed to format some gnarly JSON that is unreadable and/or too large to look through? It&amp;rsquo;s super easy to format it with &lt;code>vim&lt;/code>. We can use the popular &lt;code>jq&lt;/code> tool - link at the end of this blog post.&lt;/p>
&lt;h2 id="simple-steps-to-format-json-in-vim">Simple Steps to format JSON in VIM&lt;/h2>
&lt;p>Here is an example with a file called &lt;code>hello.json&lt;/code>.&lt;/p>
&lt;ul>
&lt;li>Open a file &lt;code>vim hello.json&lt;/code>&lt;/li>
&lt;li>Open the file in VIM &lt;code>vim hello.json&lt;/code>&lt;/li>
&lt;li>We can format with the command &lt;code>:%!jq . -&lt;/code>&lt;/li>
&lt;li>Save the file &lt;code>:wq&lt;/code>&lt;/li>
&lt;/ul>
&lt;h2 id="explanation">Explanation&lt;/h2>
&lt;p>All we need is the command &lt;code>:%!jq . -&lt;/code>. Let&amp;rsquo;s break this command down.&lt;/p></description></item><item><title>Copy Paste with Neovim in WSL</title><link>https://lloydroc.github.io/post/vim/wsl-neovim-copy-paste/</link><pubDate>Tue, 25 Jun 2019 00:00:00 +0000</pubDate><guid>https://lloydroc.github.io/post/vim/wsl-neovim-copy-paste/</guid><description>&lt;figure>&lt;img src="https://lloydroc.github.io/assets/svg/yank.svg">
&lt;/figure>

&lt;h1 id="hahahugoshortcode104s1hbhb">Copy Paste with Neovim in WSL&lt;/h1>
&lt;p>Copy (Yank) and Paste doesn&amp;rsquo;t work in &lt;a href="https://neovim.io/doc/user/provider.html">neovim&lt;/a> because it cannot access the System Clipboard on WSL - Windows Subsystem Linux. This simple small hack solves this issue. This hack works without having to install X Windows or any other tools.&lt;/p>
&lt;p>&lt;strong>Update &lt;a href="https://github.com/neovim/neovim/wiki/FAQ#how-to-use-the-windows-clipboard-from-wsl">Neovim Official Solution&lt;/a>&lt;/strong>. The solution posted in this blog post works, however, at the time there was no official solution. Now see the official solution using the &lt;code>win32yank&lt;/code> binary. I honestly have not tried the solution posted herein for sometime as I no longer have WSL. There maybe a &lt;code>neovim&lt;/code> clipboard provider that works and is built in. In the solution provided we create a pair of Unix scripts to act as that provider if you don&amp;rsquo;t have the &lt;code>win32yank&lt;/code> binary.&lt;/p></description></item></channel></rss>