Alternative key combination for jumping to the end of a line to enter a semicolon - intellij-idea

Due to automatic code completion, I regularly find myself in between parentheses, having to get to the end of a line to add the inevitable semicolon.
Then I have to get my right hand up, move it to the right, hit End, and come back to the main part of the keyboard again to enter the semicolon.
I perceive this as disturbing to my flow of typing, especially when writing on a notebook, as then those moves of my hand are very inefficient.
Is there already a key combination for reaching the end of a line, or adding a semicolon, within the main keyboard area? Or is it possible to configure PhpStorm in those regards?
(I'm using PhpStorm, but I added the IntelliJ IDEA tag to this question as I guess they would be similar regarding those basic features.)

More efficiently: invoke Edit | Complete Current Statement (Ctrl+Shift+Enter) to automatically insert semicolon at end of line and start new line.

You can assign any keyboard shortcut to the Move Caret to Line End action in Settings | Keymap.

You need to try touchcursor. I just love it.

Related

PhpStorm IDE: Keyboard Home/Pos1 should move caret to real beginning of the line (character position 0) instead of the beginning of the first word

I'm in the process of switching (with some specific PHP production context) from Sublime Text(4x) to PhpStorm (2022.2).
I am of course trying to migrate as many features/habits as possible, as identical as possible to my new environment. Many things I have managed to do but I have a showstopper when it comes to using/keymapping the Home-/Pos1-Button as I was used to.
What I want:
Being somewhere in a line of (PHP) code I want to press the Home-/Pos1-Button to immediately get to the (really) first character(0) of the line which is the widespread default behaviour of that key.
What I get (problem):
When I hit that button once PhpStorm IDE moves the caret to the beginning of the first word/non-whitespace character of the current line and I need to hit the key again to really get to the beginning of the line. I have tried a couple of things but I get the feeling this is "intended" non-configurable behaviour...
Any help would be greatly appreciated.
I tried googling and configuring Settings > Editor > Keymap in many ways but did not succeed...
Go to Settings (Preferences on macOS) | Editor | General | Smart Keys | Home moves caret to first non-whitespace character -> disable.

How to stop IntelliJ from placing semicolons after an auto-completion?

so this is annoying me because I use tab to leave brackets etc and when I use auto-complete and a semicolon is being placed after the bracket this happens:
https://streamable.com/i9as2
as you can see in the first statement I'm having problems "jumping" over the semicolon while when I dont use the auto-completion in the second statement (and don't get the semicolon automatically) it's way easier to navigate through it with tab. I know that there is the shift-enter shortcut but I don't really want to develop a habbit of using it so often because I can imagine trying to do that when working with my other IDE's can become quite annoying. I searched through the options but did not find any option do disable that behavior. Does anyone know a way to get around this?
Second Tab press should jump after the semicolon, I've created a feature request for that.
It's already fixed and the fix will be available starting from 2019.2 IDE version.

Mid-line 'Jump to next line with indent' in IntelliJ IDE

You're typing a line of code and for whatever reason the caret isn't at the end of the line when you have finished typing it.
For example, in Python with IntelliJ's code completion.
I type:
def get_id(
and code completion automatically finishes it off to:
def get_id(self):
with the caret placed after the 'f' in 'self'.
Normally I'll press End then Enter to have the caret nicely indented for the next line. But End is an awkward key to hit—it moves around on different keyboards, it can be a long stretch or squashed in somewhere on a laptop.
IDEA's Ctrl+Enter line completion works well in some languages in some instances but not in others. The example above—it'll just push the ): down to the next line.
I've scanned through all the shortcut keys in IDEA's docs and third-party sites but can't see any shortcut to do this. Similarly, with auto quote or bracket completion when you just want to get past the closing quote/bracket to continue typing—I find myself just typing the closing quote/bracket instead of reaching for → or End.
Is there something obvious I'm overlooking?

What is the name of the keyboard shortcut &/or method in an IDE which allows me to jump past automatically generated </endtags>?

This question relates to a prior question which was answered for all practical purposes with a fellow telling me I simply needed to press the "End" key to skip the cursor to the end of the line. But a second respondee told me of other IDE's abilities to this (his words): "In some IDE, pressing the tab key will move your cursor to the next placeholders in the currently auto replaced element, and if there is no more placeholders, brings you past the end of the auto replaced text."
What is this ability called?
I'll show an example very quickly, if you or I were writing some code in Aptana or RubyMine (my two favorite IDE's)...
<table summary="Subject detail view">
<tr>
<th>Name*</th>**
</tr>
</table>
We'd eventually run into the location(*), where the single asterisk is. We would reach this point and be forced to either use our mouse to click past the auto-generated </endtag>, or our keyboard arrows, or, most recently, the "End" key which would skip our cursor to the end of the line.
But can't I just do this with tab like my friend told me? In order to be able to do this I need to know what this keyboard shortcut is called. I need a searchable keyword. Any additional feedback about keyboard/IDE shortcuts etc would also be appreciated.
RubyMine (and IntelliJ IDEA platform it's based on) doesn't have this feature yet. There is an open feature request in the YouTrack issue tracker:
IDEA-74666 Add Eclipse Style Paren/Bracket/Quote Completiton
I have figured out the king of all answers for this question, which is my own.
Create your own macro. It is stupid how easy this is to do (with Komodo Edit, at least).
To do this in Komodo Edit, for example, first set yourself up so your cursor is a position where you need the custom command, whatever that might be.
So, let's say your at the end of an xml tag with your cursor where this ("|") symbol is
<xmltag>blahblah|</xmltag>
Now the < /endtag> has been generated automatically, just to make sure you know that.
Now, go to Tools, Macros, Start Recording. Click it. relax, you can do this as many times as you like...it only records keystrokes, by the way, so do this only with your keyboard. To skip to the end of the tag without the arrow keys, use the 'End' key. And I don't mean to insult your intelligence, but in case you didn't know this, you need to use the End key and not the arrows because future tags could be any length.
OK so do this:
<xmltag>blahblah</xmltag>
|
So you're there. Good, now go to Tools, Macros, and stop the recording.
Next, click on tools, macros, and save the macro.
Then, go to your macro library (same tools submenu) and you should see in the toolbox the file which you named which contains your macro.
Right click it, Properties, Key Bindings tab, then set your custom command in the 'new' form. Apply. OK. You're done.
Test it out, and pat yourself on the back, you just learned something really, really, really useful.
Btw, here's another one I've created.
<!-- | -->
That is a macro command as well. Obviously, you could create an entire form with a simple macro command.

Saving a position while coding?

Back in olden times, I used to code with an editor that allowed you to mark where you were in the code with a keypress. You could jump to another point in the same or another file to check a reference or somesuch. When you were ready, you could hit another keypress and return to the point you saved.
I've long since migrated to Dreamweaver and wanted this functionality. Does it exist in DW? If so, I missed that part of the manual. If not, any suggestions on an editor that DOES have that functionality?
Scott.
There is no official way to do it, but you could use the code collapse feature to create something like a bookmark. Collapse the single line and DW will have a mark at that line number until you clear it.