80 lines
1.5 KiB
Markdown
80 lines
1.5 KiB
Markdown
# VIM
|
|
|
|
## Commands
|
|
* `:cq[uit][!]` - quit without saving and make Vim return non-zero error (i.e. exit with error)
|
|
|
|
## Plugins
|
|
* [vim-plug](https://github.com/junegunn/vim-plug)
|
|
* [How to install vim plugins](https://opensource.com/article/20/2/how-install-vim-plugins)
|
|
|
|
```vim
|
|
' part of ~/.vimrc
|
|
|
|
call plug#begin()
|
|
Plug 'preservim/NERDTree'
|
|
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
|
|
Plug 'udalov/kotlin-vim'
|
|
Plug 'editorconfig/editorconfig-vim'
|
|
Plug 'scrooloose/syntastic'
|
|
call plug#end()
|
|
```
|
|
|
|
```
|
|
:PlugInstall
|
|
:PlugUpdate
|
|
:PlugUpdate NERDTree
|
|
```
|
|
|
|
## EditorConfig
|
|
* [Home page](https://editorconfig.org)
|
|
* [Readme](https://github.com/editorconfig/editorconfig-vim#readme)
|
|
|
|
## .vimrc autoload
|
|
`set exrc`
|
|
|
|
## Colors
|
|
[How to control/configure vim colors
|
|
](https://alvinalexander.com/linux/vi-vim-editor-color-scheme-syntax/)
|
|
|
|
Example
|
|
```
|
|
set background
|
|
colorscheme desert
|
|
hi Normal ctermfg=Green guifg=Green
|
|
```
|
|
|
|
### Groups
|
|
* Comment
|
|
* Constant
|
|
* Normal
|
|
* NonText
|
|
* Special
|
|
* Cursor
|
|
* CursorLine
|
|
|
|
### Names
|
|
* cterm
|
|
* ctermfg
|
|
* ctermbg
|
|
* gui
|
|
* guifg
|
|
* guibg
|
|
|
|
### Color names
|
|
* Black
|
|
* Brown
|
|
* Gray, Grey, DarkGray, DarkGrey, LightGray, LightGrey
|
|
* Blue, DarkBlue, LightBlue
|
|
* Green, DarkGreen, LightGreen
|
|
* Cyan, DarkCyan, LightCyan
|
|
* Red, DarkRed, LightRed
|
|
* Magenta, DarkMagenta, LightMagenta
|
|
* Yellow, DarkYellow, LightYellow
|
|
* White
|
|
|
|
## TODO
|
|
Klidne bych mohl mit vim konfiguraci na githubu a jen ji simple
|
|
stanout do patricneho mista a udelan na ni load v ~/.vimrc
|
|
Cele by to vlastne mohl resit pomocny skript.
|
|
|