Add support for za

This commit is contained in:
aquova 2019-10-10 19:33:02 -05:00
parent 1b8a5c8526
commit 87cf7a5165
2 changed files with 7 additions and 1 deletions

View File

@ -567,7 +567,7 @@ Pretty much everything fold-related is blocked by [this issue](https://github.co
| :white_check_mark: | zO | Open all folds under the cursor recursively. |
| :white_check_mark: | zc | Close one fold under the cursor. When a count is given, that many folds deep are closed. |
| :white_check_mark: | zC | Close all folds under the cursor recursively. |
| :arrow_down: | za | When on a closed fold: open it. When on an open fold: close it and set 'foldenable'. |
| :white_check_mark: | za | When on a closed fold: open it. When on an open fold: close it and set 'foldenable'. |
| :arrow_down: | zA | When on a closed fold: open it recursively. When on an open fold: close it recursively and set 'foldenable'. |
| :arrow_down: | zv | View cursor line: Open just enough folds to make the line in which the cursor is located not folded. |
| :arrow_down: | zx | Update folds: Undo manually opened and closed folds: re-apply 'foldlevel', then do "zv": View cursor line. |

View File

@ -2370,6 +2370,12 @@ abstract class CommandFold extends BaseCommand {
}
}
@RegisterAction
class CommandToggleFold extends CommandFold {
keys = ['z', 'a'];
commandName = 'editor.toggleFold';
}
@RegisterAction
class CommandCloseFold extends CommandFold {
keys = ['z', 'c'];