Merge pull request #4826 from benthayer/selectall

Ctrl-A to select all cells
Thomas Kluyver 6 years ago committed by GitHub
commit 76a323e677
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -298,6 +298,15 @@ define([
env.notebook.get_selected_cell().element.focus();
}
},
'select-all' : {
cmd: i18n.msg._('select all'),
help: i18n.msg._('select all cells'),
help_index : 'de',
handler : function (env) {
env.notebook.select_all();
env.notebook.get_selected_cell().element.focus();
}
},
'cut-cell' : {
cmd: i18n.msg._('cut selected cells'),
help: i18n.msg._('cut selected cells'),

@ -145,6 +145,7 @@ define([
'shift-j': 'jupyter-notebook:extend-selection-below',
'shift-up': 'jupyter-notebook:extend-selection-above',
'shift-down': 'jupyter-notebook:extend-selection-below',
'cmdtrl-a': 'jupyter-notebook:select-all',
'x' : 'jupyter-notebook:cut-cell',
'c' : 'jupyter-notebook:copy-cell',
'v' : 'jupyter-notebook:paste-cell-below',

@ -835,6 +835,12 @@ define([
});
};
Notebook.prototype.select_all = function(){
this.select(0, true);
this.select(this.ncells()-1, false);
};
Notebook.prototype._contract_selection = function(){
var i = this.get_selected_index();
this.select(i, true);

Loading…
Cancel
Save