How do I split long lines in a .vimrc file?

Hit :help line-continuation.

Basically you have to add \ at the beginning of the continued line.

So instead of writing

autocmd FileType python set smartindent \
    cinwords=if,elif,else,for,while,try,except,finally,def,class,with

you have to write

autocmd FileType python set smartindent
       \ cinwords=if,elif,else,for,while,try,except,finally,def,class,with

Leave a Comment