Member-only story
Neovim for a Better Integrated Experience without Plugins
I talked about configuring Neovim for a better development experience. In this article, let’s go through a few simple Neovim tricks for the same purpose, without using any plugins.
This article can be read independently from the other related articles.
- Vim/Neovim Plugins for A Better Integrated Experience
- Neovim Plugins for a Better Integrated Experience — Part 3
Integrate Command Line Tools
For developers, we like to use command-line tools without leaving our development environment.
I use VisiData which is a free, open-source tool that lets you quickly open, explore, summarize, and analyze datasets. It works with CSV files, Excel spreadsheets, SQL databases, and many other data sources.
Let’s see how to integrate VisiData with Neovim.
Using Neovim Terminal
Using the built-in Neovim terminal, I can view the file under the cursor using VisiData in a split window.
E.g. below is the key mapping we can use. <cfile>
is replaced with the path name under the cursor (like what gf
uses).
nnoremap g1 <cmd>vsplit term://vd <cfile><CR>
Using Tmux
For Tmux, I can either use a new window or pane to view the file under the cursor. E.g. the key mapping below opens the file in a new Tmux window.
nnoremap g1 <cmd>!tmux new-window vd <cfile><CR>
Send Command to Another Terminal
With just a few lines of Lua code, I can send commands to a terminal without using any plugins.