5 votes

Detecting the Enter and Leave of Visual mode event

September of last year, a new event was added: commit f1e8876fa2359b572d262772747405d3616db670 (tag: v8.2.3430) Author: =?UTF-8?q?Magnus=20Gro=C3=9F?= <magnus.gross@rwth-aachen.de> Date: 2021-...
  • 3,341
3 votes

Using Lua, how can I run a function whenever the cursor moves?

To run anything automatically in Vim/Neovim after an event such as a file save(BufWrite) or your cursor moving(CursorMoved) we can use an autocommand. Here is the Lua implementation for your specific ...
2 votes

vim-airline customization: parse substring from current branch name

Notice that in the example they use a:name to refer to the argument; in VimScript prior to vim9script you must prefix arguments with a: because you reference them in the "argument namespace" ...
  • 21.8k

Only top scored, non community-wiki answers of a minimum length are eligible