bookmarks/cheat/vim.md
2020-07-13 18:32:05 +02:00

621 B

Remove trailing spaces

:%s/\s\+$//e

Create a password-protected file using vim:

vim -x ostechnix.txt

To remove the password, open the file using vim:

vim ostechnix.txt

And type:

:set key=

Finally type :wq to save and close the file.

Indent the whole file in VIM (src)

gg=G

Text selection (Source)

V       - selects entire lines
v       - selects range of text
ctrl-v  - selects columns
gv      - reselect block