|
|
3 years ago | |
|---|---|---|
| .. | ||
| autoload | 3 years ago | |
| colors | 9 years ago | |
| conf.d | 3 years ago | |
| .netrwhist | 3 years ago | |
| README.md | 3 years ago | |
| coc-settings.json | 3 years ago | |
| init.vim | 3 years ago | |
README.md
Starting
- Install all deps
apt update ; apt install neovim python3-neovim fzy ripgrep exuberant-ctags - Start
vi(ornvim) - 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) , 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
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"