1. You cannot see the tab key in the tab key file. To display it: set list now displays the tab key as ^ I, while $ is at the end of each line, so that you can find the spaces that may be ignored. One disadvantage of this is that it looks ugly when there are many tabs. If you use a color terminal or GUI mode, VIM can highlight spaces and tabs. Use the 'listchars' option: Set listchars = tab:>-, trail:-now, the tab is displayed as ">-", and the extra blank characters at the end of the line are displayed "-". It looks much better, right? ---------------------------- 2. Add the following two lines to the/etc/vimrc file in the space fedora 9 system for VIM: highlight whitespaceeol ctermbg = red guibg = red match whitespaceeol/\ s \ + $ /-------------------------- 3. Search for and replace the search and replacement ranges. If no range is specified, search for and replace the current row. Search and replace all rows. The range symbol % indicates that all rows are searched and replaced.: % S/from/to/is to find the from in the full text and replace it with. Search and replace the specified row.: 1st S/from/to/indicates search and replacement between 50th rows and rows (including 1 and 50 rows.: 45 S/from/to/indicates that only 45th rows are searched and replaced. The range of "1, $" and "%" are equivalent. -------------------------- 4. Vim multi-line indent tips keywords: Vim indent enters the visual state by V, select multiple lines, and use> or <indent or collapse. Generally, automatic indent layout is used according to language features: in the command status, use = for the current line (for two connections) or N = for multiple lines (N is a natural number) indicates that N rows are automatically indented from the current row. You can try to unindent the code and use n = for typographical layout, which is equivalent to the code format in the general ide. You can use Gg = g to typeset the entire code. Vim multi-line comments: 20, 30 s/^/#/g 20th to 30 rows are commented out.: 20, 30 s/^ # // G uncomment: 4,10 S/^ [^ I] \ + // remove the blank characters at the beginning of the line and use. To represent the current line. :., 30 s/^/#/g. You can see that the vim command is for the current row. You can add a range to the front to specify multiple rows.: CO 12: copy the current row to the location of row 12.
Enable Vim to display spaces and tab characters Vim multi-line comments (for conversion)