Skip to content

Instantly share code, notes, and snippets.

@heyalexej
Last active August 29, 2015 14:00
Show Gist options
  • Save heyalexej/11380680 to your computer and use it in GitHub Desktop.
Save heyalexej/11380680 to your computer and use it in GitHub Desktop.
Vim Resources

Resources and Turuorials to learn vim.

Links

Cheat Sheets

Tips

Mappings

The following work on normal and visual modes:

  • ]]: go to next header. <Plug>(Markdown_MoveToNextHeader)
  • [[: go to previous header. Contrast with ]c. <Plug>(Markdown_MoveToPreviousHeader)
  • ][: go to next sibling header if any. <Plug>(Markdown_MoveToNextSiblingHeader)
  • []: go to previous sibling header if any. <Plug>(Markdown_MoveToPreviousSiblingHeader)
  • ]c: go to Current header. <Plug>(Markdown_MoveToCurHeader)
  • ]u: go to parent header (Up). <Plug>(Markdown_MoveToParentHeader)

Commands

The following commands currently only work for atx style headers (#). Pull request are welcome to extend them to Setext style headers (===).

  • :Toc: create a quickfix vertical window navigable table of contents with the headers.

    Hit <Enter> on a line to jump to the corresponding line of the markdown file.

  • :Toch: Same as :Toc but in an horizontal window.

  • :Toct: Same as :Toc but in a new tab.

  • :Tocv: Same as :Toc for symmetry with :Toch and Tocv.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment