Changes

Vim Tips

736 bytes added, 08:51, 8 June 2007
The following lines were added (+) and removed (-):
== Part I: Best of VIM Tips by David Rayner ==== Part II: Additional VIM Tips added by WiKi Users ===== replace tabs with 2 spaces === :1,$s/\('''^I'''\)/  /g note: the '''^I''' is the result of simply pressing the TAB key.  That is the escape code for a TAB.=== tell vim to insert spaces when the tab key is pressed === set expandtab set tabstop=2 retabnote: the tabstop tells vim how many spaces to use for a tab, and the retab changes all the tabs you entered before turning on expandtab into spaces.=== parameter in your text files telling vim how to render file === vim: textwidth=80note: put this at the bottom of the text file.  when you open the file in vim it will set the width to 80 columns for that file.
Bureaucrat, administrator
16,192
edits