I edit markdown files a lot in neovim, and I like jumping between headings to navigate the file faster, there's the ctrl+d and ctrl+u options to navigate up and down a half page, but I want to jump straight to headings. I know, you can use a plugin like outline.nvim, but I like having both options available.
In this video I use neovim keymaps to achieve this, I use the gj and gk mappings, but that's just a personal preference you can use whichever keymap works for you.
There may be an easier way to achieve this, but I'm not a neovim expert, so If you have any suggestions, improvements, or ideas, leave them in the comments below
Corrections: 1:24
See the pinned comment for an update
Update March 1st 2024:
For better compatibility, make sure you follow markdown guidelines and you have a single H1 heading in the document at the very top of the file, this keymap will detect H2 headings and above
See the 1st comment in the video for more details
Updated link:
https://github.com/linkarzu/dotfiles-...
Join me in discord (Linkarzu)
/ discord
YouTube Memberships
/ @linkarzu
Start your setapp 7 day free trial (my affiliate link)
https://setapp.sjv.io/QjKK1a
Start your 1password 14 day free trial (my affiliate link)
https://www.dpbolvw.net/click-1013272...
If you find this video helpful and want to support me
https://ko-fi.com/linkarzu