Question : SciTE abbreviation for Ruby

Hello,

Can anyone give me hints on how to setup & use abbreviation at SciTE? Especially for Ruby.

Thanks & regards.

Answer : SciTE abbreviation for Ruby

First you need to create entries in the abbrev.properties file
Options > Open Abbreviations File

entries are like this
cl=class

if you then type "cl" in your editor and press Ctrl + B
"class" will appear in your editor

with
cl=class\ninitialize()\nend
Ctrl + B
this will appear in your editor
class
initialize()
end

or you can select from a list using Ctrl + Shift + R

from the manual:
To use an abbreviation, type it and use the Expand Abbreviation command or the Ctrl+B key. The abbreviation is replaced by an expansion defined in the Abbreviations file. You can open the Abbreviations file with a command in the Options menu and add abbreviations. There is a default abbreviations file but a different abbreviations file can be set for particular file extensions.
Each line in the files looks like "abbreviation=expansion".
The abbreviations names can have any character (except perhaps control chars, surely for CR and LF), including high Ascii chars (accented chars).
Names have properties files limits: they cannot start with sharp (#) or space or tab (but can have spaces inside); and they cannot have '=' character inside.
Abbreviations names are limited to 32 characters. It is probably enough for abbreviations...
An expansion may contain new line characters indicated by '\n' and a caret position indicated by the '|' character. To include a literal '|' character, use '||'.
Some simple examples are included in the distributed Abbreviations file.
When expanding, the names don't need to be separated from the previous text. Ie. if you define 'é' as 'é', you can expand it inside a word.
If a name is the ending of another one, only the shorter will ever be expanded. Ie. if you define 'ring' and 'gathering', the later will see only the 'ring' part expanded.

cheers

Geert

Random Solutions  
 
programming4us programming4us