2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

codemirror: improve code folding (hotkeys)

git-svn-id: https://svn.fhem.de/fhem/trunk@27549 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
betateilchen 2023-05-10 16:14:43 +00:00
parent db7c4b31d5
commit 04351bbd59

View File

@ -86,7 +86,7 @@ function AddCodeMirror(e, cb) {
cm_active++; cm_active++;
loadLink("codemirror/foldgutter.css"); loadLink("codemirror/foldgutter.css");
loadScript("codemirror/foldgutter.js", function(){cm_loaded++;} ); loadScript("codemirror/foldgutter.js", function(){cm_loaded++;} );
cm_attr.extraKeys['Ctrl-K'] = function(cm){ cm.foldCode(cm.getCursor(),{ scanUp: true }); }; cm_attr.extraKeys['Ctrl-X'] = function(cm){ cm.foldCode(cm.getCursor(),{ scanUp: true }); };
cm_attr.extraKeys['Ctrl-I'] = function(cm){ CodeMirror.commands.foldAll(cm); }; cm_attr.extraKeys['Ctrl-I'] = function(cm){ CodeMirror.commands.foldAll(cm); };
cm_attr.extraKeys['Ctrl-J'] = function(cm){ CodeMirror.commands.unfoldAll(cm); }; cm_attr.extraKeys['Ctrl-J'] = function(cm){ CodeMirror.commands.unfoldAll(cm); };
cm_active++; loadScript("codemirror/brace-fold.js", function(){cm_loaded++;} ); cm_active++; loadScript("codemirror/brace-fold.js", function(){cm_loaded++;} );