Closed yamsu closed 1 year ago
Quick work around is to disable conceal in
<plugin_folder>/vim-orgmode/ftplugin/org.vim
Comment out the following line (line 30)
setlocal conceallevel=2 concealcursor=nc
I can confirm this problem. The workaround expands the links completely, which is actually very noisy. Any news on this?
After doing some debugging, I actually found the source of the problem: If someone is using a plugin, which already shortens links in orgmode-style (like org.vim or vim-polyglot, the links vanish.
My solution:
In <plugin_folder>/vim-orgmode/syntax/org.vim
introduce a new global variable at the beginning:
if !exists("g:conceal_org_hyperlinks")
let g:vim_orgmode_conceal_hyperlinks=1
endif
And then around line 276 wrap the whole highlighting code in an if clause:
" Hyperlinks: {{{1
if (g:vim_orgmode_conceal_hyperlinks == 1)
syntax match hyperlink "\[\{2}[^][]*\(\]\[[^][]*\)\?\]\{2}" contains=hyperlinkBracketsLeft,hyperlinkURL,hyperlinkBracketsRight containedin=ALL
if (s:conceal_aggressively == 1)
syntax match hyperlinkBracketsLeft contained "\[\{2}#\?" conceal
else
syntax match hyperlinkBracketsLeft contained "\[\{2}" conceal
endif
syntax match hyperlinkURL contained "[^][]*\]\[" conceal
syntax match hyperlinkBracketsRight contained "\]\{2}" conceal
hi def link hyperlink Underlined
endif
Now I am able to disable the vim-orgmode link concealing & highlighting with the following line in my .vimrc:
let g:vim_orgmode_conceal_hyperlinks=0
For vim-polyglot you also have the option, to disable a certain filetype plugin, e.g.
let g:polyglot_disabled = ['org']
@seflue thanks for solving this. The following works!
For vim-polyglot you also have the option, to disable a certain filetype plugin, e.g.
let g:polyglot_disabled = ['org']
However, It would be great to put in a pull request for the orgmode_conceal_hyperlinks option.
After the recent merge it seems that links are no longer visible
The following is not visible in normal mode, but appears as usual in insert mode