Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

vimwiki / markdown conflict #479

Closed
jess opened this Issue · 7 comments

7 participants

@jess

I just installed janus on a new machine and copied over my prev rc files and custom plugins. I noticed that my markdown files had different syntax and additionally my tab completion and snipmate wasn't working.

When I checked the filetype, it said vimwiki. I could force the filetype to markdown and get my sytax back, but not my tab completion or snipmate.

I tried removing my .janus dir and .vimrc.before/after, but still got the same issue.

If I disable vimwiki call janus#disable_plugin('vimwiki') everything works as expected: syntax, snipmate and tab completion.

@kalbasit kalbasit was assigned
@kalbasit
Owner

I contacted Vimwiki maintainer, if it can't be resolved I'd have to remove the plugin from Janus!

@tub78

The easiest solution to this is to change the default setting of the g:vimwiki_ext2syntax variable in your .vimrc (or Janus could make this the default) as follows:

let g:vimwiki_ext2syntax = {}

The default value of g:vimwiki_ext2syntax = {'.md': 'markdown'}. This setting tells vimwiki to recognize files with a ".md" extension, overriding previous filetype associations. See ":help vimwiki_ext2syntax".

@brow

+1

@tub78

Vimwiki's dev branch http://code.google.com/p/vimwiki/source/checkout
has already incorporated this fix. Have you tried the aforementioned setting?

let g:vimwiki_ext2syntax = {}

@kalbasit kalbasit closed this issue from a commit
@kalbasit kalbasit Vimwiki: don't mess with .md or .markdown files
TODO: Vimwiki has this option by default and will probably be released
      soon, please revert when it's released

closes #479
25208e5
@kalbasit kalbasit closed this in 25208e5
@woahdae

Note that if you want to use vimwiki in markdown mode (I great idea, IMO), you can have it all work via:

" make vimwiki use markdown syntax
let g:vimwiki_list = [{'path': '~/vimwiki/',
                     \ 'syntax': 'markdown', 'ext': '.md'}]
augroup filetypedetect
  au! BufRead,BufNewFile */vimwiki/*        set filetype=vimwiki
augroup END

I don't know why the fix wasn't to use the path to detect vimwiki files rather than break vimwiki for markdown users, but this will set things right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.