DISQUS

dmiessler.com | grep understanding: 7 Relatively Unknown But Very Powerful Vim Features

  • Tim · 2 years ago
    better text for #7 here:

    if has("syntax)
    syntax on
    endif

    Keeps you from getting a warning if your copy of vim doesn't have syntax highlighting turned on.

    I also like to set my tabstop/shiftwidth to 4 (because 8 gets *really* messy when you nest enough if statements). Also, if you set one and not the other, I've found that some freaky stuff happens:

    set tabstop=4
    set shiftwidth=4