~busykoala/vim_config

vim_config/Documentation.md -rw-r--r-- 1.6 KiB
7adff989 — Matthias Osswald Replace pdf viewer for latex. 1 year, 6 months ago

#Documentation

#General Vim

Select Word: viw Jump between splits: Ctrl w followed by h, j, k, l Duplicate selection: :t. Move to: :m42 Replace: :%s/pattern/replacement/g

#Coc

Set interpreter in project: :CocCommand python.setInterpreter

#LaTex

Use \ll to activate continuous compilation Use \lv to open SumatraPDF Use :help vimtex for more features

#Spellcheck

While typing use c-p to get suggestions.

zg -> add as correct word. zw -> add as wrong word. zug -> redo zg. zuw -> redo zw. z= -> show suggestions c-x c-k -> open suggestions in context

#Emmet (html)

Completion: <leader> , Html5: html:5 ,, Div containing ...: div>p>a ,, Selectors: ul>li.hugo ,, Numbering: tr>td#col$*5 ,,

#Editorconfig

Define filetype specific indentation, newline...

#Coc language server

gd -> definition gy -> type-definition gi -> implementation gr -> references :Format -> format selection/all

#Buffer navigation

Moving from one buffer to another can be done with: Ctrl j and Ctrl k.

#Toggling the Nerdtree

To toggle the nerdtree use ctrl n. Open nerdtree at position of current file ctrl e. It can be reloaded with r.

#Git Stuff

There is vim-gitgutter and vim-fugitive installed. They show changes and add powerful commands to handle git.

#GitGutter

For example there is: GitGutterStageHunk, GitGutterUndoHunk.

#Fugitive

For example there is :Gblame for a git blame or :Gdiff to show changes side by side.

With Ctrl p files can be searched.

#Toggle Comments

With <leader> c <space> selected lines can be toggled to be commented/uncommented.