Live Substitution In Neovim

Search for a command to run...

No comments yet. Be the first to comment.
I've slowly adding more and more lua functions into my neovim configuration, and recently I noticed a pattern for a class of functions that reach out to run shell commands that can be abstracted away. https://youtu.be/8m5ipBuopPU Telegraph.nvim Check...

Kedro can have a chatty logger. While this is super nice in production so see everything that happened during a pipeline run. This can be troublesome

In 2021 I changed the way I navigate between tmux sessions big time. Now I can create, kill, switch with ease, and generally keep work separated into
People who are quick to toss team members under a bus are not well trusted or highly thought of and it will lead to some toxic team dynamics. Building Steam While collaborating on any project there are going to be decisions made that aren't necessari...

I create this blog with one person in mind, me. There are others like me This is not completely selfish, as there are likely many others out there that think similarly to me. Everyone comes from different backgrounds and varying levels of experience...

Replacing text in vim can be quite frustrating especially since it doesn't have live feedback to what is changing. Today I was watching Josh Branchaud's Vim-Unalphabet series on Youtuve and realized that his vim was doing this and I had to have it.
I had to do a bit of searching and found a great post from vimcasts that shows exactly how to get the live search and replace highlighting using inccomand
'inccommand' 'icm' string (default "")
global
"nosplit": Shows the effects of a command incrementally, as you type.
"split" : Also shows partial off-screen results in a preview window.
Works for |:substitute|, |:smagic|, |:snomagic|. |hl-Substitute|
If the preview is too slow (exceeds 'redrawtime') then 'inccommand' is
automatically disabled until |Command-line-mode| is done.
I believe that this is a neovim only feature, add it into your
~/.config/nvim/init.vim file. You can see it in my
dotfiles
as well.
set inccommand=nosplit

Check out Josh Branchaud's great series on the Vim-Unalphabet.