Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vimwiki / markdown conflict #479

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

vimwiki / markdown conflict #479

jess opened this issue Nov 20, 2012 · 7 comments
Assignees
Labels

Comments

@jess
Copy link

@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
Copy link

@jeroendv jeroendv commented Nov 20, 2012

+1

1 similar comment
@tjstankus
Copy link

@tjstankus tjstankus commented Nov 25, 2012

+1

@ghost ghost assigned kalbasit Dec 4, 2012
@kalbasit
Copy link
Member

@kalbasit 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
Copy link

@tub78 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
Copy link
Contributor

@brow brow commented Jan 15, 2013

+1

@tub78
Copy link

@tub78 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
Copy link
Contributor

@woahdae 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants
You can’t perform that action at this time.