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

How to disable syntax conceal? #253

Closed
chengyi818 opened this issue Feb 8, 2016 · 10 comments
Closed

How to disable syntax conceal? #253

chengyi818 opened this issue Feb 8, 2016 · 10 comments

Comments

@chengyi818
Copy link

when I'm writting my blog,I want to edit the url link clearly.so my .vimrc looks like this:

set conceallevel = 0    

after source vimrc,markdown still conceal the url link.
Did I make something wrong?THX for help.

@shirosaki
Copy link
Collaborator

Spaces around = doesn't work.
set conceallevel=0

You can check current setting:
:setl conceallevel
or
:set conceallevel

@chengyi818
Copy link
Author

@shirosaki Thankyou for help.
According to your instruction,I have already set conceallevel=0 and source it,but it doesn't work.
I use :set conceallevel to confirm my action,conceallevel still equals to 2.
If I use :setl conceallevel=0,it can temporarily work.

@shirosaki
Copy link
Collaborator

conceallevel is not modified in vim-markdown. Other plugins might set conceallevel=2 if you install some other plugins.

This may help you.
au FileType markdown setl conceallevel=0

@chengyi818
Copy link
Author

@shirosaki Thanks
I have installed plugin indentLine which always set conceallevel to 2 as default.
After I change configuration about indentLine,everything is fine.

@wnear
Copy link

wnear commented Jun 12, 2020

Is there a way to automatically disable syntax conceal when on insert mode, enable on normal mode.

@alerque
Copy link
Member

alerque commented Jun 12, 2020

@wnear In VIM the autocmd system lets you do pretty much anything triggered by pretty much any event. Nothing to do with this plugin specifically, you can set anything you want based on whatever events you want.

@wnear
Copy link

wnear commented Jun 12, 2020

autocmd InsertEnter  *.{markdown,md} set conceallevel=0
autocmd InsertLeave  *.{markdown,md} set conceallevel=2

@alerque I add this. It works. But I still have a few thoughts:

  1. this is a pretty fundamental feature, when Someone want to edit the link or image. So it's the markdown plugin's duty to deal with this.
  2. the autocmd method isn't so elegant. The perfect layout should be like this: only the needed part(the img/link/code paragraph the cursor is in) is expanded to the raw format , while other places stay the same.

@alerque
Copy link
Member

alerque commented Jun 12, 2020

@wnear Both of your points are already the way it work out of the box. You would only need to write your own hooks if you want something else. I assumed you wanted to have all conceals shown instead of just the current line when editing. By default conceal is turned off for the current line while in insert mode.

@aaronkjones
Copy link

aaronkjones commented Aug 28, 2021

To disable for the indentLine plugin, let g:indentLine_conceallevel = 0

@antofthy
Copy link

Nothing worked for me until I had BOTH of these....

  let g:conceallevel = 0
  let g:indentLine_conceallevel = 0

But now indent markings no longer work! Making the whole indentLine module sort of useless!

It is all just so stupid!

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

No branches or pull requests

6 participants