This plugin provides snippets for omelette language as well as some basic syntax highlighting.
vim-omelette requires snipmate installed.
Get the latest package from snipmate's site and run unzip snipMate.zip -d ~/.vim
git clone git://github.com/barnaba/Omelette-Vim-Snippets.git
cp -r Omelette-Vim-Snippets/vim/* ~/.vim/
Snipmate works by expanding trigger words. After typing trigger word hit tab to expand it. Then you can use tab to move between placeholders and customize generated code.
Note: the filetype has to be uml
. You should use .uml
file extension.
:Fromage
command will compile and display current buffer.
typing
g
and hitting Tab will produce:
generalization
source-object : subclass
target-object : superclass
you can use Tab to set the handle of relation, and both source and target objects:
generalization handle
source-object : son
target-object : father
Currently you can only customize the name of the temporary file, which :Fromage
command creates, and the name of imageviewer you want to use.
It is done by adding the following lines to your .vimrc
:
"image viewer you want to use, default is eye of gnome
let g:FromageViewer="eog"
"Where do you want the temporary file. Default is /tmp/asd.png"
g:FromageFile="/tmp/asd.png"
Most of snippets for complicated objects (such as relations) come in two flavours: short, and long. Short version is usually one or two letters and will produce basic output (minimum required to make working object in omelette). Long version produces object with all possible properties.
Object | Short trigger | Long trigger |
---|---|---|
class | c | cls |
relation | r | rel |
association | a | ass |
generalization | g | gen |
aggregation | A | agg |
composition | C | com |
usecase | uc | - |
actor | ua | - |
note | n | - |
There are also snippets for class methods and attributes.
For methods all snippets are "uppercase". For attributes all snippets are "lowercase".
Method | Attribute | |
---|---|---|
Private | _ | - |
Protected | + | = |
Public | # | 3 |