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 |
| i | insert |
| a | append |
| $ | move to the end of the line |
| 0 | move to beginning of the line |
| % | move to matching character |
| :tabnew | edit file in a new tab|
| gt | move to next tab |
| yy | copy current line |
| p | paste |

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

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

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.