diff --git a/Editors/Vim.md b/Editors/Vim.md new file mode 100644 index 0000000000000000000000000000000000000000..6d23e9e75b8fd032bbaf057eccee6f4d13cb12a3 --- /dev/null +++ b/Editors/Vim.md @@ -0,0 +1,47 @@ +# Vim + +Is a great editor in the console +As a Gui version there is also `gvim` + +# Configs +``` +filetype plugin indent on +" show existing tab with 4 spaces width +set tabstop=4 +" when indenting with '>', use 4 spaces width +set shiftwidth=4 +" On pressing tab, insert 4 spaces +set expandtab +``` + +# Powerline +Need to install powerline with pip + +Config: +``` +" Allow Powerline style +set rtp+=.local/lib/python3.7/site-packages/powerline/bindings/vim/ +" These lines setup the environment to show graphics and colors correctly. +set laststatus=2 +set t_Co=256 + +``` + +# YAML +Maybe use this config: +``` +" Allow YAML tab styling +autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab +let g:indentLine_char_list = ['|', '¦', '?', '?'] +``` + +# Wired backspace? + +in vim [backspace] or backwards delete leaves a wired symbol `^?` and does not delete anything? +Add this to your `~/.vimrc`: +``` +" Allow backspace +noremap! <C-?> <C-h> +``` +The source of this error relates to stty and maybe VNC. +[on stackoverflow](https://stackoverflow.com/questions/9701366/vim-backspace-leaves)