fold-navigate

Navigate to the beginning and the end of blocks of code according to the fold and indentation levels.

erinata

381

1

0.1.1

MIT

GitHub

Fold Navigate

Navigate to the beginning and the end of blocks of code according to the fold and indentation levels.

Usage

There is only one command foldNavMatch (default keymap is "ctrl-alt-m"). If the cursor is currently at the beginning of a block, the cursor will move to the end of the block. If the cursor is currently inside a block, the cursor will move to the beginning of the block.

If the cursor is not in and block of code, the cursor will move to the beginning of the document. And if the cursor is currently at the beginning of document, it will move to the end of the document. In other words, the whole document is treated as a huge (and root) block of code.

This behaviour mimics the behaviour of the package bracket-match. In many case, when the block is delimited by curly braces, foldNavMatch will act exactly like the bracket-match package. However, foldNavMatch also works in other situations where bracket-match won't. For example, in case of languages like python or ruby, where curly braces is not use for blocks, or in situation where you want to navigate directly to the beginning of the block instead of the nearest parenthesis.

Issues and TODOs