From 477c0fc85218cba12597cf3daf7728b127b0fd64 Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Wed, 8 Dec 2010 19:43:54 -0600 Subject: doc: Finish merging remaining documentation updates Signed-off-by: Sol Jerome --- doc/unsorted/vim_snippet.txt | 65 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 doc/unsorted/vim_snippet.txt (limited to 'doc/unsorted/vim_snippet.txt') 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 + ${2} + + # Base + snippet + ${1} + + # Group + snippet + ${2} + + # ConfigFile + snippet + # Service + snippet + # Package + snippet + # Action + snippet + # Directory + snippet + # SymLink + snippet + # Permissions + snippet + + +#. Save and start editing away! + +Each of these snippets activates on the opening element, ie . +After this string is entered, but before entering a space, press , +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. -- cgit v1.2.3-1-g7c22