Missing features in Idea's editor Follow
Hi,
I've just switched to Idea from Eclipse and I really miss some features of Eclepse' editor:
1/ I don't understand why there are two different code completitions.
When I want to complete the name of previously declared variable I use CtrlSpace but when I want to use interface actually not imported I have to use CtrlAlt+Space .... Collecti -> Collection
In Eclipse there is Ctrl+Space and that's all...
2/ This point is very very very annoying. I want Idea to generate getters/setters at the end of the class - in eclipse there is a dialog where I can specify the positiion of generated code.
3/
....public static void main(String[] args) {
........code
........code
X
....}
Consider this code and cursor at 'X'. When I press Tab I want Idea to move cursor under 'code', not 'public'...it means it sholud make 8 spaces instead of 4. Eclipse behaves like that.
4/ String a = class.method(X)
When I type '(' Idea completes it with ')' and moves cursor between brackets. But when method doesn't have any arguments, I must move cursor after ')' to finish it with ';'. But moving using right arrow is ineffective - in Eclipse I can use 'Tab' which is really faster.
Even when method has an argument:
String a = class.method(argument[Tab]) moves cursor at the end of the line.
is there any plugin or hack for these useful features?
Thank you
Please sign in to leave a comment.
+1 to all 4
"tomL" <no_mail@jetbrains.com> wrote in message
news:28984743.1169742012286.JavaMail.itn@is.intellij.net...
>
>
>
>
>
>
>
>
>
>
>
Only 2? There are more than that...see this discussion:
http://www.intellij.net/forums/thread.jspa?forumID=22&threadID=265378#5180650
Are we to the point that a proper feature request should be filed for unified code completion? If so and if JetBrains is at all interested, I'd be glad to submit the feature.
Have you tried CtrlShiftEnter? It will move you outside the parens and complete the statement by adding a semi-colon.
>Have you tried CtrlShiftEnter? It will move you outside the parens and complete the statement by adding a semi-colon.
What if you just want to go to the end of the line - without having anything added ?
Or was that ctrl-shift-scroll_lock while holding spacebar with your nose, pressing F5 with your tongue and F1, F3 and F7 simultaneously with your toes ?
The shortcut keys in IDEA are neither short nor do they cut the job. Several keys for the same task ( as in #1 ) and complex keysets ( and maybe even unusable keysets for some ? - is ctrl-` or ctrl-/ used anywhere ? Both are pairs that couldn't be used on my keyboard.. ) make the shortcuts combersome at best to use.
So far I do without the shortcuts and try to use the menus, mainly since I have to use several development platforms and I really don't want to get all my shortcuts mixed up.
Simple is good. It's good enough (period).If asked, I'll vote for a simplification of the shortcut keyset.
Press the End key. You can of course map Shift-left-swizzlestick to the End key behavior if you want.
Jon
I write code with 10 fingers and using of Tab is very effective...unlike moving my hand to End key :(
1 : as far as I understand it, Ctrl-Space is very cheap processing wise, as it is restricted to the current scope. whereas ctrlshiftspace may take more time.
2 : Alt+Ins puts code where the cursor is AFAIK
3 : no idea
4 : I don't really get it.
I just tried
long t = System.current^type CtrlSpace here
Which results in
long t = System.currentTimeMillis()
with the cursor being after the closing ).
So if you try to complete without opening the parentheses it's completely ok (if there is no overloaded methods with some accepting arguments of course).
There's also CtrlShiftSpace. which has it's uses... :)
Take a look at the Rearranger plugin - http://www.intellij.org/twiki/bin/view/Main/RearrangerPlugin
I've not tried it, but there's a possibility that this plugin does that - http://www.intellij.org/twiki/bin/view/Main/AlignerPlugin
You can do some tuning via Settings/IDE/Code Complete/Brackets (v5 - may have changed in 6) but not sure if they'l get you 100% there.
But pressing the END key to jump to the end of a line works in all editors
around the world. I don't know any editor which uses the TAB key to jump to
the line end, except maybe Eclipse (I did not verify it).
BTW, have you tried Ctrl-Shift-Space in your example? Or Ctrl-Shift-Enter?
Or just type the closing bracket. IDEA is smart enough to not enter a
second bracket, it just skips over the one inserted automatically.
Just make sure that "Smart End key" is turned on in the Editor Settings,
and then hit "End" (instead of Tab).
Regards,
Jens
+1 How about making a feature request for this. I would vote for it. The CTRL-N works the same way. when it cannot find a class, it pulls in the non-class files. I think this would be a perfect way to reuse that code.
I think you are retarded for wanting them at the bottom, but I guess that is excuseable because you have used Eclipse for a while. The Rearranger plugin can do that for you, but it would be smarter if there was a way to specify how you want your properties/getters/setters arranged and have the generated fields follow that code style. You would have to post a request for that and have people vote on it.
I believe that is your code style settings. Maybe we need to lobby to get the default settings changed. I feel your pain.
Just to be sure, you say I'm stupid for wanting getters/setters at the end of a class?
Well, give me your argument for saying this - the mine is that I don't want to scroll down through these usually one line methods ("return this.id;") to see the full-value method which is somewhere at the bottom...
You can simply type the closing bracket in this case. IDEA will not add an additional bracket but 'replace' the already existing one hence the cursor will be placed after the closing bracket with exactly one (intuitive?) key press. why use any special key for that? :)
welo
When someone switches IDEs it isn't that one is better than the other it is just that the shortcuts are different. If I try to use Eclipse I am pretty well totally lost because my normal keyboard shortcuts don't work. I use a lot of keyboard shortcuts and I use the VI plugin so I rarely take my fingers off the keyboard when I am coding.
1) I believe it is a performance issue. There is also ctrlshiftspace. This is actually the biggest complaint Eclipse users have about IntelliJ.
2) Place the cursor wherever you want the getters/setters generated and then press Alt+Ins, that is where they will be generated.
3) Hmm, IntelliJ always lines up the cursor under the previous line for me.
4) I don't know of a single keystroke that accomplishes this (although there very well could be). I either type the ")" or use ctrlshiftenter which has the added benefit of adding the semi-colon for me and any closing parenthesis I may have forgotten.
just don't use the page up/page down key and use ctrl+f12 or the structure to directly reach the portion of the code you're interested in then :)
I have my code style set to collapse simple getters and setters and I also use CTRL+F12.