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.
50 lines
2.0 KiB
50 lines
2.0 KiB
Starting
|
|
====
|
|
|
|
* Install all deps `apt update ; apt install neovim python3-neovim fzy ripgrep exuberant-ctags`
|
|
* Start `vi` (or `nvim`)
|
|
* 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) <x>, highlights next few in hit-a-hint manner
|
|
* tx / Tx: move (before/after) next <x>
|
|
* d<movement>: delete up to <any of above>, mnmenoic: *d*elete *to* <char>
|
|
* %: 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: *t*o *d*efinition
|
|
* ty: *t*o t*y*pe-definition
|
|
* ti: *t*o *i*mplementation
|
|
* tr: *t*o *r*eferences (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 your `s///`
|
|
* Misc
|
|
* ,p: toggle paste-mode
|
|
* ESC ESC: deselect search results, \*-highligh or similar
|