My Vim usage notes

vim configuration section


  • vim tab is set to 4 spaces
    set ts=4 (Note: ts is the abbreviation of tabstop)
    set expandtab
  • tab->空格
    :set ts=4
    :set expandtab
    :%retab!
  • Space- >tab
    :set ts=4
    :set noexpandtab
    :%retab!
    Add ! is used to process the TAB after non-blank characters, that is, all TABs. If ! is not added, only the TAB at the beginning of the line is processed.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324515641&siteId=291194637