File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed
notebook/static/notebook/js Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -298,6 +298,15 @@ define([
298298 env . notebook . get_selected_cell ( ) . element . focus ( ) ;
299299 }
300300 } ,
301+ 'select-all' : {
302+ cmd : i18n . msg . _ ( 'select all' ) ,
303+ help : i18n . msg . _ ( 'select all cells' ) ,
304+ help_index : 'de' ,
305+ handler : function ( env ) {
306+ env . notebook . select_all ( ) ;
307+ env . notebook . get_selected_cell ( ) . element . focus ( ) ;
308+ }
309+ } ,
301310 'cut-cell' : {
302311 cmd : i18n . msg . _ ( 'cut selected cells' ) ,
303312 help : i18n . msg . _ ( 'cut selected cells' ) ,
Original file line number Diff line number Diff line change @@ -145,6 +145,7 @@ define([
145145 'shift-j' : 'jupyter-notebook:extend-selection-below' ,
146146 'shift-up' : 'jupyter-notebook:extend-selection-above' ,
147147 'shift-down' : 'jupyter-notebook:extend-selection-below' ,
148+ 'cmdtrl-a' : 'jupyter-notebook:select-all' ,
148149 'x' : 'jupyter-notebook:cut-cell' ,
149150 'c' : 'jupyter-notebook:copy-cell' ,
150151 'v' : 'jupyter-notebook:paste-cell-below' ,
Original file line number Diff line number Diff line change @@ -835,6 +835,12 @@ define([
835835 } ) ;
836836 } ;
837837
838+
839+ Notebook . prototype . select_all = function ( ) {
840+ this . select ( 0 , true ) ;
841+ this . select ( this . ncells ( ) - 1 , false ) ;
842+ } ;
843+
838844 Notebook . prototype . _contract_selection = function ( ) {
839845 var i = this . get_selected_index ( ) ;
840846 this . select ( i , true ) ;
You can’t perform that action at this time.
0 commit comments