Comments (17)
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.
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.
What happens if you enter in command mode
:echo g:pencil#conceallevel
?
from vim-pencil.
the output of :echo g:pencil#conceallevel
is 0
from vim-pencil.
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.
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.
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.
:echo &filetype
markdown
:echo has('conceal')
1
:echo v:version
704
echo &conceallevel
2
from vim-pencil.
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.
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.
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.
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.
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.
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.
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.
Switching to the plasticboy syntax plugin to see if I can reproduce issue. Thanks.
from vim-pencil.
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)
- View list of things concealed (or change) HOT 7
- Enable smoothscroll for soft wrap mode
- Disable <cr> mapping HOT 3
- Underline title
- Vim pencil hides/removes colorcolumn HOT 4
- Normal Mode unexpected cursor behavior HOT 6
- In soft mode, map k and j to gj and gk
- vim-pencil applies 'set nolist' in soft wrap mode?
- Why is textwidth not used for soft wrap? HOT 2
- Cleanup key remapping technique HOT 1
- blacklist for rst (restructured text) missing various highlight groups
- g:pencil#textwidth setting not applied
- SoftPencil seems doesn't work HOT 3
- Suspending autoformatting doesn't work? HOT 2
- How disable line wrap in front matter (for Hugo or Jekyll) HOT 6
- Pencil and Markdown issue with lists HOT 8
- Respect indentation of lists in Markdown
- SoftPencil on, then off, then on again -breaks navigation mappings HOT 8
- Can't enter newline when editing vimwiki markdown
- "Undefined variable" and "Invalid arguments" errors HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-pencil.