By default, IntelliJ has Ctrl + C and Ctrl + V set as copy/paste shortcuts. This also applies to the terminal, though.
This is odd since (on Ubuntu at least) almost every other terminal uses Ctrl + Shift + C and Ctrl + Shift + V for copy/paste shortcuts (and Ctrl + C sends SIGINT).
Changing the copy/paste shortcut in IntelliJ's settings changes the shortcut everywhere, but I don't want it to apply to the editor (just the terminal). This behavior is even mentioned in IntelliJ's terminal help page; https://www.jetbrains.com/help/idea/terminal-emulator.html
The embedded terminal emulator also inherits the following IDE settings:
On the Keymap page, you can configure the copy Ctrl + C and paste Ctrl + V shortcuts.
Is there some hidden setting I'm not seeing somewhere to change the copy/paste behavior of just the terminal in IntelliJ?
It's a known issue with no workarounds available at the moment:
IDEA-230084 In Idea's terminal on Linux, shortcuts Ctrl-C and Ctrl-Shift-C are swapped
Related
After years of using this site, I'm finally posting my first question!
In RStudio, I often develop a line of code in the console, and then once satisfied, I copy and paste it into my source code. Since I do this many times a day, I thought it would be great if there were a keyboard shortcut.
I don't see anything for this listed in RStudio's keyboard shortcuts (click on Tools -> Keyboard Shortcuts Help). The only way I've figured out to do this via the keyboard is the following:
Type command at console (don't hit Enter)
Ctrl + U (copy line up to cursor)
Ctrl + 1 (switch to source)
Ctrl + Y (paste line)
Ctrl + 2 (switch back to console)
Question: As you can see, this is not much of a shortcut. Any other hacks? Or better yet, is there a way to define RStudio keyboard shortcuts in addition to the ones that are already defined?
Environment:
RStudio version 1.0.44
R version 3.3.2
Mac OSX 10.11.6
I tried to copy text from IDEA with ideavim plugin, using default vim keybindings (y). But this text isn't copied in global buffer and i can paste it only in IDEA.
How can I use copied piece of text in browser, for example?
Vim's yank command doesn't yank to the system clipboard by default; it yanks to the unnamed register. You can use the * or + register to access the system clipboard; also see this wiki article for more information. Or just set this option in your ~/.ideavimrc:
set clipboard+=unnamed
This ~/.ideavimrc setting has been supported in IdeaVim since VIM-476 was implemented in version 0.38. If the file does not exist create it in your user/home directory.
Note also that this is all standard Vim behavior; none of it is specific to IdeaVim except for the name of the config file.
Another option is that you can go to the setting of the ideavim plugin and set ctrl + c and ctrl + v to be handled by the IDE and not by vim.
This will allow you to copy and paste as usual in the IDE and paste outside the IDE as well.
Note
when you set ctrl + v to be handled by the IDE ctrl + v for selection will not work in VIM. As an alternative you might just use ctrl + shift + v in IDE as default (works by default for paste with selection)
Steps
in your lower right corner select settings:
Then search for the shortcut and select the option IDE for handler.
Ctrl+D performs the find_under_expand command in sublime. This basically searched for the next occurrence of the already selected text and selected it, so when I edit, it's edited on both places at the same time. I'm currently trying to move to IDEA editors (such as WebStorm, PHPStorm, PyCharm, etc) but didn't find something like this command in this IDE yet.
I believe they recently added this to the latest IntelliJ release, and I would assume PhpStorm as well. As the bindings are system specific, take a look at http://blog.jetbrains.com/phpstorm/2014/03/working-with-multiple-selection-in-phpstorm-8-eap/. Looks like that version is available through EAP, so don't know when they will release it for general consumption (or if they have already).
DEFAULT SHORTCUTS
Alt+J on Windows and Linux, Ctrl+G on Mac OS X
On Mac OS X, you can select the next occurrence with Ctrl+G
In the settings window, search for ”Add Selection for Next Occurence” (PhpStorm 8.0.1)
On mac the default is ctrl+G, but you can change it to ctrl+D (or cmd+D on mac)
Currently its mapped with
for selection, Alt + J
for unselection, Alt + Shift + J
but if you're familiar with sublime shortcuts like Ctrl + D
Jetbrains give you an option to change settings,
Settings -> Keymap -> Editor Actions
search for multiple selection, find Alt + J
then right click -> select change keyboard shortcuts
set shortcuts you want as like sublime, Ctrl + D
Here is the Docs
On Windows
Alt+j - Multiple Select
Alt+Shift+j - Unselect Multiple Select
I think what you want to do is refactor it at all the place in the file at once.
So in MAC machine the handy shortcut for it is shift + F6 (you may have have to use fn key before F6).
Click on the text you want to change and then press shift + F6. It will highlight the text and then your change at all the place in the file. :)
It will do the job same as sublime ctrl + D
PhpStorm has a "Select Word at Caret", Ctl+W and Ctl+Shift+W respectively (you can check your keys by searching under Preferences > Keymap).
Detail here:
http://www.jetbrains.com/phpstorm/webhelp/selecting-text-in-the-editor.html#d617165e275
Not entirely sure if it's the same as you mentioned, but it's mighty handy!
I would like to use the Sublime Text 2 key bindings in Pycharm. I know how to edit it one by one. Is there a way to override the entire keymap in one shot?
Something like
export the key bindings from sublime text 2
convert it into Pycharm's format
import it into Pycharm
Pycharm has some pre-configured keymaps. If there's a text / XML / JSON file where these maps are stored, I can try to convert it myself.
PyCharm now has Sublime Text keymap inbuilt as an alternative to Default Keymap.
Go to Setting -> Keymap and select Sublime Text from Keymap dropdown.
Hope that helps.
After poking around, I feel there's no easy way to do this.
If you change the default bindings, PyCharm creates a file in user space that shows the format of keymap. Theoretically, one could override all the fields in this file. But the problem is, there's no standard way of describing the action performed by a shortcut. Someone will have to do it manually, for each macro, to establish a correspondence between the actions performed by PyCharm & Sublime Text.
There is an IntelliJ request for this in their Youtrack tracker: IDEA-111333 Provide Sublime Text keymap.
From that thread, I found a repository for another remapping project. The keybinding file that imitates most of Sublime text can be found at in the directory PHPStorm-SpacePeacock/win_linux-keymaps-only/keymaps/Default for GNOME copy.xml. From the README:
The key mapping has been updated to better fit Sublime Text
conventions. Because I didn't think that ctrl + shift + alt + t is a
reasonable key combination for something as frequently used as
Refactor This.
Additionally, "search everywhere" HAD to be changed because
double-tapping left-shift is a two stroke trigger. This is a problem
because as you're working the IDE will be busy with analyzing,
indexing, and all of the things that IDEs do. If it's busy when you
try to hit the first left-shift, then the second left-shift won't pop
up the window. As far as user interfaces go, you should never have any
lack of confidence that an action will trigger the appropriate
response. Once you have that, you have to visually check each
operation which is slow and creates cognitive overhead. Consequently,
this was changed to ctrl + p (also to match Sublime Text) which
completely removes this problem.
ctrl + p search everywhere
ctrl + r search methods in current file
ctrl + alt + p change projects
ctrl + shift + enter complete current statement
ctrl + alt + enter refactor this
alt + enter show intended actions (intentions are one of my favorite
part JetBrains software)
ctrl + n new thing dialog
ctrl + shift + f format code
ctrl + d select word at cursor, or if a word is selected the select
the next occurrence of the word (multiple-cursors)
ctrl + t run tests
ctrl + alt + h show local history
ctrl + alt + r git conflict merge tool
(Less popular) keymaps that can be used with JetBrains Rider but not included in the installation package.
https://github.com/JetBrains/rider-non-bundled-keymaps
Intalling keymaps
In releases, get the sublime-text-keymap.jar file for the desired keymap.
In your IDE, choose File | Import Settings... from the menu and select the sublime-text-keymap.jar file.
What is the cloud9 keyboard shortcut to move between the editor tab (#1) and the terminal console (#2)?
I am aware that I can open a terminal tab and switch to it using the keyboard, but I want to see both the editor and terminal in one view.
It is ALT + S on the current version of Cloud9
To make certain keyboard shortcut work on c9.io in Chrome, which would otherwise do something else like close tab or reload page, click the menu button of Chrome > More Tools > Create Application Shortcuts....
Now the IDE is an actual program and all the default browser shortcuts are disabled. Ctrl + W (Close tab) and Ctrl + Shift + Q (Close Chrome) and F5 (Refresh) and the likes can now be used as keyboard shortcuts :)
To add on #Kronenbourg's exact answer (which IMHO should be accepted) - as of May 2015:
Shift + Esc / Esc - Goto workspace (files tree) / Exit workspace (to the last place, Editor/Terminal)
ALT + S - switch between code and terminal
In conjunction with CMD + { / CMD + }, which navigate right/left in current context (Editor, terminal) tabs, you should be able to reach anywhere with the keyboard.
Also useful in the context is CMD + O to open file.
HTH
It's Shift+ESC on open source, but unfortunately this doesn't work on c9.io.
I accidentally found out that ctrl+~ works to switch between terminal and editing window and then back. Maybe it's not the most convenient shortcut but it works.
Alt+s
This shortcut is listed in the top menu, under:
Window > Navigation