vimwiki / markdown conflict #479

Closed
jess opened this Issue Nov 20, 2012 · 7 comments

Comments

Projects
None yet
7 participants
@jess

jess commented Nov 20, 2012

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.

@jeroendv

This comment has been minimized.

Show comment
Hide comment
@jeroendv

jeroendv Nov 20, 2012

+1

+1

@tjstankus

This comment has been minimized.

Show comment
Hide comment
@tjstankus

tjstankus Nov 25, 2012

+1

+1

@ghost ghost assigned kalbasit Dec 4, 2012

@kalbasit

This comment has been minimized.

Show comment
Hide comment
@kalbasit

kalbasit Dec 4, 2012

Member

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

Member

kalbasit commented Dec 4, 2012

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

@tub78

This comment has been minimized.

Show comment
Hide comment
@tub78

tub78 Dec 10, 2012

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".

tub78 commented Dec 10, 2012

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

This comment has been minimized.

Show comment
Hide comment
@brow

brow Jan 15, 2013

Contributor

+1

Contributor

brow commented Jan 15, 2013

+1

@tub78

This comment has been minimized.

Show comment
Hide comment
@tub78

tub78 Jan 15, 2013

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 = {}

tub78 commented Jan 15, 2013

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 in 25208e5 Jan 20, 2013

@woahdae

This comment has been minimized.

Show comment
Hide comment
@woahdae

woahdae Sep 18, 2013

Contributor

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.

Contributor

woahdae commented Sep 18, 2013

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