diff options
author | Fabian Affolter <fabian@bernewireless.net> | 2010-12-13 23:26:31 +0100 |
---|---|---|
committer | Fabian Affolter <fabian@bernewireless.net> | 2010-12-13 23:26:31 +0100 |
commit | 875aefd9beb9e7fd464348c0e0fa42896dc329ff (patch) | |
tree | 6c9920648f7c56a9a5854c1dafa474d8e8139508 /doc/unsorted/vim_snippet.txt | |
parent | f5792d907e357c90624ec110d908d42b94296a12 (diff) | |
parent | 71bb583ac04ff1c52e03d69a91bbb508783566f8 (diff) | |
download | bcfg2-875aefd9beb9e7fd464348c0e0fa42896dc329ff.tar.gz bcfg2-875aefd9beb9e7fd464348c0e0fa42896dc329ff.tar.bz2 bcfg2-875aefd9beb9e7fd464348c0e0fa42896dc329ff.zip |
Merge remote branch 'upstream/master'
Diffstat (limited to 'doc/unsorted/vim_snippet.txt')
-rw-r--r-- | doc/unsorted/vim_snippet.txt | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/doc/unsorted/vim_snippet.txt b/doc/unsorted/vim_snippet.txt new file mode 100644 index 000000000..e4fda7eca --- /dev/null +++ b/doc/unsorted/vim_snippet.txt @@ -0,0 +1,65 @@ +.. -*- mode: rst -*- + +.. _unsorted-vim_snippet: + +=================== +Vim Snippet Support +=================== + +This page describes using vim with snipMate and a set of snippets +that allow quick composition of bundles and base files. + +#. Download snipMate from http://www.vim.org/scripts/script.php?script_id=2540 +#. Install it using the install instructions (unzip snipMate.zip -d ~/.vim or equivalent, e.g. $HOME\vimfiles on Windows) +#. Add the following to ``~/.vim/snippets/xml.snippets`` + + .. code-block:: cl + + # Bundle + snippet <Bundle + <Bundle name='${1:bundlename}'> + ${2} + </Bundle> + # Base + snippet <Base + <Base> + ${1} + </Base> + # Group + snippet <Group + <Group name='${1:groupname}'> + ${2} + </Group> + # ConfigFile + snippet <Config + <ConfigFile name='${1:filename}'/> + # Service + snippet <Service + <Service name='${1:svcname}'/> + # Package + snippet <Package + <Package name='${1:packagename}'/> + # Action + snippet <Action + <Action name='${1:name}'/> + # Directory + snippet <Directory + <Directory name='${1:name}'/> + # SymLink + snippet <SymLink + <SymLink name='${1:name}'/> + # Permissions + snippet <Permissions + <Permissions name='${1:name}'/> + + +#. Save and start editing away! + +Each of these snippets activates on the opening element, ie <Bundle>. +After this string is entered, but before entering a space, press <TAB>, +and the snippet will be expanded. The template will be inserted into +the text with a set of input prompts, which default to overwrite mode +and can be tabbed through. + +The code above only works for bundles and base, but will be expanded +to support other xml files as well. |