I\'ve looked at this but it wasn\'t too much help. Maybe I didn\'t read it too well.
Basically what I want is when I open a .txt file the settings:
set
Put this into ~/.vim/ftdetect/text.vim (this path will be slightly different on windows):
autocmd BufRead,BufNewFile *.txt setfiletype text
Then put this into ~/.vim/ftplugin/text.vim:
setlocal wrap
setlocal linebreak
It's preferable to only do the autocmd once for a filetype, and to separate it from your vimrc file.