Difference between revisions of "Vi"

From MyWiki
Jump to: navigation, search
Line 13: Line 13:
 
:%!cat -s
 
:%!cat -s
 
</source>
 
</source>
 +
Vim Setting colours example - :highlight Normal ctermfg=grey ctermbg=darkblue<br>

Revision as of 13:03, 24 February 2016

Delete all white space till end of line  :%s/ *$//g

[Control][b] - Move back one full screen
[Control][f] - Move forward one full screen
[Control][d] - Move forward 1/2 screen
[Control][u] - Move back (up) 1/2 screen
Delete blank lines : :v/./d

:v/./d
or
:g/^$/d
or
:%!cat -s

Vim Setting colours example - :highlight Normal ctermfg=grey ctermbg=darkblue