In /usr/share/vim/vim73/filetype.
vim I see following autocommand
au BufNewFile,BufRead *.txt,*.text setf text
This means that that *.txt files are already set to filetype "text".
Now the setfiletype in asciidoc_filetype.vim cannot reset the filetype.
I see no problem in changing the "setfiletype asciidoc" at the end of
successful detection of the AsciiDoc file to "set filetype=asciidoc"
Here is the patch:
--- asciidoc_filetype.vim.orig 2013-09-14 01:57:38.868457046 +0200
+++ asciidoc_filetype.vim 2013-09-14 01:56:44.716188524 +0200
@@ -10,8 +10,8 @@
" The first sets asciidoc syntax highlighting on all .txt files, the second
" only existing files *.txt that appear to be AsciiDoc files.
-au BufNewFile,BufRead *.asciidoc,*.txt,README,TODO,CHANGELOG,NOTES
setfiletype asciidoc
-"au BufRead *.txt,README,TODO,CHANGELOG,NOTES call s:FTasciidoc()
+"au BufNewFile,BufRead *.asciidoc,*.txt,README,TODO,CHANGELOG,NOTES
setfiletype asciidoc
+au BufRead *.asciidoc,*.txt,README,TODO,CHANGELOG,NOTES call s:FTasciidoc()
" This function checks for a valid AsciiDoc document title after first
" skipping any leading comments.
@@ -47,7 +47,7 @@
if len < len(line) - 3 || len > len(line) + 3
return
endif
- setfiletype asciidoc
+ set filetype=asciidoc
endfunction
" vim: et sw=2 ts=2 sts=2:
--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/asciidoc.
For more options, visit https://groups.google.com/groups/opt_out.