Giter Site home page Giter Site logo

Links no longer visible about vim-orgmode HOT 5 CLOSED

yamsu avatar yamsu commented on August 16, 2024
Links no longer visible

from vim-orgmode.

Comments (5)

seflue avatar seflue commented on August 16, 2024 2

For vim-polyglot you also have the option, to disable a certain filetype plugin, e.g.

let g:polyglot_disabled = ['org']

from vim-orgmode.

seflue avatar seflue commented on August 16, 2024 1

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

from vim-orgmode.

yamsu avatar yamsu commented on August 16, 2024

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

from vim-orgmode.

seflue avatar seflue commented on August 16, 2024

I can confirm this problem. The workaround expands the links completely, which is actually very noisy. Any news on this?

from vim-orgmode.

yamsu avatar yamsu commented on August 16, 2024

@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.

from vim-orgmode.

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.