neomutt / neomutt.vim

🔧 vim syntax for neomuttrc
GNU General Public License v2.0
39 stars 7 forks source link

documentation about how to properly configure Vim's filetype to neomuttrc #2

Closed marak8 closed 5 years ago

marak8 commented 6 years ago

Currently with this plugin installed Vim sets muttrc filetype for ~/.muttrc. Of course you can set filetype for static paths but that's inconvenient as everyone organizes their NeoMutt configurations differently. Please see this question for what would I like to achieve: https://stackoverflow.com/questions/48104686/vim-set-filetype-in-autocmd-filetype

flatcap commented 6 years ago

I've tried the following: autocmd FileType muttrc setl filetype=neomuttrc<CR>

Er, that gives me an error, but without the <cr> it works as expected:

The other thing I tried (and it worked) was: autocmd BufNewFile,BufReadPost ~/.muttrc setl filetype=neomuttrc

Another alternative is to be forceful and add a Vim modeline at the end of the file # vim: filetype=neomuttrc

Vim's help has some other suggestions under :help new-filetype

sheoak commented 5 years ago

It works now, isn't it? Should this ticket be closed, or is it just working on neovim without configuration?