<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Indeed, it is new to CM4, <div><br></div><div>You can also use Cmd+Click to make non contiguous selection.</div><div>And beyond  just switching the all keycap you can ad 1 shortcut</div><div>to codemirror keymap.</div><div>--</div><div>M</div><div><br></div><div><br><div><div><div>Le 22 oct. 2014 à 20:21, MinRK <<a href="mailto:benjaminrk@gmail.com">benjaminrk@gmail.com</a>> a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div class="markdown-here-wrapper" style=""><p style="margin:1.2em 0px!important">Yes, I think enabling sublime keymap <a href="https://github.com/ipython/ipython/pull/6221#issuecomment-58936367">is possible</a>:</p><p style="margin:1.2em 0px!important">in your profile’s custom.js:</p>
<pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;overflow:auto;margin:1.2em 0px"><code class="hljs language-javascript" style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:nowrap;border:1px solid rgb(234,234,234);border-radius:3px;display:inline;background-color:rgb(248,248,248);white-space:pre;border-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block;padding:0.5em;color:rgb(51,51,51);background:rgb(248,248,255)"><span class="hljs-built_in">require</span>([<span class="hljs-string">"codemirror/keymap/sublime"</span>, <span class="hljs-string">"notebook/js/cell"</span>], <span class="hljs-function"><span class="hljs-keyword">function</span><span class="hljs-params">(sublime_keymap, cell)</span> </span>{
    cell.Cell.options_default.cm_config.keyMap = <span class="hljs-string">'sublime'</span>;
});
</code></pre><p style="margin:1.2em 0px!important">c/o @jdfreder</p>
<div title="MDH:WWVzLCBJIHRoaW5rIGVuYWJsaW5nIHN1YmxpbWUga2V5bWFwIFtpcyBwb3NzaWJsZV0oaHR0cHM6
Ly9naXRodWIuY29tL2lweXRob24vaXB5dGhvbi9wdWxsLzYyMjEjaXNzdWVjb21tZW50LTU4OTM2
MzY3KTo8ZGl2Pjxicj48L2Rpdj48ZGl2PmluIHlvdXIgcHJvZmlsZSdzIGN1c3RvbS5qczo8L2Rp
dj48ZGl2Pjxicj48L2Rpdj48ZGl2PmBgYGphdmFzY3JpcHQ8L2Rpdj48ZGl2PjxkaXY+cmVxdWly
ZShbImNvZGVtaXJyb3Iva2V5bWFwL3N1YmxpbWUiLCAibm90ZWJvb2svanMvY2VsbCJdLCBmdW5j
dGlvbihzdWJsaW1lX2tleW1hcCwgY2VsbCkgezwvZGl2PjxkaXY+Jm5ic3A7ICZuYnNwOyBjZWxs
LkNlbGwub3B0aW9uc19kZWZhdWx0LmNtX2NvbmZpZy5rZXlNYXAgPSAnc3VibGltZSc7PC9kaXY+
PGRpdj59KTs8L2Rpdj48L2Rpdj48ZGl2PmBgYDwvZGl2PjxkaXY+PGJyPjwvZGl2PjxkaXY+Yy9v
IEBqZGZyZWRlcjwvZGl2PjxkaXY+PGJyPjwvZGl2Pg==" style="height:0;font-size:0em;padding:0;margin:0">​</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 22, 2014 at 11:08 AM, William Stein <span dir="ltr"><<a href="mailto:wstein@gmail.com" target="_blank">wstein@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Wed, Oct 22, 2014 at 10:55 AM, Matthieu Gomez<br>
<<a href="mailto:gomez.matthieu@gmail.com">gomez.matthieu@gmail.com</a>> wrote:<br>
> Hello,<br>
><br>
> I'm a recent (R) user of IPython and I find it amazing.<br>
><br>
> I'm using the current Github version. I've discovered that I could select<br>
> multiple lines of codes and edit them (by using ALT), which is awesome. In a<br>
> similar spirit, is it possible to select multiple words starting from a<br>
> selection of one?. In Sublime Text, if one selects some characters and press<br>
> CMD + D, then both the current selection and the next set of character<br>
> matching the current selection are selected. Pressing CMD+D a second time<br>
> adds the third set of characters to the selection, etc (here is a video<br>
> <a href="https://www.youtube.com/watch?v=i2SVJa2EGIw" target="_blank">https://www.youtube.com/watch?v=i2SVJa2EGIw</a>). This is very helpful when one<br>
> wants to modify the name of a variable everywhere in the code.<br>
><br>
> However, as of now, when I press CMD + D, the selection is deleted. I was<br>
> wondering whether this feature was implemented, maybe under a different<br>
> shortcut.<br>
<br>
</div></div>I'm guessing that IPython just got this functionality as a side-effect<br>
of upgrading to Codemirror 4.<br>
Codemirror has a Sublime keybinding mode, which provides precisely the<br>
functionality you mention<br>
above.  So if IPython could expose setting the sublime (and vim and<br>
emacs?!) keybinding modes<br>
that Codemirror supports, then you get the above functionality.<br>
<br>
In SageMathCloud (<a href="https://cloud.sagemath.com/" target="_blank">https://cloud.sagemath.com</a>), you can set sublime<br>
keybindings in account settings, then open a file (anything except<br>
ipython notebooks, which don't inherit these settings *yet*), and edit<br>
it, and it works as you expect above.  I've actually been wondering<br>
about how to do this, since I love multiple cursors, and I'm pleased<br>
that it just works.<br>
<br>
William<br>
<br>
><br>
> Thanks a lot!<br>
><br>
> Matthieu<br>
><br>
><br>
><br>
> _______________________________________________<br>
> IPython-dev mailing list<br>
> <a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
> <a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
><br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
William Stein<br>
Professor of Mathematics<br>
University of Washington<br>
<a href="http://wstein.org/" target="_blank">http://wstein.org</a><br>
_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
</font></span></blockquote></div><br></div>
_______________________________________________<br>IPython-dev mailing list<br><a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>http://mail.scipy.org/mailman/listinfo/ipython-dev<br></blockquote></div><br></div></div></body></html>