Skip to content

Instantly share code, notes, and snippets.

@nelstrom
Created April 20, 2010 15:54
Show Gist options
  • Save nelstrom/372671 to your computer and use it in GitHub Desktop.
Save nelstrom/372671 to your computer and use it in GitHub Desktop.
" Switch wrap off for everything
set nowrap
if has("autocmd")
" This is probably in your .vimrc already. No need to duplicate!
filetype plugin indent on
" Set File type to 'text' for files ending in .txt
autocmd BufNewFile,BufRead *.txt setfiletype text
" Enable soft-wrapping for text files
autocmd FileType text,markdown,html setlocal wrap linebreak nolist
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment