Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ shortcuts that I can't find

I was using vim for a while (I know there is a intellij vim plugin), and I am curious what the built in IntelliJ text navigations exist?

  1. How can I open up live templates to create a template?
  2. How can I see a list of templates that exist that start with 'tr'
  3. How to perform a global search and search in current document? (and then go to next)
  4. How to see the return type of a method?

I appreciated the guidance!

P.S Any cool text navigation shortucts you want to share?

PPS Can you pull the unit testing window out of the editor and move it to another monitor?

Update

I am on a Mac

like image 409
codecompleting Avatar asked Dec 13 '22 05:12

codecompleting


2 Answers

Re PPS: Yes; click on the gear cog/settings in the upper-right, undock it.

It doesn't do what I want it to, which is act as a completely independent window, however, which is a PITA. You can always get back to it with CMD+4.


Not sure what qualifies as "cool", I use these a lot:

  • CMD+F12, quick outline
  • CMD+W, select block (widens on subsequent presses)
  • CMD+D, duplicates current line (or selection, including methods, etc.)
  • CTRL+], move caret to code block end (and CTRL-[)
  • SHIFT+RETURN, open new line below current and move cursor
  • CMD+-,CMD+= collapse, expand region, SHIFT+those does whole buffer.
like image 85
Dave Newton Avatar answered Jan 04 '23 10:01

Dave Newton


  1. Preferences->Live Templates
  2. Write tr and press CMD-j (probably CTRL-J on Windows)
  3. CMD-F (CTRL-F), F3 goes to next search result
  4. CTRL-J opens "quick documentation" which shows the return type plus Javadocs.

More info about keyboard mappings and shortcuts:

  • Most useful shostcuts
  • Keyboard shortcuts not to miss
  • Default keymap
like image 31
Peter Svensson Avatar answered Jan 04 '23 11:01

Peter Svensson