This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
linux:vi [2018/01/26 17:13] – [Useful Commands] tmade | linux:vi [2019/10/31 00:51] – [Useful Commands] tmade | ||
---|---|---|---|
Line 27: | Line 27: | ||
ct" | ct" | ||
. #Repeat last command/ insert etc. | . #Repeat last command/ insert etc. | ||
- | | + | :%d #Clear all lines |
==== Replace ==== | ==== Replace ==== | ||
Line 51: | Line 51: | ||
:w !sudo tee % #Save file with sudo rights | :w !sudo tee % #Save file with sudo rights | ||
:wq !sudo tee % #Save and quit file with sudo rights | :wq !sudo tee % #Save and quit file with sudo rights | ||
+ | | ||
+ | ====Visual Mode==== | ||
+ | If you can´t enter text with right mouse click, set | ||
+ | set mouse-=a | ||
+ | in file | ||
+ | ~/.vimrc | ||
| | ||
| |