You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2.0 KiB
2.0 KiB
Starting
- Install all deps
apt update ; apt install neovim python3-neovim fzy ripgrep exuberant-ctags - Start
vi(ornvim) - Upgrade plugin / plugs:
:PlugUpgrade⇒:PlugInstall⇒:PlugUpdate - Upgrade remote-exts:
:UpgradeRemotePlugins - Install COC stuff: for i in coc-[css,docker,eslint,git,gitignore,html,json,yaml,pairs,python,sh,tsserver,prettier]:
:CocInstall $i
Useful Shortcuts
- File/Buffer management:
- C-p: fuzzy quick open (also buffer switch)
- gn / gp: switch next/prev buffer
- gd: close buffer
- Split management:
- C-w C-s / C-w C-v: split horizontal (s), vertical (v)
- C-w C-w: switch splits
- C-w C-q: quit (current) split
- Movement:
-
hjkl: char left/right/up/down
-
e / b: move (word) forward / backward
-
E / B: move delimited setence-split (a bit more than word)
-
{ / }: move paragraphs (codeblocks) up / down
-
gg / G: begin/end of buffer
-
fx / Fx: find (next/prev few) , highlights next few in hit-a-hint manner
-
tx / Tx: move (before/after) next
-
d: delete up to , mnmenoic: delete to
-
%: matching bracket
-
^ / $: line begin/end
-
v: char-select-mode (
:-any-command while in select will apply command on selection) -
V: line-selectmode (
:-any-command while in select will apply command on selection) -
C-v: visual select (horizontal+vertical), useful with I afterwards (insert-mode for multiple lines, edit first line, apply to all selected afte ESC)
-
- Coding stuff
- tb: tagbar
- rn: rename symbol under cursor
- td: to definition
- ty: to type-definition
- ti: to implementation
- tr: to references (actually find/list usages)
- ,f:
rg/grep for symbol under cursor - K: documentation of symbol under cursor
- *: find/highlight symbold under cursor
- =: auto-indent (useful with V line-select)
:<…>s///: regex search/replace.%s///for global, or V then : then just type yours///
- Misc
- ,p: toggle paste-mode
- ESC ESC: deselect search results, *-highligh or similar