Shift-based text selection shortcuts don’t work in the integrated terminal (macOS keymap)
Hi JetBrains team,
Big fan of your IDEs - thank you for all your hard work!
I’m opening this ticket in the GoLand space because it is my primary IDE, but I believe the issue below relates to the terminal component shared across JetBrains IDEs.
Issue: Shift-based text selection does not work in the terminal
This issue has been bothering me for over a year. Text selection using Shift + arrow keys does not work as expected in the integrated terminal.
For example, suppose the terminal contains:
% git checkout my-branch
If I press Shift + Left Arrow, I get:
% git checkout my-branch;2D
In other words, ;2D is printed in the terminal.
Expected behaviour:
The last character (h) should be selected, with the caret moved to the position before it.
The same problem applies to other Shift-based selection shortcuts.
For example, if I press Command + Shift + Left Arrow, I get:
% git checkout my-branch[D
In this case, [D is printed in the terminal.
Expected behaviour:
The entire line should be selected, with the caret moved to the beginning of the line.
Because Shift-based selection shortcuts do not work, editing commands in the integrated terminal is quite inconvenient, and I frequently have to switch to an external terminal instead.
(optional) Additional suggestion: Open a file from the terminal in the editor
I often work with deeply nested projects and navigate between directories using the terminal. Once I’m in a particular directory, I sometimes want to quickly open one of its files in the IDE editor.
For example, suppose I’m currently in the foo directory, which contains:
blah.vue
It would be fantastic to have a command similar to VS Code’s CLI functionality that would let me run something like:
<command> blah.vue
and have blah.vue open directly in the current IDE window.
If functionality like this already exists, I’d appreciate being pointed in the right direction.
Thank you again for your work on the JetBrains IDEs. I hope the terminal shortcut issue can be considered and addressed in a future update.
请先登录再写评论。
Thank you for the kind words and for the detailed report!
I reproduced the Shift-based selection problem and am passing it to my colleagues on the IntelliJ Platform team, who work on the terminal. They will check it and follow up with you here.
About opening a file from the terminal: this already exists. GoLand has a command-line launcher, so you can run "goland blah.vue" in the terminal. If the file belongs to a project that is already open, it opens in that project's window.
How to set up the launcher on macOS: https://www.jetbrains.com/help/go/working-with-the-ide-features-from-command-line.html
How to open files with it: https://www.jetbrains.com/help/go/opening-files-from-command-line.html
I would like to confirm, is this behavior different than your MacOS Terminal? For example, the same thing does reproduce inside normal terminal, or do you use any other terminal as inspiration? This will help me just establish context to help you further and move the issue further. Thank you!
Best regards,
Uros Glogovac
IntelliJ Support
Hi Svetlana and Uros,
Thanks for the instructions above - worked like a charm!
It's been a while since I used the native macOS Terminal, but to address your question, I tried to reproduce the behaviour there. When I use the shortcuts mentioned in the post in the native macOS Terminal, the selection doesn't work either. However, I noticed that no characters such as ;2D or [D are printed.
I use Warp as my main external terminal, where selection with Shift is supported out of the box.
I'd also add that this type of selection behaviour is supported by virtually any text editor, although not necessarily by every terminal. Having this functionality in IntelliJ-based IDEs terminals would be fantastic.
I hope this helps provide some context. I'll be looking forward to seeing where this takes us!
Best regards,
Mikhail
Thank you for the details! This narrows it down to this known open feature request: https://youtrack.jetbrains.com/issue/IJPL-197890
To track any updates, please up vote and star it. Thank you!