This article assumes you are using Neovim (version 0.8.0 or higher) and packer.nvim to manage your plugins. Adding the following loads the LuaSnip plugin, creates a snippet for “func”, and maps “Ctrl + p” to expand the snippet and jump through the fields.
neovim
vim.keymap.set() coc to confirm completion with lua
I’m currently rewriting my Neovim configuration using lua rather than using vimscript. I’m using the coc.nvim plugin and want to map return (
Vim JSON Format
Vim allows you to run all (or some) of your content through an external program. In this case, we want to use Python to format (i.e. pretty print) our JSON with ‘python -m json.tool’. We an also setup a Vim user defined command to reduce typing (and make it easier to remember).
Vim Easy Align Custom Rule for $
I use Junegunn’s Vim plugin vim-easy-align to make it easier to align my code. This plugin does not have a default mapping for aligning the dollar sign ($). Because the plugin is designed to be extensible, I was able to add support for aligning by the dollar sign ($) by adding some lines to my .vimrc file.
Vim Close All Buffers Except the Current One
Vim has a built-in command to close all windows except the current one (:only), which is nice for focusing on a single buffer. Sometimes I want to cleanup my buffers by closing all of the buffers except for the current one. This custom command is like :only for buffers instead of windows.
Brew Failure in Upgrading to the Development Version Neovim
I wanted to run the latest development version of Neovim (0.4.0) to use some of the latest features (e.g. the floating window). Unfortunately, my attempts to install it were failing. These are my notes on the problem and how I fixed it.