How can i change the "windows explorer" keyboard shortcut for "rename file"? - keyboard-shortcuts

Currently, it is F2 to start rename, and [ENTER] to finish rename. I want [ENTER] to start rename, instead of F2. I never want to open a file by pressing enter. Happy to keep [KEYPAD-ENTER] to open files.
Thanks!

Related

IntelliJ Idea - Go to File > Why having to press Ctrl+Enter to open found file?

I remember I could search a file with Go to File function (Ctrl+Shift+T) and just press Enter to open it after typing its name.
Now typing Enter only isn't enough and I have to press Ctrl+Enter to open the file. Do you know how to change this behaviour?

Navigating project files in intellij idea

I want to jump through files in the project window using the up / down buttons. Now I press the down button, then press the enter button and the focus goes to the code editor window. But I do not want the focus to go away, I want to continue jumping through the files, pressing the down button and enter when I want to open the file. I can do this using this combination: down arrow, enter, F12, down arrow, down arrow, enter, F12 ...
Is there any way to tweak this to avoid using F12?
I'm using Intellij idea 2020.3
I'd suggest reassigning shortcut combination Main Menu | Window | Active Tool Window | Jump to Last Tool Window to anything more suitable for you, e.g. ESC and be sure that you don't use the same shortcut for other actions and operations.

Where is "close diff window" in Intellij keymap and/or menu

There is a bug in latest intellij that "escape" no longer closes popup "diff" windows such as
compare to clipboard
compare with Git
show History
I would like to do a workaround by closing the window via something like Option-F4 or Control-W. But where is the Keymap entry for closing these windows? I have searched on close and there is no entry.
The last fallback is to go the snail way - to mouse over to click on the red "close window" button: but any mouse movements are slower than a keyboard shortcut.
Updated information Note: the normal "close window" keys (i am on Mac) do not work.
Here is the IJ bug entry https://youtrack.jetbrains.com/issue/IDEA-142932
Another update Here is key bindings: notice there is NO Close Editor Tab instead only Close All
I'm using OS X Yosemite and pressing Cmd + F4 has the desired effect of closing the window. Cmd + F4 is bound to Window / Editor Tabs / Close.
The short answer:
The related key binding is "Close" under "Editor Tabs" menu,
Then you can customize the keyborad shortcut as you want.
File > Settings > keymap >

Intellij: How to copy/paste a file in order to duplicate it?

I can not seem to find a way to do this? I have a file named X in some folder, I want to create Y with the same contents in the same directory. The way I do in eclipse is to select the file and ^C, ^P, eclipse prompts for the new name.
UPDATE
Apparently this problem only occurs if compilation unit contains more than one type.
F5 will duplicate selected file prompting you to enter a name for the new file.
⌥ + drag
MacPress Option key and drag the original file.
PCPress Alt key and drag the original file.
You will be prompted for a new name.
Works for classes too:
As for a keyboard only solution to duplicate a file in IntelliJ:
On Linux:
Press Alt+Home to activate the navigation bar, then either press F5, or press Ctrl+C to copy the file and then press Ctrl+V to paste it, a dialog will appear to name your new file.
On Mac:
Press Cmd+Up to activate the navigation bar, then either press F5, or press Cmd+C to copy the file and then press Cmd+V to paste it, a dialog will appear to name your new file.
I found that ctrl+c/ctrl+v will not copy files on IDEA in Linux (using x2go to connect on a Windows box). I was able to get it working if I close xclipboard but then copying between Windows and Linux dialogs stops working.
Ctrl + C on target file/folder
Ctrl + V on destination folder
Enter new name and press Enter...

Jump to editor shortcut in Intellij IDEA

I can use F12 to jump to project tree (if it was the last tool that I used), but is there a shortcut for jumping back to editor?
Esc usually brings the focus back to the editor.
With Alt + Home you can actually put focus on selecting the file and hit enter in order to go to the editor.
Esc is not always going to put the focus on editor.
For those on Mac (you don't have a Home key), use Command + E to open the recent files then hit enter.
Pressing F4 (Jump to Source action) in a selected resource in the Project View opens the editor with focus.
Another easy way to get from Terminal to Editor (on Mac) with two keys that are close together: Press ⌘1 to go to the project tool window, then hit Esc.
You can use ctrl + tab Navigate between files opened in the editor, and tool windows.
This is definitely a workaround, but, on mac os the following keystrokes work,
[ SHIFT + CMD + A ] > type "edit" > [ ENTER ]
So, I created a Service using Automator as follows,
receives no input
active for my IDE only ( phpstorm )
runs an AppleScript ( see below )
Then I mapped the Service via "System Preferences > Keyboard > Shortcuts > Services" to
[ CTRL + OPTION + CMD + i ]
The Automator Service, contains the following AppleScript,
on run {input, parameters}
tell application "System Events"
keystroke "A" using {shift down, command down}
delay 0.2
keystroke "edit"
delay 0.2
keystroke return
end tell
return input
end run
There is no perfect solution, since Escape doesn't work if your other Tool Window is a Terminal, Windowed... as a result there is an open ticket on Jetbrains, bug tracking site see this link.
Also, if you have "Autoscroll to Source" disabled (default state in Intellij):
Escape puts cursor in file currently visible in editor (As mentioned in the other Answers)
F4 puts cursor in file currently selected in the Project view.
The most elegant way found in mac: ctrl + tab + p
ctrl + tab: open recent file, always last file opened
ctrl + p: last line in mac default keymap