Readline / emacs-style ctrl+Y (yank) keyboard shortcut in notebook (Mac)

211 views
Skip to first unread message

Charlie Hack

unread,
Feb 25, 2016, 5:41:01 PM2/25/16
to Project Jupyter
Hi all,

A feature I've wanted for a long time is for ctrl+K and ctrl+Y to work like they do in many mac apps and text editors in "emacs mode"-- 

- ctrl+K cuts to the end of the line
- ctrl+Y pastes the most recent cut after the cursor.

I think this doesn't work on Windows already because the system already has a use for ctrl+A, ctrl+K etc.

But on Mac I would expect it to work as it does in most other Mac applications. Instead in the notebook, you can "kill" a line (ctrl+K) but you can't "yank" (ctrl+Y) it back from the register (paste). So that when I want to move lines around I find myself doing 

- ctrl+A (beginning of line, works fine in notebook)
- ctrl+shift+E (highlight to end of line)
- command+X (system pasteboard cut)
- ctrl+N or ctrl+P to get where I want to paste the line, again works fine in the notebook
- command+V (system pasteboard paste)

This is an ok workaround but I would love the notebook "yank" to work as it does elsewhere.

Does anyone have another workaround for this, or a sense of how difficult the fix would be? 

Thanks,

Charlie

Matthias Bussonnier

unread,
Feb 25, 2016, 6:01:11 PM2/25/16
to jup...@googlegroups.com

Is trying to do (some) of that. Review welcomed. 
-- 
M


Reply all
Reply to author
Forward
0 new messages