Good afternoon!
I've got something like this (| is position of cursor):
System.out.println("|")`;
After clicking TAB Button I'd like it to exit the quotes instead of making couple spaces.Is there any way to change it in IntelliJ 2016.3?
Related
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.
For every file type it is possible to press the button at the end of the bottom bar and change to tabs in the popup but the popup for Markdown does not show an option to use tab character, even though the buttons says "Configure Indents".
How can I use tabs for Markdown without having to do "CTRL+SHIFT+A -> To Tabs" after every time I've finished writing?
Solved in 2020.3 (currently early access).
Issue: https://youtrack.jetbrains.com/issue/IDEA-243531
In Sublime Text I can arbitrarily select a set of lines and then use ⌘+L to expand the selection to the full lines. Is there a similar command in PHPStorm / WebStorm? (I'd like to map that command to a keyboard shortcut.)
I know PHPStorm has the option "Select Line at Caret", but that selects only one line.
Update
Nowadays (welcome 2020) Go to Preferences > Keymap. Change or add the value to
Add Carets to Ends of Selected Lines => CMD+SHIFT+L to have it behave like Sublime Text so it looks like
Old Answer
This is as close as I could get it (before 2020):
Go to Preferences > Keymap. Search for Clone Caret Above/Below.
On a Mac, it looks like this
The keys are:
CMD+SHIFT+CTRL+ARROW_UP for Clone Caret Above
CMD+SHIFT+CTRL+ARROW_DOWN for Clone Caret Below
Click on Apply and it will work
With WebStorm 11 (at least) the multi-caret keyboard shortcut is:
Ctrl then Ctrl+Arrow Up (or click & drag with the middle mouse button/scroll wheel)
then to select the full lines:
Home then Shift+End
which you could even create as a macro with a keyboard shortcut.
I used to accidentally activate the multi-caret all the time (I scroll with Ctrl+Up/Down), so I knew how to do part of it, but it took me ages to figure out that extra Ctrl tap at the beginning.
Hold down Alt + Shift and left click on the lines you want to select. This will put multiple cursors on the editor. Now you can use the Select Line at Caret option you mentioned to select all those lines.
You can find more about multiple selections here.
This is currently not possible with a selection. However, you can still do that from the keyboard. Instead of doing selections set up a shortcut for Clone Caret Above (Alt+Shift+U for me) and Clone Caret Bellow (Alt+Shift+D for me). This allows to go up or down a line and add a caret there. So instead of selecting each line, you directly move the caret there and clone it.
I am also coming from Sublime Text and missing that feature, but this worked also pretty well.
I am editing with two vertical tabs. The
Window | Editor Tabs | Goto next splitter
has no effect - the editing cursor remains in the present Editor Tab. For curiosity's sake I also tried "Goto previous splitter" - that also has no effect.
Is there something I am missing here? Any other shortcut / method to use keystrokes (not Mouse!) to navigate between Editor Tabs?
Note: Ctrl-E is not reliable for this - it sometimes goes to different documents in the same Editor Tab.
UPDATE
Apparently the editor "sort of" changes splitters: the titlebar and the Navigation panel change to the file in the other splitter. But the cursor does not move! The cursor stays in the original place - in the original splitter/editor tab! So then what the heck use is it to change splitters - I can not edit or navigate in the new splitter!
There are at least two other ways to do similar things as "Goto next/previous splitter".
You could try the "switcher" (Ctrl-Tab, OS X & Win) to switch between specific files.
Similarly, you can try the "Recent Files" (Ctrl+E, Win; ⌘E, OS X)
But whatever is causing the cursor to not follow the "Goto next/previous splitter" might make it not follow these options, either...
I'm using IntelliJ IDEA to write Java and finding the default Tab behaviour (inserting a tab at the cursor position) quite annoying. I want it to behave like Shift-Tab.
Shift-Tab de-indents the cursor line if there is no selection, or every line in the selection if there is one, regardless of the cursor's position on the line. I tried to make Tab behave the same way by changing the keymap settings: I unbound the Tab key from Editor Actions → Tab so that it'd perform Edit → Indent Selection. But that only makes it indent the selection: if there's no selection, pressing Tab now does nothing.
It appears that the de-indent action for Shift-Tab is actually Editor Actions → Unindent Selection, but there's no corresponding action for indenting.
How can I make the Tab key indent the current line (increase the indent by one stop) if there is no selection?
Remove the keyboard shortcut from "Tab"
Add "Tab" as a keyboard shortcut to "Indent Line or Selection". When the dialog pops up asking you to "Leave" or "remove", click "Leave".
This works on at least IDEA 14+ but I haven't tested it on anything before that
You can press Ctrl+W which selects the nearest item to the cursor and then press Tab to indent or Shift+Tab to unindent the current line.
Not exactly what you need, but you can try Code | Auto-Indent Lines. There is also a known bug about the difference in the selection indent/unindent behavior.