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

vim-pipe loads html command for markdown #11

Open
jhessin opened this issue Jan 1, 2020 · 1 comment
Open

vim-pipe loads html command for markdown #11

jhessin opened this issue Jan 1, 2020 · 1 comment

Comments

@jhessin
Copy link

jhessin commented Jan 1, 2020

Hello,
Firstly vim-pipe is awesome! It is super useful for all of my development.
The only issue I am having is in trying to use ftplugin directory to manage my b:vimpipe_command.

It tends to work well in everything but my markdown files. Here are the relevant files:

ftplugin/html.vim

set foldmethod=manual
nnoremap <buffer> <localleader>f zfit
onoremap T it

let b:vimpipe_command="lynx -dump -stdin"

ftplugin/markdown.vim

let b:vimpipe_command="multimarkdown | lynx -dump -stdin"

Now when I load my README.md file I would expect b:vimpipe_command to be "multimarkdown | lynx -dump -stdin" but it is actually just "lynx -dump -stdin" and that is what is run. I commented out the line in my html and it works fine then.

I have checked and ":set filetype" returns markdown as expected.

@mperry2
Copy link

mperry2 commented May 13, 2022

This is being caused by Vim's markdown plugin which is including the html plugin at the start. You can view it by opening $VIMRUNTIME/ftplugin/markdown.vim.

I was able to work around this by adding the following lines in ftplugin/html.vim just before setting the vimpipe_command variable.

if &filetype ==# 'markdown'
  finish
endif

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