Hi,
Im using Netbeans 6.1, and I was wondering what the shortcut to get System.out.println("") was?? :confused:
Printable View
Hi,
Im using Netbeans 6.1, and I was wondering what the shortcut to get System.out.println("") was?? :confused:
I dont know any shortcut but i use this to speed it up.
Type "Sys" then Ctrl+space enter
followed by ".o" then Ctrl+space enter
then ".p" then ctrl+space click println(); ^_^
Or sometime i just put it in my clipboard then paste it whenever i need it ^_^
Yes, as far as I know Ctrl+Space is the simplest way to do it. There is no any other shortcut for that.
Nice, so it's easy to type the text simply. ;)
The shortcut is sout + Tab.
This is, write 'sout' and then press 'Tab' key.
Most IDEs allow you to create your own short-cuts. So with Eclipse's Templates, I've created many, including SOP for System.out.println(...).
Yes it's true. But the mess-up is that Jkarreteros' post. The way he/she explain give influence that it's a standard shortcut on an IDE. That's why I confused. :)
sout<space> is a standard shortcut in NetBeans 5.5 and 6.1.
You can alsoand useCode:import static java.lang.System.out;
dbCode:out.println("...");
I've come quite accustomed to using snippit on linux. It's a text expander with scripting capabilities.
I have
where var gets placed intoCode:prntln#var
I use it for javadoc and search engines (along with FF keywords) too.Code:System.out.println("var");
For windows I believe texter is a descent text expander.
As for netbeans specific, go to tools->options->editor->code templates. You can add your own templates, just type in the abbreviation and press tab directly after and the abbreviation will be expanded.
Hope that helps you some,
automater
I have resorted in the past to creating a class called 'o' (yes, this violates convention, but who cares), with a single static member, also called 'o'.
System.out.println then becomes 'o.o'. I wouldn't use it for production code, but then, I wouldn't use System.out.println for production code either.
You can activate code templates (or create new ones) in :
Tools > Options > Editor > Code Templates in Netbeans 6.5
I can add that if you use the emacs key keymap, TAB won't work for autocompletion, you can change the key-shortcut here:
Tools > Options > Editor > Code Templates
at the bottom, there are predefined shortcuts for almost any java sentence
You can use sout + Tab in netbeans and
Sysout then Ctrl + Space in eclipse.
Been a bad day DB? ;-)
(Not that I disagree, of course.)
Even I'm not aware about that in NetBeans.