Coder Social home page Coder Social logo

Comments (3)

kwrobert avatar kwrobert commented on July 29, 2024

The vim-pandoc plugin has a :TOC command that does something similar, but populates a quickfix window with a TOC instead of inserting the TOC in the document itself. One can jump to the headers by placing the cursor on the relevant header and pressing <CR>. You might look there for some inspiration.

This feels related so I'll add it here. I think it would be really nice to add support for jumping to Pandoc header identifiers just like we have functionality for jumping to various other flavors of links. A header identifier looks like this

# My Header {#a-unique-identifier}

What would be awesome is if we could do something like

# A Section {#the-section}

blah blah

# Another Section {#another-section}

See [this section](#the-section) 

And be able to press some keymapping when the cursor is on the [this section] link and have it jump to the header of the appropriate section. It would certainly make it easier to reference various sections in a large document, and ease navigation in large documents. What do you think?

from wiki.vim.

lervag avatar lervag commented on July 29, 2024

Please open a new issue for the header identifiers. My initial thought is that this is already supported through the anchors, but perhaps I did not quite understand the request. So please explain why these identifiers are necessary as an alternative to the anchors.

Thanks for the comment on the :TOC command. The point of the TOC that I'm talking about here is not navigation, but to add/update an actual "table of contents" listing. I find such listings useful, in particular in long notes/pages with a lot of sections and chapters.

from wiki.vim.

lervag avatar lervag commented on July 29, 2024

WikiPageTocLocal and the associated mapping (default <leader>wT) should now work as desired.

from wiki.vim.

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.