On Thu, 10 Mar 2011, chris M. sprite wrote:

i set two type autocmd:
1: autocmd BufEnter *.txt :call DoWordComplete()
2: autocmd FileType mail :call DoWordComplete()

error: the second way can not work. how to set the second way ?

Worksforme. What are you trying to do in DoWordComplete() that makes you think it's not working?

My test setup:
autocmd BufEnter,BufNewFile *.txt :echo "Called for .txt"
autocmd FileType mail :echo "Called for mail"

Probably easiest if you just provide DoWordComplete()'s definition.

Also, as a sanity check: What does :filetype return?  Should be:
:filetype
filetype detection:ON  plugin:ON  indent:ON

(For the FileType autocmd, only the detection:ON is strictly necessary.)

--
Best,
Ben

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to