Vim Tips Wiki
Tip 33 Printable Monobook Previous Next

created March 7, 2001 · complexity intermediate · author slimzhao · version 5.7

':set nu' enables line-numbering. Before version 7, it also shows in the on-line help which is not useful. This autocommand disables it for the help in older vim.

:au filetype help :se nonu


This is done by default in vim 7

I find it at least educational. And I would not be as strict for older versions. And please sign your comments, John :-) bastl 08:59, 26 July 2007 (UTC)

I think it is entirely too specific. I am not sure how to edit the title but a much better title would be Running COmmands Automatically for a Given File Type --Ojblass 02:06, 31 March 2009 (UTC)

I like the specificity and think it's needed because people google for specifics...when a specific problem comes up. However, "Running Commands Automatically for a Given File Type" would be an excellent topic to have linking off of these specific questions so that the pattern becomes clear. This wikia needs to allow cut and paste on the commentary for viewers. --March 3, 2012

Please see Disable beeping#Comments where I just replied that copying text from the tips works well. JohnBeckett 00:51, March 4, 2012 (UTC)