View previous topic :: View next topic |
Author |
Message |
Shadow Skill Veteran
Joined: 04 Dec 2004 Posts: 1023
|
Posted: Tue Oct 31, 2006 8:49 am Post subject: Emacs abbreviation and skeleton questions |
|
|
I figured I would take a stab at setting up abbreviations in emacs this morning and I cannot seem to get it to do what I want. I tried the following as a basic skeleton and managed to get it to output the statement correctly but I could not get ";ife" to automagically expand like I want here is what I have so far: Code: |
(define-abbrev ruby-mode-abbrev-table ";ife"
"" 'ruby-skeleton-if-else-endif)
(define-skeleton ruby-skeleton-if-else-endif
"Insert an if - else - end if region" nil
" if" "" _"" \n
>"elsif" \n
\n
>""_""\n
-3"end")
|
It would be great if the abbreviation could be made to prompt for the conditions for the if and the else clause as well.
Any pointers to getting this thing working will be greatly appreciated.
Also is there someway to save skeletons in a file so that they are available for use every time I load emacs? (I would prefer not to use the .emacs file for skeletons.) _________________ Ware wa mutekinari.
Wa ga kage waza ni kanau mono nashi.
Wa ga ichigeki wa mutekinari.
"First there was nothing, so the lord gave us light. There was still nothing, but at least you could see it." |
|
Back to top |
|
|
Shadow Skill Veteran
Joined: 04 Dec 2004 Posts: 1023
|
Posted: Mon Nov 13, 2006 10:18 am Post subject: |
|
|
no one at all? _________________ Ware wa mutekinari.
Wa ga kage waza ni kanau mono nashi.
Wa ga ichigeki wa mutekinari.
"First there was nothing, so the lord gave us light. There was still nothing, but at least you could see it." |
|
Back to top |
|
|
jcornez Apprentice
Joined: 12 Jan 2006 Posts: 201 Location: Spain
|
|
Back to top |
|
|
|