Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Auto add the semicolon
Auto add the semicolon [message #80635] Thu, 25 September 2008 04:45 Go to next message
Eugen is currently offline EugenFriend
Messages: 5
Registered: July 2009
Junior Member
Is there a keyboard shortcut to automatically add the semicolon at the end
of a line?

I know that CTRL+ENTER (I think) moves the cursor to the next line, but it
would be very helpful for me if there was a shortcut to add the semicolon
before going to the next line...
Re: Auto add the semicolon [message #80651 is a reply to message #80635] Thu, 25 September 2008 05:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: spam.networks.fi

Eugen wrote:
> Is there a keyboard shortcut to automatically add the semicolon at the
> end of a line?
>
> I know that CTRL+ENTER (I think) moves the cursor to the next line, but
> it would be very helpful for me if there was a shortcut to add the
> semicolon before going to the next line...
>

But there is! Put your cursor end of line and press SHIFT + ,
Re: Auto add the semicolon [message #80728 is a reply to message #80651] Thu, 25 September 2008 20:06 Go to previous messageGo to next message
Eugen is currently offline EugenFriend
Messages: 5
Registered: July 2009
Junior Member
I can't test right now, but does that work even if you're not at the end
of the line?
Re: Auto add the semicolon [message #80758 is a reply to message #80651] Thu, 25 September 2008 22:29 Go to previous messageGo to next message
Eugen is currently offline EugenFriend
Messages: 5
Registered: July 2009
Junior Member
hmmm... I tried (SHIFT + ,) and it didn't work... it just ads the "<"
character....
Re: Auto add the semicolon [message #80768 is a reply to message #80651] Thu, 25 September 2008 22:30 Go to previous messageGo to next message
Eugen is currently offline EugenFriend
Messages: 5
Registered: July 2009
Junior Member
hmmm... I tried (SHIFT + ,), but it doesn't work... it just adds the "<"
character...
Re: Auto add the semicolon [message #80780 is a reply to message #80768] Fri, 26 September 2008 00:48 Go to previous messageGo to next message
David Muir is currently offline David MuirFriend
Messages: 63
Registered: July 2009
Member
Eugen,

Jasmo is messing with you. (SHIFT + ,) on some keyboard layouts is the
semicolon. Inserting a semicolon at the end of the line is as simple as
pressing end semicolon. It's no harder than any other key-press
combinations. But I guess the point is that you don't want the cursor to
move... In that case, I think you're out of luck. Looks like the Java and
Javascript editors might have though. I think you can set it so that when
you press semicolon, it inserts it at the end of the line. Never tried
though so I can't say for sure.

David


Eugen wrote:

> hmmm... I tried (SHIFT + ,), but it doesn't work... it just adds the "<"
> character...
Re: Auto add the semicolon [message #532597 is a reply to message #80635] Mon, 10 May 2010 14:34 Go to previous messageGo to next message
mike v is currently offline mike vFriend
Messages: 1
Registered: May 2010
Junior Member
It is a useful feature and saves time indeed if you are a serious developer Wink

1) install Practically Macro for eclipse http://sourceforge.net/projects/practicalmacro/ by copying the .jar file into eclipse/plugins directory and restarting eclipse
2) record a macro - macro buttons (record, play etc.) will show up, press record and enter your key combination (for me on mac it is: Opt-Left, ';', Enter to get to the end of the line add a semicolon and a newline). Press record again to stop a macro and give a name to it
3) Go to preferences (Opt-, on mac) General -> Keys, and type the name of the macro and give it a shortcut (I have Opt-Enter)

Now each time you've finished typing a statement in php or c++ you just enter Opt-Enter (for example) - that saves you three shortcuts.

greets
mike
Re: Auto add the semicolon [message #868345 is a reply to message #532597] Tue, 01 May 2012 19:20 Go to previous message
Palmer Eldritch is currently offline Palmer EldritchFriend
Messages: 40
Registered: February 2011
Member
This is a feature I already miss from netbeans (control+;)
Is it not present in Eclipse still ? (3.7)
Please let me know


eclipse-kepler JEE
Win7 x64
Previous Topic:Debug stops on adodb.inc.php
Next Topic:How import project with inherited permissions
Goto Forum:
  


Current Time: Fri Mar 29 13:32:19 GMT 2024

Powered by FUDForum. Page generated in 0.03301 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top