add togglefold to the list of default commands

This commit is contained in:
nightwing 2011-10-20 23:20:07 +05:00
commit 92a3369bdb
3 changed files with 90 additions and 93 deletions

View file

@ -365,4 +365,33 @@ canon.addCommand({
exec: function(env, args, request) { env.editor.transposeLetters(); }
});
canon.addCommand({
name: "fold",
bindKey: bindKey("Alt-L", "Alt-L"),
exec: function(env) {
env.editor.session.toggleFold(false);
}
});
canon.addCommand({
name: "unfold",
bindKey: bindKey("Alt-Shift-L", "Alt-Shift-L"),
exec: function(env) {
env.editor.session.toggleFold(true);
}
});
canon.addCommand({
name: "foldall",
bindKey: bindKey("Alt-Shift-0", "Alt-Shift-0"),
exec: function(env) {
env.editor.session.foldAll();
}
});
canon.addCommand({
name: "unfoldall",
bindKey: bindKey("Alt-Shift-0", "Alt-Shift-0"),
exec: function(env) {
env.editor.session.unFoldAll();
}
});
});