Giter Club home page Giter Club logo

Comments (17)

hiecaq avatar hiecaq commented on May 25, 2024 1

I solved this by add this setting to .vimrc:

    let g:vim_markdown_conceal = 0

But still, it would be great if these two plugins can work together smoothly.
Also in markdown since I like to use [name](url) a lot in my notes, if the conceal is enabled, lines ends up in different lengths.(that's the main reason I want to disable conceal function). It would be much better if this can be improved. (I'm using soft wrap, by the way)

from vim-pencil.

reedes avatar reedes commented on May 25, 2024 1

Ah, that makes sense. The syntax plugin was enabling conceal independently of pencil.

I'll think about how to best integrate, though I've been trying to avoid building dependencies on the syntax plugin projects beyond the blacklists.

from vim-pencil.

reedes avatar reedes commented on May 25, 2024

What happens if you enter in command mode

:echo g:pencil#conceallevel

?

from vim-pencil.

laishulu avatar laishulu commented on May 25, 2024

the output of :echo g:pencil#conceallevel is 0

from vim-pencil.

reedes avatar reedes commented on May 25, 2024

Good, that's what I'd expect. Next step, initialization.

How are you initializing pencil? With the Pencil command or with an autocmd?

Is conceal working as expected after you use the Pencil command to initialize?

If init() isn't called, then the conceallevel isn't touched by pencil.

from vim-pencil.

laishulu avatar laishulu commented on May 25, 2024

I init pencil by autocmd FileType markdown,mkd call pencil#init()
If I run :Pencil, then conceal works as expected.
It's confusing, because the state after init is called while :Pencil is not called seems in a partially initialized state, which has pencil activated, but not working as I configed.

from vim-pencil.

reedes avatar reedes commented on May 25, 2024

Hmm, so there's something strange going on with the autocmd if the Pencil command is working as expected. (The Pencil command is calling init().)

Some additional commands to run AFTER you've loaded a markdown file, where the autocmd should have been triggered to call init()...

:echo &filetype
:echo has('conceal')
:echo v:version
:echo &conceallevel

from vim-pencil.

laishulu avatar laishulu commented on May 25, 2024
:echo &filetype
markdown
:echo has('conceal')
1
:echo v:version
704
echo &conceallevel
2

from vim-pencil.

laishulu avatar laishulu commented on May 25, 2024

after I manually run :call pencil#init() when a.md is already open, all is OK. **word** show as **word** instead of word.

I don't know why. Without manually run the command, if pencil is not activated, **word** should not show as word. So why should I run the init command another time?

from vim-pencil.

laishulu avatar laishulu commented on May 25, 2024

I am just curious why you have such an intention of design to hide characters like **,
In my opinion, as an TEXT editor, any character input should be shown literally and explicitly.

from vim-pencil.

reedes avatar reedes commented on May 25, 2024

It sounds like pencil's init is behaving as expected, though it's not clear why your autocmd isn't calling init.

If you don't use pencil at all (no manual init or autocmd init) what's the value of &conceallevel?

What markdown syntax library are you using, if not the default?

As to your question regarding intention, hiding syntax is a feature that a subset of users will value, especially those of us who use fonts that can show bold and italic styles.

from vim-pencil.

laishulu avatar laishulu commented on May 25, 2024

If pencil is comment out completely from my .vimrc, I get the same result on &conceallevel.

echo &conceallevel
2

I just type **a** in a file named a.md.

from vim-pencil.

reedes avatar reedes commented on May 25, 2024

That must be the vim default if pencil isn't loaded or initialized for a buffer, assuming it's not being set by a syntax (or other plugin).

If a buffer is initialized for pencil, either manually or through autocmd, then &conceallevel should take on the value of g:pencil#conceallevel.

Is that consistent with what you're seeing?

from vim-pencil.

laishulu avatar laishulu commented on May 25, 2024

In my side, whether or not I enable pencil and related settings, I always get

echo &conceallevel
2

and If I enable pencil and related settings, I get:

:au FileType markdown
--- Auto-Commands ---
pencil  FileType
    markdown  call pencil#init()

Here is my config

" text editing, :Pencil
NeoBundle 'reedes/vim-pencil' "{{{
 " 0=disable, 1=onechar, 2=hidechar, 3=hideall (def)
 let g:pencil#conceallevel = 0
 augroup pencil
   autocmd!
   autocmd FileType markdown call pencil#init()
   autocmd FileType text call pencil#init()
 augroup END
""}}}

I am surely that pencil is activated when I open a markdown file without an extra :Pencil command.
because in this way I observed this issue: #48 😄 , which would not raise if I disable the pencil plugin.

from vim-pencil.

bhrutledge avatar bhrutledge commented on May 25, 2024

I'm also seeing this issue, but commenting out Plugin 'plasticboy/vim-markdown' from my .vimrc resolves it. I don't see it with Plugin 'tpope/vim-markdown' or Plugin 'gabrielelana/vim-markdown'.

" Plugin 'tpope/vim-markdown'
" Plugin 'gabrielelana/vim-markdown'
Plugin 'plasticboy/vim-markdown'
let g:vim_markdown_folding_disabled=1

Plugin 'reedes/vim-pencil'
let g:pencil#wrapModeDefault = 'soft'
let g:pencil#conceallevel = 0

augroup pencil
  autocmd!
  autocmd FileType markdown,mkd call pencil#init()
augroup END

from vim-pencil.

reedes avatar reedes commented on May 25, 2024

Switching to the plasticboy syntax plugin to see if I can reproduce issue. Thanks.

from vim-pencil.

Syndamia avatar Syndamia commented on May 25, 2024

I have uninstalled vim-pencil and it still conceals. This is my output from the commands reedes proposed:

:echo &filetype
markdown
:echo has('conceal')
1
:echo v:version
801
echo &conceallevel
2

The only way I can turn them off is by doing setl conceallevel=0 in the opened file. let g:vim_markdown_conceal = 0 doesn't work.

Edit: I'm sorry, it was a problem with another plugin, Yggdroot/indentLine. If anyone is having this issue, read this comment.

from vim-pencil.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.