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 [2019/07/19 10:20] – [Edit] tmade | linux:vi [2019/10/31 00:51] – [Useful Commands] tmade | ||
---|---|---|---|
Line 28: | Line 28: | ||
. #Repeat last command/ insert etc. | . #Repeat last command/ insert etc. | ||
:%d #Clear all lines | :%d #Clear all lines | ||
- | | ||
==== Replace ==== | ==== Replace ==== | ||
Line 52: | 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 | ||
| | ||
| |