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.
config/nvim/README.md

51 lines
2.3 KiB

Starting
====
* Install all deps `apt update ; apt install neovim python3-neovim fzy ripgrep exuberant-ctags`
* Start `vi` (or `nvim`)
* Perform initial setup of plugins and modules `nvim -n -c "PlugUpgrade | PlugInstall | q | PlugUpdate | q | q" && nvim -n -c "CocInstall -sync coc-css coc-docker coc-eslint coc-git coc-gitignore coc-html coc-json coc-yaml coc-pairs coc-python coc-sh coc-tsserver coc-prettier | CocUpdateSync | UpdateRemotePlugins | q"`
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
5 years ago
nvim -n -c "PlugUpgrade | PlugInstall | q | PlugUpdate | q | q" && nvim -n -c "CocInstall -sync coc-css coc-vetur coc-docker coc-eslint coc-git coc-gitignore coc-html coc-json coc-yaml coc-pairs coc-python coc-sh coc-tsserver coc-prettier coc-docker | CocUpdateSync | UpdateRemotePlugins | q"