<?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 WormBytes</title><link>https://www.wormbytes.ca/tags/vim/</link><description>Recent content in Vim on WormBytes</description><generator>Hugo -- gohugo.io</generator><language>en-ca</language><managingEditor>Robert James Kaes</managingEditor><copyright>Robert James Kaes. All Rights Reserved.</copyright><lastBuildDate>Mon, 30 Jan 2023 15:18:40 -0500</lastBuildDate><atom:link href="https://www.wormbytes.ca/tags/vim/index.xml" rel="self" type="application/rss+xml"/><item><title>Lazy Loading Neovim Plugins</title><link>https://www.wormbytes.ca/2023/01/30/neovim-lazy-loading/</link><pubDate>Mon, 30 Jan 2023 15:18:40 -0500</pubDate><author>Robert James Kaes</author><guid>https://www.wormbytes.ca/2023/01/30/neovim-lazy-loading/</guid><description>&lt;p&gt;A couple of weeks ago I decided to redo my &lt;a href="https://neovim.io/"&gt;Neovim&lt;/a&gt;
configuration and lean into &lt;a href="https://www.lua.org/"&gt;Lua&lt;/a&gt;. The goal was to
optimize startup performance and improve usability.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Follow along with &lt;a href="https://github.com/rjkaes/neovim-dotfiles"&gt;my neovim dotfiles repo&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For years, I used &lt;a href="https://github.com/junegunn/vim-plug"&gt;Plug&lt;/a&gt; to manage my
vim plugins, but after seeing &lt;a href="https://github.com/tjdevries"&gt;TJ DeVries&lt;/a&gt;
experiment with &lt;a href="https://github.com/folke/lazy.nvim"&gt;lazy.nvim&lt;/a&gt;, I decided to
go all in!&lt;/p&gt;
&lt;p&gt;By far, the biggest challenge was learning Lua 5.1. All the scripting
languages I&amp;rsquo;ve used in the past (&lt;a href="https://www.ruby-lang.org/en/"&gt;Ruby&lt;/a&gt;,
&lt;a href="https://www.perl.org/"&gt;Perl&lt;/a&gt;, &lt;a href="https://www.python.org/"&gt;Python&lt;/a&gt;) emphasize a
&amp;ldquo;batteries included&amp;rdquo; approach. Lua, in contrast, felt like I had to assemble
everything from tiny parts.&lt;/p&gt;
&lt;p&gt;Once I got past the Lua hurdle, the rest of the conversion was
straightforward. Most of the time I could swap out Vimscript with
neovim Lua API methods via a &lt;abbr title="regular expression"&gt;regexp&lt;/abbr&gt;.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m pleased with the results. Startup time is faster, there are fewer weird
bugs, and I understand all the configurations.&lt;/p&gt;</description></item><item><title>Enabling Vim Rails</title><link>https://www.wormbytes.ca/2018/01/17/enabling-vim-rails/</link><pubDate>Wed, 17 Jan 2018 11:17:42 -0500</pubDate><author>Robert James Kaes</author><guid>https://www.wormbytes.ca/2018/01/17/enabling-vim-rails/</guid><description>&lt;p&gt;&lt;a href="https://github.com/tpope/vim-rails"&gt;vim-rails&lt;/a&gt; is enabled only if
&lt;code&gt;config/environment.rb&lt;/code&gt; is present in the
&lt;a href="https://www.rubyonrails.org/"&gt;Rails&lt;/a&gt; working directory.&lt;/p&gt;
&lt;p&gt;At work, we have an engine based working directory that does not contain this
file (as there&amp;rsquo;s an embedded application within the engine.)&lt;/p&gt;
&lt;p&gt;To enable vim-rails, I need to do:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a2f"&gt;echo&lt;/span&gt; &lt;span style="color:#b44"&gt;&amp;#34;load ::File.expand_path(&amp;#39;../../embedded-app/config/environment.rb&amp;#39;,__FILE__)&amp;#34;&lt;/span&gt; &amp;gt;&amp;gt; config/environment.rb
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mkdir -p .git/info
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a2f"&gt;echo&lt;/span&gt; &lt;span style="color:#b44"&gt;&amp;#34;config/environment.rb&amp;#34;&lt;/span&gt; &amp;gt;&amp;gt; .git/info/exclude
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Within the repo to enable vim-rails support.&lt;/p&gt;</description></item></channel></rss>