RSS Amplifier

~aorith · Apr 24, 2026

neovim

0
Sign in to vote or save

This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.

I started using neovim when v0.5.0 was released, that version was the first to introduce init.lua as your starting point. I was happy with vim, but always found vimscript cumbersome to use. I like to customize my editor a bit, nothing really complicated or defying the defaults, but you know, some QoL mapping here, a time-saving function there... and vimscript was setting me back. Lua is a very…

I started using neovim</a> when v0.5.0</code> was released, that version was the first to introduce init.lua</code> as your starting point. I was happy with vim, but always found vimscript cumbersome to use. I like to customize my editor a bit, nothing really complicated or defying the defaults, but you know, some QoL mapping here, a time-saving function there... and vimscript was setting me back.</p>

Lua is a very simple language and contrary to vimscript, I don't need to be constantly searching how to properly create a function, iterate a table or interact with my system like I did with vimscript.</p>

It has been a long time since neovim v0.5.0</code>, we are as of the time I'm writing this on the v0.12.2</code> release. This release is the first one that makes me realize that neovim is becoming a really stable editor (at last!).</p>

One such feature is a proper built-in package manager, thanks to the help of multiple contributors but specifically echasnovski</a> since it was based on mini.deps</code> which is part of mini.nvim</a>.</p>

I have to say that the work of Evgeni has improved the neovim plugin ecosystem and neovim itself. I follow his work closely and you can tell that he puts a lot of effort into code quality, user experience and details in general.</p>

I'm a fan of the KISS principle and never liked bloated configurations with tons of plugins and/or over-engineered workflows. Those tend to break soonish and force you to spend time fixing your editor instead of doing actual work. Not to mention the danger of suffering a supply chain attack which grows with each additional external dependency that you have.</p>

But as I said, I do like to customize my editor with small QoLs. One such example of that is a simple and small terminal wrapper function that I have configured with a default action on some filetypes:</p>

_G</span>.</span>Config</span> =</span> {}</span></span>
</span>
--</span> Define a custom function to run commands in a terminal.</span></span>
Config</span>.</span>run_in_terminal</span> =</span> function</span>(</span>cmd</span>)</span></span>
  if</span> cmd</span> ==</span> nil</span> or</span> cmd</span> ==</span> '</span>' </span>then</span></span>
    vim</span>.</span>ui</span>.</span>input</span>({ </span>prompt</span> =</span> '</span>Command to run: </span>' </span>}, </span>function</span>(</span>input</span>)</span></span>
      if</span> input</span> and</span> input</span> ~=</span> '</span>' </span>then</span> Config</span>.</span>run_in_terminal</span>(</span>input</span>) </span>end</span></span>
    end</span>)</span></span>
    return</span></span>
  end</span></span>
</span>
  vim</span>.</span>cmd</span>(</span>'</span>terminal </span>' </span>..</span> cmd</span>)</span></span>
end</span></span>
</span>
vim</span>.</span>api</span>.</span>nvim_create_user_command</span>(</span></span>
  '</span>Term</span>'</span>,</span></span>
  function</span>(</span>opts</span>)</span> Config</span>.</span>run_in_terminal</span>(</span>opts</span>.</span>args</span> ~=</span> '</span>' </span>and</span> opts</span>.</span>args</span> or</span> nil</span>) </span>end</span>,</span></span>
  { </span>nargs</span> =</span> '</span>?</span>'</span>, </span>desc</span> =</span> '</span>Run command in a terminal</span>' </span>}</span></span>
)</span></span></code></pre>

As you can see, run_in_terminal</code> is a thin wrapper around :terminal</code>, it doesn't do much:</p>

Read on /blog/neovim/

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.