New answers tagged


To avoid false positives with a pattern like *markdown*, use * and then filter in the code that you run from the autocmd: autocmd FileType * call s:CheckMarkdown() function s:CheckMarkdown() if match(&filetype, '\v<markdown>') != -1 return endif " ... run your desired side-effects endfunction


What you are missing is the (highly subjective) organization. Ideally each of the lines would be in separate files, which makes debugging easier and helps you to group things together. In other words, do you immediately know what filetypes you overrule by looking at the name ftdetect/mine.vim? What about ftdetect/vim_test.vim and ftdetect/h_test.vim? As ...


First as a general advice, :h :verbose is a good way to debug stuff with Vim: *:verb* *:verbose* :[count]verb[ose] {command} Execute {command} with 'verbose' set to [count]. If [count] is omitted one is used. ":0verbose" can be used to set 'verbose' to zero. So using :verbose set ft? in the ...

Top 50 recent answers are included