Vim Configuration:
Set nocp
Set Ru
Set HLS
Set is
Syntax on
Set backspace = indent, EOL, start
Set Sw = 4
Set Ts = 4
Set list
Set listchars = tab:>-, trail: % # use-to display the vim Tab key, and use $ to display the Space key.
Set Sm
Set CIN
Colo slate
Set guifont = courier \ new \ 10
Map <F3>! G ++ %-O mainutocmd filetype Python setlocal et sta Sw = 4 STS = 4
========================================================== ========================================================== ====
Remove unnecessary spaces at the end of a line:
: % S/\ s \ + $/g
: 1, $ S/\ s \ + $/g
% Or 1, $ global search
\ S indicates space.
\s \S : : : : : : : : : : : : : : : : a white space, a non-white space
\ + Indicates Matching 1 to n
\= * \+ : : : : match 0::1, 0::1, 1::1 of preceding atoms
$ Indicates the end of a row
^ $ : : : : : : : : : : : : : : : : : : : : : : : : : rst, last character of line
You can also write this statement:
: % S = * $ =
= Is the separator of the command, and is similar/
========================================================== ========================================================== ===