Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've started to use Vimwiki to create a personal wiki. I'm a big fan of the plugin, but unfortunately it hijacks all my Markdown files and sets their filetype to vimwiki.

This is happening with .md and .markdown files.

How can I tell vimwiki to only change the filetype if the file is in the wiki directory I have set?

Here are the vimwiki-related lines from my .vimrc

let s:vimwiki = {}
let s:vimwiki.path = '~/Dropbox/vimwiki'
let s:vimwiki.ext = '.wiki'
let s:vimwiki.syntax = 'default'
let s:vimwiki.diary_rel_path = 'journal/'
let s:vimwiki.diary_index = 'index'
let s:vimwiki.diary_header = 'Journal'
let s:vimwiki.diary_sort = 'asc'
let s:vimwiki.ext2syntax = {'.wiki': 'default'}
let g:vimwiki_list = [s:vimwiki]

I have also tried varying values for ext2syntax, including none at all and {'.md': 'markdown'}, which I believe is the default, but I have had no luck at all with anything changing. Any .md file is set as ft=vimwiki.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

This can be accomplished by replacing the global vimwiki_ext2syntax variable. Place the following in your .vimrc

let g:vimwiki_ext2syntax = {}
share|improve this answer
    
Now you can mark your own answer as correct. –  echristopherson Oct 30 '12 at 22:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.