VIM🔗
| Related | =(join(this.related, ", ")) |
| References | Best cheatsheet, Cheat cheatsheet |
Basics🔗
Registers🔗
- list:
:registers "a-z: named registers
Search🔗
- find lines longer than n characters:
/\%>80v.\+
Files, buffers🔗
-
Modeline: VIM settings in file itself
- for
rootusually disabled for security
Example:
1# vim: ft=yaml tw=4 sw=4 - for
Remote file editing
1 | |
also supports sftp, http (read-only), rsync
Commands🔗
Auto-commands🔗
1 2 | |
Plugins🔗
Plugin managers
Config🔗
- editorconfig-vim: use https://editorconfig.org files
Editing🔗
- YouCompleteMe
- Needs compilation
- dependencies:
cmake,pythonXX-devel - then run
./install.pyin the plugin’s directory
- dependencies:
- Needs compilation
- sideways: move function arguments (and other delimited-by-something items) left and right
- Programming languages
- ruby
- HTML
- tagalong.vim: Change an HTML(ish) opening tag and take the closing one along as well
- vim-pandoc: pandoc integration and utilities for vim
- vim-tabular:
- article: gist for automatic indentation/tabularisation when typing for example
|
- article: gist for automatic indentation/tabularisation when typing for example
Aesthetics, customisation🔗
Color scheme highlight groups
Show highlight group used for code under cursor:
1 | |
Fancy font with fancy icons
Plugin iryanoasis/vim-devicons with patched font as described in iryanoasis/nerd-fonts.
For example font Hack
- download patched font files (ttf) from repo and copy them to a directory that is checked for fonts, for example
~/.fontsor/usr/share/fonts - rebuild font cache
fc-cache -f -v
