2019-08-09 04:55:12 +02:00
|
|
|
### Remove trailing spaces
|
|
|
|
|
|
|
|
`:%s/\s\+$//e`
|
2019-08-09 04:58:57 +02:00
|
|
|
|
|
|
|
### 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.
|
2019-10-13 13:24:09 +02:00
|
|
|
|
|
|
|
### Indent the whole file in VIM ([src](https://stackoverflow.com/questions/506075/how-do-i-fix-the-indentation-of-an-entire-file-in-vi))
|
|
|
|
|
|
|
|
`gg=G`
|