vim – Good to know
What is vim?
Vim is a highly configurable text editor, making text-editing efficient (note: not easy). It’s present on most unix/linux-based systems.” (vim.org)
Why using vim?
When there is no other text-editor available on any Unix/Linux/x-System, there is vi.
It’s not easy to use, but fun.. For more reasons see (hackernoon.com). Personally i use vim to edit config files. For other stuff, i prefer VSCode, Geany, mousepad.
Keys (Basics):
Sorted by my personal usage. For reference see (https://vim.rtorr.com/)
| Command | Result |
|–|–|
| : | switch to command-mode |
| :wq! | Save and really exit |
| dd | Delete current line |
| :%d | Delete whole file |
| i | insert |
| a | append |
| $ | move to the end of the line |
| 0 | move to beginning of the line |
| % | move to matching character |
| yy | copy current line |
| p | paste |
| :tabnew | edit file in a new tab|
| gt | move to next tab |
Keys (my setting):
| Command | Result |
|–|–|
| Ctrl+n | Open NerdTree |
| Ctrl+f | Open Ag Search |
| Ctrl+g | Open Search |
Basics:
Howto:
https://help.ubuntu.com/community/VimHowto
https://vim.works/
Vim tabs
vim Windows
Plugins:
https://www.tabnine.com/blog/top-vim-plugins/
https://vimawesome.com/
Config:
See, if .vimrc is loaded (source)
strace -o vim_strace vim
Basics-Config:
https://vim.fandom.com/wiki/Example_vimrc
https://www.drumm.sh/blog/vim-python-dev-environment/
see also sample dotfiles:
https://github.com/ceedee666/devenv-dotfiles