Skip to content

barnaba/Omelette-Vim-Snippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

omelette vi fromage

This plugin provides snippets for omelette language as well as some basic syntax highlighting.

example of syntax highlighting

Dependencies

vim-omelette requires snipmate installed.

Get the latest package from snipmate's site and run unzip snipMate.zip -d ~/.vim

Installation

  1. git clone git://github.com/barnaba/Omelette-Vim-Snippets.git
  2. cp -r Omelette-Vim-Snippets/vim/* ~/.vim/

Usage

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.

Example

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

Customization

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"

Snippets

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published