Re: shortcuts
Patrick May <[email protected]>
| Newsgroups | gmane.emacs.jdee |
|---|---|
| Message-ID | <[email protected]> |
On 14 Apr 2006, at 10:25, Pedro Sa da Costa wrote:
> In a java file, i want to expand the abbreviation ife, to if(){}else
> {}.
> Is there any shortcut key for this?
>
> When can i configure shortcut keys in jdee?
You could just add something like the following to your .emacs:
;; insert if/else template text
(defun insert-if-else ()
(interactive)
(insert "if ()\n {\n }\nelse\n {\n }\n"))
;; bind insert-if-else to C-c i
(global-set-key "\C-ci" 'insert-if-else)
Indenting correctly is left as an exercise for the reader. ;-)
Regards,
Patrick
------------------------------------------------------------------------
S P Engineering, Inc. | The experts in large scale distributed OO
| systems design and implementation.
[email protected] | (C++, Java, Common Lisp, Jini, CORBA, UML)