开发者

How to open files in Intellij-IDEA with double click?

开发者 https://www.devze.com 2022-12-27 20:42 出处:网络
My first day using this IDE... is the开发者_如何转开发re a way to configure the IDE to open files in the project by double click? It is rather painful having to drag files from the project overview i

My first day using this IDE...

is the开发者_如何转开发re a way to configure the IDE to open files in the project by double click? It is rather painful having to drag files from the project overview into the editor window.


You can change the KeyMap.

Go to File->Settings and find the keymap section.

You will have to create a new KeyMap by clicking copy, and then look in the View section for "Jump to Source" and change/add the keymap you want.

However, as Bozhidar Batsov noted, double clicking may not always work so well. Whether it works may vary by OS and/or windowing system. I have no trouble with it in Mac OS X, but it doesn't seem to work well in openSUSE.

There are also other predefined keymaps that you can select from this settings screen. They're set up to resemble other IDEs, so you might find them helpful if you're transitioning from something else.


It is easy way to do in windows.

How to open files in Intellij-IDEA with double click?


I found a great solution to this problem by Jelmer Kuperus over at Orange11.

Create an .Xresources file in your home directory. Add the following line:

*multiClickTime: 400

Jelmer explains that this setting changes the default double-click speed from 200ms to 400ms, effectively slowing it down. Save the file and then run:

xrdb ~/.Xresources

The effect is immediate, no need to logout or reboot. Double-click in Intellij works as expected. I did try changing the mouse double-click speed in System Settings first before trying this out to see if that made a difference but it did not.

I am using Ubuntu 11.04, Intellij 10.5.2, and Sun JDK 1.6.0_26. YMMV


Use F4 to open quickly the selected files. Btw double clicking on files should work as well(at least in theory). Swing's buggy handling of such events, however, causes the double click to not always work in IDEA, so I eventually stopped double clicking and switched to using F4. You can also use "Autoscroll to source" from the projects menu - this will open the source files as soon as you select them in the project browser.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号