Option-click to move cursor in REPLs outside the shell #5119
Unanswered
jvns
asked this question in
Ideas and Issue Triage
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
On Mac OS,
Option-click
will move the cursor when in the shell, which I believe works through shell integration. As far as I can tell, this only works in the shell, not in other REPLs (likepython
etc)In iTerm,
Option-click
will move the cursor in any REPL, which I think is cool. From experimenting a bit, it seems like when youOption-click
, iTerm will generate escape codes corresponding to arrow keys, which moves the cursor. This approach is definitely kind of limited (it doesn't seem to work when you're editing something multiline for example).For example here's what happens if you try to do it in
cat
(where of course the trick doesn't work, so you can see the escape codes):Beta Was this translation helpful? Give feedback.
All reactions