Fix lazy.nvim Local Changes That Block vimdoc-ja and copilot.lua Updates

Reset dirty vimdoc-ja and copilot.lua trees before lazy.nvim updates

On a Linux machine I opened Neovim, ran :Lazy update, and it stopped with Failed (2). The problem was not only doc/tags-ja in vimdoc-ja. .gitattributes and .github/workflows/format.yml in zbirenbaum/copilot.lua were also treated as “local changes”. I had seen the same error on vimdoc-ja alone before, and I had put in a workaround that ran git checkout -- doc/tags-ja on LazyUpdatePre. That was not enough this time. The symptom The message that showed up at startup was the following. [Read More]
Categories: editor  Tags: neovim vimdoc-ja copilot lua 

Moving to init.lua on Neovim 0.11 and the E5422 Config Conflict

Migrating from init.vim to init.lua in Neovim 0.11: Complete Guide

I migrated the NeoVim configuration I set up in Reviewing my Zsh and NeoVim configuration over to Lua. TL;DR Neovim 0.11.5 assumes Lua, so moving from init.vim + vim-plug toward init.lua + lazy.nvim gives you a big return. For completion, blink.cmp is a strong choice these days. The 0.11 trap: init.lua and init.vim cannot live side by side (E5422: Conflicting configs). A staged migration takes some ingenuity. While I was at it: NERDTree→oil.nvim, hand-written brackets→nvim-autopairs, IME→Lua autocmd, cursor shape→guicursor. Background In the Neovim 0.11 generation, the ecosystem of LSP, diagnostics and the surrounding plugins moves ahead on the premise of Lua. If you keep maintaining a Vimscript-centred setup, [Read More]
Categories: editor  Tags: neovim lua 

A CLI Command That Only Updates Neovim Plugins

Just a command to update the neovim plugin

I only just learned the command that updates plugins in a Neovim (Vim) setup that uses vim-plug.

Until now I opened nvim, opened the : command window, and typed :PlugUpdate.
That is fine for a single machine, but repeating the same steps on several hosts is tedious.
It turns out you can run it from the command line as well.

$ nvim +PlugUpdate +qall

With this, you can drop it into a script or an Ansible playbook.

Categories: editor  Tags: neovim vim-plug 

Rebuilding My Zsh and Neovim Setup from Scratch in 2022

Zsh+zinit and NeoVim+vim-plug

I have been a fan of the Zsh shell on Linux and elsewhere for a long time, and lately I have even flirted with fish, but I took another look at my configuration files for the first time in ages. I had been managing my shared configuration files (dotfiles) on GitHub, and to my surprise the last update turned out to be about 10 years ago. (@_@) The configuration files were quite old too, and various helper tools and plugins have changed, so I reviewed everything from scratch. [Read More]
Categories: Shell editor  Tags: zsh neovim 

Show Invisible Characters in Vim

Show whitespace and tabs while editing in Vim

Once you get used to Python layout and Markdown, there are times you want Vim to visualize blank lines and tabs.

Show them temporarily in Vim

: set list
: set listchars=tab-,trail:-,eol:↲,extends,precedes,nbsp:%,space:_

Show them permanently

Add the following to ~/.vimrc

set list
set listchars=tab-,trail:-,eol:↲,extends,precedes,nbsp:%,space:_

Turn the display back off

Inside Vim,

:set nolist

Reference

[Changing listchars colors for tabs, spaces, newlines, and so on in Vim (in Japanese)] (https://qiita.com/pollenjp/items/459a08a2cc59485fa08b )

ItemDescription
set listShow invisible characters
set listcharsConfigure which characters to use
tabShow tab characters
trailShow trailing spaces
eolShow newlines
spaceShow spaces
Categories: Editor  Tags: Vim