anyone figure out how to..

how to get the cursor to the properly indented location? is there a keyboard shortcut that says "on this line, go to the appropriate indentation level given the block structure?" With the virtual space, it's annoying to try to get to the correct location by hitting the arrow keys or tab/shift-tab countless times, then overshooting the correct indentation and having to backtrack, etc..... any help on the keyboard shortcut for this would be awesome.

4 comments
Comment actions Permalink

Not really an exact answer to your question but if you don't like that virtual space in general you can uncheck Settings -> Editor -> Virtual Space -> Allow placement of caret after end of line. I have this off and typically the cursor will be in the correct position when I got to a blank line I want to edit.

If you want the virtual space then another option is to just type your code where ever your caret winds up and rely on "Reformat Code" to redo/correct the indentation.  I've had to force myself to not manually format code because I know one quick keyboard shortcut after I'm done typing will do the job much quicker.

0
Comment actions Permalink

I appreciate your suggestions and work arounds. I disabled the virtual space

I would be surprised that they would enable virtual space by default but not provide a key combo to quickly navigate to the correct indentation.

Anyone else figure it out? It's not on the keyboard shortcut ref pdf, and I can't seem to find it in the Help docs either....

Anyone from the IntelliJ IDEA team have some insight?

0
Comment actions Permalink

On Thu, 26 May 2011 22:56:52 +0000, Christian Posta wrote:

I would be surprised that they would enable virtual space by default but
not provide a key combo to quickly navigate to the correct indentation.

Anyone else figure it out? It's not on the keyboard shortcut ref pdf,
and I can't seem to find it in the Help docs either....


If you're on an empty line or one containing only whitespace then it
sounds like the "Move Caret to Line End" action (bound, by default, to
the "End" key) does what you want.

--
Mark Scott
mark@codebrewer.com

0
Comment actions Permalink

That works! I didn't think to press 'end' to get to the begining of the indented line, but it does work.
Thanks!

0

Please sign in to leave a comment.