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

Markdown folding borked in latest vim-gtk3 (8.0) in Debian Stretch #122

Open
luxpir opened this issue Oct 11, 2017 · 1 comment
Open

Markdown folding borked in latest vim-gtk3 (8.0) in Debian Stretch #122

luxpir opened this issue Oct 11, 2017 · 1 comment

Comments

@luxpir
Copy link

luxpir commented Oct 11, 2017

The version mentioned in the title has this plugin under ftplugins dated more recently than the code in this repo. Took me a while to figure out the repo is still more up to date. That'll need a quick change in the code here, perhaps.

Then I tried to install this plugin to after/ because it's a filetype plugin, as per the docs. Using :scriptnames I see that it loads the syntax file OK, last, but doesn't load the ftplugin file. So I source it manually and it works. This isn't how the after/ dir is supposed to work though, right?

I tried adding a source line with exact working dir in .vimrc, but while that loaded it in, it didn't work (i.e. folding still didn't work). Only sourcing it from after/ manually works for me, which obviously is not ideal.

Also tried replacing the files manually in the runtime directory... no dice.

What am I missing?

@scolsen
Copy link

scolsen commented Oct 23, 2018

Don't know if there's any compatibility issues with vim-gtk3, but you should be able to activate folding by adding the following line to your .vimrc if this plugin exists in your shared vim directory:

let g:markdown_folding = 1

There shouldn't be any need for the after/ dir if you want to use the folding provided by this plugin. AFAIK, usually this plugin is included with vim 8.0 by default. To check, see if markdown.vim exists in /usr/share/vim/.../ftplugin/. If so, and if its contents match the file in this repo, the above solution should suffice. The relevant code is:

if has("folding") && exists("g:markdown_folding")

If vim-gtk-3 doesn't include the folding code, you may need to install this as a separate plugin. Checkout vim plugin managers for the easiest way to do that: https://github.com/tpope/vim-pathogen, https://github.com/k-takata/minpac

I have a PR for updating the README to include this information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants