##// END OF EJS Templates
Adding j/k for select next/prev. Faster than up/down.
Brian E. Granger -
Show More
@@ -167,7 +167,6 b' var IPython = (function (IPython) {'
167 };
167 };
168 }
168 }
169 },
169 },
170
171 }
170 }
172
171
173 // Command mode defaults
172 // Command mode defaults
@@ -204,6 +203,30 b' var IPython = (function (IPython) {'
204 return false;
203 return false;
205 }
204 }
206 },
205 },
206 'k' : {
207 help : 'select previous cell',
208 handler : function (event) {
209 var index = IPython.notebook.get_selected_index();
210 if (index !== 0 && index !== null) {
211 IPython.notebook.select_prev();
212 var cell = IPython.notebook.get_selected_cell();
213 cell.focus_cell();
214 };
215 return false;
216 }
217 },
218 'j' : {
219 help : 'select next cell',
220 handler : function (event) {
221 var index = IPython.notebook.get_selected_index();
222 if (index !== (IPython.notebook.ncells()-1) && index !== null) {
223 IPython.notebook.select_next();
224 var cell = IPython.notebook.get_selected_cell();
225 cell.focus_cell();
226 };
227 return false;
228 }
229 },
207 'x' : {
230 'x' : {
208 help : 'cut cell',
231 help : 'cut cell',
209 handler : function (event) {
232 handler : function (event) {
General Comments 0
You need to be logged in to leave comments. Login now