简体   繁体   中英

Intellij shortcut - how to open at project view current class?

I just want to know if it is possible at Intellij open Project view for class which is currently opened. Using short cut.

Steps:

  • After using find class shortcut ( Ctrl + N ) => type String
  • Press String class from JDK. It has next looking:

在此处输入图片说明

  • And now when press Alt + 1 => It will open Project view where it was active last time.
  • But I want to know how to open this view and cursor is exactly at this class location:

在此处输入图片说明

I tried to find it at internet but without success.

Any suggestions?

You can click the settings icon in the project view and check Autoscroll from source . That way any class (or any file for that matter) you open will be automatically selected in the project view.

在此处输入图片说明

or if you don't want this to happen always you can click this icon to naviage to the currently opened item in the project view:

在此处输入图片说明

Unfortunately I don't see any command in keymap section to bind this action to a keyboard shortcut.

Replying to an old thread, but may help someone in the future. I am using IntelliJ 2020.2 and now I can see a keymap for the 'Select Opened File' (earlier 'Scroll from Source') button mentioned by @Bohuslav Burghardt. It's

Alt + F1 and then 1 (submenu item 1)

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM