[IPython-dev] Multiple selections

Matthias Bussonnier bussonniermatthias at gmail.com
Thu Oct 23 03:44:02 EDT 2014


Indeed, it is new to CM4, 

You can also use Cmd+Click to make non contiguous selection.
And beyond  just switching the all keycap you can ad 1 shortcut
to codemirror keymap.
--
M


Le 22 oct. 2014 à 20:21, MinRK <benjaminrk at gmail.com> a écrit :

> Yes, I think enabling sublime keymap is possible:
> 
> in your profile’s custom.js:
> 
> require(["codemirror/keymap/sublime", "notebook/js/cell"], function(sublime_keymap, cell) {
>     cell.Cell.options_default.cm_config.keyMap = 'sublime';
> });
> c/o @jdfreder
> 
>> 
> On Wed, Oct 22, 2014 at 11:08 AM, William Stein <wstein at gmail.com> wrote:
> On Wed, Oct 22, 2014 at 10:55 AM, Matthieu Gomez
> <gomez.matthieu at gmail.com> wrote:
> > Hello,
> >
> > I'm a recent (R) user of IPython and I find it amazing.
> >
> > I'm using the current Github version. I've discovered that I could select
> > multiple lines of codes and edit them (by using ALT), which is awesome. In a
> > similar spirit, is it possible to select multiple words starting from a
> > selection of one?. In Sublime Text, if one selects some characters and press
> > CMD + D, then both the current selection and the next set of character
> > matching the current selection are selected. Pressing CMD+D a second time
> > adds the third set of characters to the selection, etc (here is a video
> > https://www.youtube.com/watch?v=i2SVJa2EGIw). This is very helpful when one
> > wants to modify the name of a variable everywhere in the code.
> >
> > However, as of now, when I press CMD + D, the selection is deleted. I was
> > wondering whether this feature was implemented, maybe under a different
> > shortcut.
> 
> I'm guessing that IPython just got this functionality as a side-effect
> of upgrading to Codemirror 4.
> Codemirror has a Sublime keybinding mode, which provides precisely the
> functionality you mention
> above.  So if IPython could expose setting the sublime (and vim and
> emacs?!) keybinding modes
> that Codemirror supports, then you get the above functionality.
> 
> In SageMathCloud (https://cloud.sagemath.com), you can set sublime
> keybindings in account settings, then open a file (anything except
> ipython notebooks, which don't inherit these settings *yet*), and edit
> it, and it works as you expect above.  I've actually been wondering
> about how to do this, since I love multiple cursors, and I'm pleased
> that it just works.
> 
> William
> 
> >
> > Thanks a lot!
> >
> > Matthieu
> >
> >
> >
> > _______________________________________________
> > IPython-dev mailing list
> > IPython-dev at scipy.org
> > http://mail.scipy.org/mailman/listinfo/ipython-dev
> >
> 
> 
> 
> --
> William Stein
> Professor of Mathematics
> University of Washington
> http://wstein.org
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
> 
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20141023/4b054c51/attachment.html>


More information about the IPython-dev mailing list