nvim/vim links cheatsheet and notes
I really enjoy the vim-style editor experiance. vi/vim/nvim/neovim nuggets, mappings, scripts, plugins that I find useful and use on a day-2-day basis. 80% neovim, 10% ideavim, 5% vsvim...
Resources
Questions
- Q: How to toggle a setting?
A:set invspell
-> +inv{setting}:w
orset spell!
(NOTE: ! suffix, prefix means something else). True -> False -> True. Useset spell?
to read the value. - Q: Close all buffers except current
A: stack-overflow - Q: Explore files current dir?
A: stack-overflow - Q: How to exclude
node_modules
, dotnetpackages
from vimrep
A:set wildignore+=node_modules/**,packages/**
stack-overflow
Hint & mappings
[<space>
add blank line before,]<space>
add blank line after -- stays in NORMAL mode. @tpope/vim-unimpaired- Get special chars
:digraph
-<C+k> + xx
- In VISUAL mode press
o
to toggle between start/end of selection. - Toggle search hilighting
:set hlsearch!
, show current:set hlsearch?
Lua / Scripting
- lua: detect os
vim.loop.os_uname().sysname
The extended VIM universe
- Embed neovim in the browser: https://github.com/glacambre/firenvim
Git / Fugative
:help Git
compare to master
Gvdiffsplit master
zR - remove all folding
[]c - prev/next change/git hunk