sponsor Vim development Vim logo Vim Book Ad

tSkeleton : File Templates and Code Skeletons/Snippets

 script karma  Rating 1685/457, Downloaded by 18375  Comments, bugs, improvements  Vim wiki

created by
Tom Link
 
script type
utility
 
description
Demo:
http://vimsomnia.blogspot.com/2010/11/tskeleton-and-stakeholders-vim-plugins.html

Also available via git
http://github.com/tomtom/tskeleton_vim

Additional bits/snippets:
https://github.com/tomtom/tskeletons

tSkeleton provides file templates and code skeletons (snippets). These
templates may contain special tags that are replaced with some computed
value (e.g., variables, user input ...), vimscript code, or place
holders/jump positions (when used in conjunction with imap.vim or
|TSkeletonMapGoToNextTag()|.


File templates:

In order to add support for a new filetype, save a skeleton file to
~/.vim/skeletons/file.suffix and add something like this to your .vimrc
file:

    autocmd BufNewFile *.suffix       TSkeletonSetup template.suffix
    autocmd BufNewFile /here/*.suffix TSkeletonSetup othertemplate.suffix

Alternatively, you can store templates as:

    ~/vimfiles/skeletons/templates/GROUP/FILETYPE PATTERN


Code skeletons:

Smaller skeleton bits are stored in SKELETONS/bits/FILETYPE/ or
SKELETONS/bits/general/. I.e., code skeletons can be filetype specific
or generally available.

The filenames of the bits may be grouped in submenus as in:

    ../tex/&Define.%5Cnew&command
    ../tex/&Define.%5Cnew&environment

This will create skeletons for \newcommand and \newenvironment but will
group the skeletons under the TSkel.Define. menu with the respective
accelerators.


Default key maps:

    <Leader>## ... Expand name under cursor
    <Leader>#t ... Insert code skeleton via command line
    <c-\><c-\> ... In insert mode, expand the bit before the cursor (on
                   a German keyboard this happens to be <c-#><c-#>)


General remarks:

A list of special tags:

    <+FILE NAME ROOT+> :: the file name root
    <+FILE NAME+>      :: the file name
    <+FILE SUFFIX+>    :: the file suffix
    <+FILE DIRNAME+>   :: the file's directory
    <+NOTE+>           :: a note
    <+DATE+>           :: the current date (the format is controlled via
                          g:tskelDateFormat)
    <+AUTHOR+>         :: the author's name (g:tskelUserName)
    <+EMAIL+>          :: the author's e-mail (g:tskelUserEmail)
    <+WEBSITE+>        :: the author's homepage (g:tskelUserWWW)
    <+LICENSE+>        :: the name of the license this file is released
                          under (g:tskelLicense)

tSkeleton also supports the following pseudo-tags:
    <+CURSOR+>         :: where to place the cursor after insertion
    <+&NAME+>          :: a vim option
    <+g:NAME+>         :: a global variable
    <+b:NAME+>         :: a buffer local variable
    <+?QUERY?+>        :: query the user
    <+?VAR|QUERY?+>    :: query the user and propose some choices from
                          the variable ${VAR}
    <+bit:BIT>, <+bit:BIT|"DEFAULT">, <+bit:BIT|COMMANDS> :: insert a
                          bit; if the bit isn't defined for the current
                          filetype, use DEFAULT; if DEFAULT matches ".*"
                          insert it as a string; otherwise interpret it
                          as a command sequence to be fed to normal
    <+tskel:TSKELETON> ... :: same as the above
    <+include(TSKELETON)+> :: Another synonym for the above.
    <+call:FUNCTION(ARGS)+> :: Insert the result value of some function
    <+execute(EX COMMAND)+> :: Run a vim command.

Flow control:
    <+if(CONDITION)+>
    <+elseif(CONDITION)+>
    <+else+>
    <+endif+>

Loops:
    <+for(VAR in LIST)+>
    <+endfor+>, <+endfor(VAR)+>

Variables:
    <+let(VAR=VALUE)+>

Interaction:
    <+input(VAR, QUERY, [DEFAULT], [COMPLETION])+>

Other:
    <+nl+>
    <+joinline+>
    <+nop+>

A wiki like table could then be constructed using a skeleton like this:

    <+input('s:my_rows?!', 'Rows: ')+>
    <+input('s:my_cols?!', 'Cols: ')+>
    <+for(i in range(s:my_rows))+>
    |<+for(j in range(s:my_cols))+> <+CURSOR+> |<+endfor(j)+><+nop+>
    <+endfor(i)+>

Unknown tags are kept in the expanded skeleton. These tags can be used
as cursor jump marks. This syntax was originally used by imap (vimscript
#244 or vimscript #475). If you don't want to install imap, you can also  
use |TSkeletonMapGoToNextTag()|.

You can use vimscript #3326 to enhance your templates with dynamic placeholders.
 
install details
This script requires tlib (vimscript #1863).

Edit the vba file and type:

    :so %

See :help vimball for details. If you use vim 7.0, you probably need to
update vimball (vimscript #1502) first.

IMPORTANT: When updating from an older version, please remove the cache
files in ~/vimfiles/cache/tskel_*/** (or select "Reset" from the menu)
and (if existent) the directories ~/vimfiles/skeletons/menu,
~/vimfiles/skeletons/bbits.


If you don't already have some skeletons, you may want to download
the file tSkeleton-Samples.zip from the list below.


The files are stored in ~/vimfiles/skeletons or ~/.vim/skeletons (see
g:tskelDir). The directory structure should look like this:

    skeletons/
        NAME.SUFFIX (templates for new files)
        templates/
            GROUP/ (templates for new files)
                FILETYPE PATTERN.SUFFIX
        map/
            FILETYPE (map files for conditional expansion)
        bits/
            FILETYPE.txt (single line templates)
            general/
                GENERAL CODE SKELETONS ...
            FILETYPE/
                FILETYPE SPECIFIC CODE SKELETONS: ONE SKELETON PER FILE ...


You might want to use imaps.vim's (vimscript #244 or vimscript #475) place
holders in conjunction with this plugin..


If you don't use imaps.vim, you can :call TSkeletonMapGoToNextTag().
Like imaps, this will map <c-j> to a function that makes the cursor jump
to the next tag.


ATTENTION:

If you had an older version (pre 4.0) installed, you might also want to
remove the older cache directories in ~/.vim/skeletons/ (eg menu,
bbits).

If you add a new skeleton or template, you'll also have to do
:TSkeletonBitReset to make the plugin rescan the source directory.

If you update from 1.0, be aware that the default "markup" for place
holders has changed.

tSkeleton up to 2.1 is not compatible with vim7 up to patch 8. You need
at least vim 7.0.08 to use this plugin. For windows, current executables
including patches can be downloaded from the cream website.

tSkeleton 3 can cause an unpatched vim7 to crash. I'm not sure about
that though. If this happens to you, please update (vim) to a more
recent version.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
tskeleton.vba 5.02 2014-06-28 7.0 Tom Link - Check version of stakeholders if g:tskeleton#enable_stakeholders is true.
MD5 checksum: c7f28770f5153dd8b072d9fd2b1308ef
tskeleton.vba 5.01 2014-06-27 7.0 Tom Link - Help template
- TSkeletonSetup: Optional bang (always fill in buffer)
- FIX #9: TSkeletonSetup: <q-args> doesn't require escaping whitespace
- FIX #10: RetrieveBit: Chomp at most one newline (require tlib 1.10)
- FIX #11: Don't include :HiLink in doc
MD5 checksum: 40554c506d28c41491f3e219301829d8
tskeleton.vba 5.00 2013-08-20 7.0 Tom Link - Fix mysterious border case: Expansion after < in viki mode
- Support for $ENVIRONMENT_VARIABLES
- tskeleton#FillIn(): Make sure folding is disabled when expanding tags
- g:tskelNewBufferIsDirty: Optionally, mark new files from templates as modified
- g:tskelNewBufferIsDirty: Set based on the value of &hidden
- Adding user setting for a "COMPANY" tag.
- Call TSkeletonMapGoToNextTag() if g:tskelMapGoToNextTag
- The expansion of </name> type of tags was inserted at the wrong column
- tskeleton#Placeholders(): Make sure filetype is not empty
- Echo v:exception when catching errors
- Experimental: Also cache parsed bits/minibits
- Experimental: partial support for snippets (à la snipMate)
- Allow 0-9 in place holders
- Use g:snippets_dir if set
- snippets: slightly improved parsing
- Improved support for snippets
- g:tskelBitsDir is a path now (comma-separated list)
- tskeleton#GoToNextTag(): support for numbered place holders
- FIX: Escape menu items
- FIX: tskeleton#FetchMiniBits(): undefined a:filename (after previous commit)
- New defaults: enable snippets; enable stakeholders if loaded; enable g:tskelMapGoToNextTag
- Move tskeleton#ProcessTag_functions_with_parentheses() to tags.vim
- tskeleton#functions#FiletypeBits_vim(): Don't add items to menu
- snippets: Put snippets in Snippets submenu
- skeleton#GetDestBuffer(); postprocess attribute for bits => make snippet's `...` syntax work
- Setup stakeholders right after inserting the snippet in the destination buffer
- Replace g:tskelBitsDir with g:tskelGlobalBitsPath and g:tskelLocalBitsDirs (skeletons can be directory/project local)
- g:tskelMapGoToNextTag is a key/map now
- g:tskeleton#max_basename: Remove len of the cache dir name from the max filesize
- FIX: Unknown variable r
- tskeleton#TagRx(): better support for embedded strings
- duplicate help tags (fixes #6)
- addon-info
- tskeleton#EditBit(): Re-enable editing non-existing bits
- tskeleton#EditBit(): reset bit defs for correct filetype
- tskeleton#GoToNextTag(): correct selection if &sel != exclusive (fixes #7)
- tskeleton#FillIn(): Ensure &sel is "exclusive" (fixes #8)
MD5 checksum: a87f571652f29bd910cb47fb91153094
tskeleton.vba 4.13 2012-02-09 7.0 Tom Link - g:tskeleton#conceal_cchar: Conceal placeholders
- Use noautocmd
- Call tskeleton#PrepareBits() on FileType events
- debug
- s:EvalBitProcess(): Remove whole line comments (i.e. tskel:before/after sections may contain comments)
- Add TSkelPlaceHolder to all syntax clusters
- s:Eol(): No special treatment for insertmode
- Cache syntax clusters
MD5 checksum: c484c1da8c23e9abe02dde370cd094a1
tskeleton.vba 4.12 2011-12-17 7.0 Tom Link - C modifier in place holders prevented parsing of subsequent modifiers (fix #3)
- skeletons/README
MD5 checksum: 8d2aefc5b25058d211c1f427fc564bec
tskeleton.vba 4.11 2011-06-27 7.0 Tom Link - .gitignore
- Don't assume users have the set of standard templates installed (distributed separatedly)
MD5 checksum: b3f679c5dd30e9baca8965605ce4b364
tskeleton.vba 4.10 2010-11-15 7.0 Tom Link - Improved integration with stakeholders.vim
- s:SelectTagMode(): CursorSet() should respect value of g:tskelSelectTagMode
- tskeleton#GoToNextTag(): Missed last character for <++> tags if &sel wasn't "exclusive"
- FIX: further &selection-related issues
MD5 checksum: d126a6069b3d4452c0402f3db12286a0
tskeleton.vba 4.9 2010-09-14 7.0 Tom Link - CHANGE: Renamed plugin/tSkeleton.vim to plugin/tskeleton.vim
- CHANGE: Moved the definition of some variables from plugin/tSkeleton.vim to autoload/tskeleton.vim
- If g:tskelMapLeader is empty, don't define maps.
- Don't build a menu if g:tskelMenuPrefix == ''.
- If g:tskelDontSetup is defined and g:tskelMenuPrefix == '', autoload/tskeleton.vim won't be loaded on startup.
- Don't create g:tskelBitsDir if it doesn't exist
- "Mini bits": Load all .tskelmini files from the current file's  directory upwards
- s:InsertDefault handles <+CURSOR+> tags
- tskeleton#HyperComplete_query(): Set w:tskeleton_hypercomplete
- FIX: g:tskelHyperType = "pum" didn't work properly.
tSkeleton.vba.gz 4.7 2009-10-18 7.0 Tom Link - TSkeletonMapHyperComplete() (default: <c-space>): Map a magic key that expands skeletons or, if no matching templates were found, completions, tags, words etc.
- Minibits: Allow single words as bit definition: "word" expands to "word<+CURSOR+>"
- TSkeletonSetup: allow full filenames as argument
- Auto templates: don't cd into the templates directory
- tskeleton#ExpandBitUnderCursor(): Third argument is a dictionary.
- FIX: Problem with <+name/expandsion+> kind of tags when located at the beginning or end of a line
- s:GetBitDefs()
- Improved tskeleton#Complete() (for use as completefunc or omnifunc)
- FIX: Cursor positioning after expanding templates without a <+CURSOR+> tag
- Don't build the menu for tSkeleton scratch buffers
- Require tlib 0.29
tSkeleton.vba.gz 4.5 2008-12-02 7.0 Tom Link - Make sure tlib is loaded even if it is installed in a different rtp-directory
- Call s:InitBufferMenu() earlier.
- C modifier: Consider _ whitespace
- g:tskelMarkerExtra (extra markers for tskeleton#GoToNextTag)
tSkeleton.vba.gz 4.3 2008-01-05 7.0 Tom Link - bbcode group
- tskelKeyword_{&ft} and tskelGroup_{&ft} variables can be buffer-local
- Case-sensitivity can be configured via [bg]:tskelCaseSensitive and
[bg]:tskelCaseSensitive_{&filetype}
tSkeleton.vba.gz 4.2 2007-11-12 7.0 Tom Link - Enable <+CURSOR/foo+>. After expansion "foo" will be selected.
- New (old) default values: removed 'abbreviations' from g:tskelTypes
and set g:tskelAutoAbbrevs to 0 in order to minimize surprises.
- Enabled tex-Skeletons for the viki filetype
- FIX: Place the cursor at the end of an inserted bit that contains no
cursor marker (which was the original behaviour).
- Split html bits into html and html_common; the java group includes
html_common.
- CHANGE: Made bit names case-sensitive
- NEW: select() tag (similar to the query tag)
tSkeleton.vba.gz 4.1 2007-09-19 7.0 Tom Link - Automatically define iabbreviations by adding [bg]:tskelAbbrevPostfix
(default: '#') to the bit name (i.e., a bit with the file "foo.bar" will
by default create the menu entry "TSkel.foo.bar" for the bit "bar" and
the abbreviation "bar#"). If this causes problems, set
g:tskelAutoAbbrevs to 0.
- Bits can have a <tskel:abbrev> section that defines the abbreviation.
- New type 'abbreviations': This will make your abbreviations accessible
as templates (in case you can't remember their names)
- New experimental <tskel:condition> section (a vim expression) that
checks if a bit is eligible in the current context.
- New <+input()+> tag.
- New <+execute()+> tag.
- New <+let(VAR=VALUE)+> tag.
- <+include(NAME)+> as synonym for <+bit:NAME+>.
- Experimental <+if()+> ... <+elseif()+> ... <+else+> ... <+endif+>,
<+for(var in list)+> ... <+endfor+> tags.
- Special tags <+nop+>, <+joinline+>, <+nl+> to prevent certain
problems.
- These special tags have to be lower case.
- Made tskeleton#GoToNextTag() smarter in recognizing something like:
<+/DEFAULT+>.
- Defined <Leader>## and <Leader>#<space> (see g:tskelMapLeader) as
visual command (the user will be queried for the name of a skeleton)
- Some functions have moved and changed names. It should now be possible
to plug-in custom template expanders (or re-use others).
- Use append() via tlib#buffer#InsertText() to insert bits. This could
cause old problems to reappear although it seems to work fine.
- The markup should now be properly configurable (per buffer; you can
set template-specific markers in the tskel:here_before section).
- Require tlib 0.14
- The default value for g:tskelUseBufferCache is 0 as many people might
find the accumulation of cached information somewhat surprising. Unless
you use tag/functions type of skeleton bit, it's unnecessary anyway.
- Removed the dependency on genutils.
- The g:tskelMarkerCursor variable was removed and replaced with
g:tskelMarkerCursor_mark and g:tskelMarkerCursor_rx.
tSkeleton.vba.gz 4.0 2007-09-08 7.0 Tom Link - Renamed g:tskelPattern* variables to g:tskelMarker*
- If g:tskelMarkerHiGroup is non-empty, place holders will be
highlighted in this group.
- Re-enable 'mini' in g:tskelTypes.
- Calling TSkeletonBit with no argument, brings up the menu.
- Require tlib 0.12
- CHANGE: The cache is now stored in ~/vimfiles/cache/ (use
tlib#cache#Filename)
- INCOMPATIBLE CHANGE: Use autoload/tskeleton.vim
- FIX: Problem with cache name
- FIX: Problem in s:IsDefined()
- FIX: TSkeletonEditBit completion didn't work before expanding a bit.
- FIX: Command-line completion when tSkeleton wasn't invoked yet (and
menu wasn't built).
tSkeleton.vba.gz 3.5 2007-07-18 7.0 Tom Link - FIX: Minor problem with auto-templates
tSkeleton.vba.gz 3.4 2007-07-17 7.0 Tom Link - Automatically reset bits information after editing a bit.
- Automatically define autocommands for templates with the form "NAME
PATTERN" (where "#" in the pattern is replaced with "*"), i.e. the
template file "text #%2ffoo%2f#.txt" will define a template for all new
files matching "*/foo/*.txt"; the filetype will be set to "text"
- These "auto templates" must be located in
~/.vim/skeletons/templates/GROUP/
- TSkeletonCB_FILENAME(), TSkeletonCB_DIRNAME()
- FIX: TSkeletonGoToNextTag() didn't work properly with ### type of
markers.
- FIX: TSkeletonLateExpand(): tag at first column
- FIX: In templates, empty lines sometimes were not inserted in the
document
- FIX: Build menu on SessionLoadPost event.
- FIX: Protect against autocommands that move the cursor on a BufEnter
event
- FIX: Some special characters in the skeleton bit expansion were escaped
twice with backslashes.
- Require tlib 0.9
- Make sure &foldmethod=manual in the scratch buffer
tSkeleton.vba.gz 3.3 2007-05-17 7.0 Tom Link - New :TSkeletonEditBit command
- FIX: Embedded <tskel> tags in file templates didn't work
tSkeleton.vba.gz 3.2 2007-05-15 7.0 Tom Link - "tags" & "functions" types are disabled by default due to a noticeable
delay on initialization; add 'tags' and 'functions' to g:tskelTypes to
re-enable them (with the new caching strategy, it's usable, but can
produce much noise; but this depends of course on the way you handle
tags)
- Improved caching strategy: cache filetype bits in
skeletons/cache_bits; cache buffer-specific bits in
skeletons/cache_bbits/&filetype/path (set g:tskelUseBufferCache to 0 to
turn this off; this speeds up things quite a lot but creates many files
on the long run, so you might want to purge the cache from time to time)
- embedded <tskel:> tags are now extracted on initialization and not
when the skeleton is expanded (I'm not sure yet if it is better this
way)
- CHANGE: dropped support for the ~/.vim/skeletons/prefab subdirectory;
you'll have to move the templates, if any, to ~/.vim/skeletons
- FIX: :TSkeletonEdit, :TSkeletonSetup command-line completion
- FIX: Problem with fold markers in bits when &fdm was marker
- FIX: Problems with PrepareBits()
- FIX: Problems when the skeletons/menu/ subdirectory didn't exist
- TSkeletonExecInDestBuffer(code): speed-up
- Moved functions from EncodeURL.vim to tlib.vim
- Updated the manual
- Renamed the skeletons/menu subdirectory to skeletons/cache_menu
tSkeleton.vba.gz 3.1 2007-04-26 7.0 Tom Link - Tag-based code completion for vim
- Made the supported skeleton types configurable via g:tskelTypes
- FIX: Tag-based skeletons the name of which contain blanks
- FIX: Undid shortcut that prevented the <+bit:+> tag from working
- Preliminary support for using keys like <space> for insert mode
expansion.
tSkeleton.vba.gz 3.0 2007-04-24 7.0 Tom Link This version is probably less stable than the predecessor. Or maybe not.
- Partial rewrite for vim7 (drop vim6 support)
- Now depends on tlib (vimscript #1863)
- "query" now uses a more sophisticated version from autoload/tlib.vim
- The default value for g:tskelQueryType is "query".
- Experimental (proof of concept) code completion for vim script
(already sourced user-defined functions only). Use :delf
TSkelFiletypeBits_prototypes_vim to disable this as it can take some
time on initialization.
- Experimental (proof of concept) tags-based code completion for ruby.  
Use :delf TSkelProcessTag_ruby to disable this. It's only partially
useful as it simply works on method names and knows nothing about
classes, modules etc. But it gives you an argument list to fill in. It
shouldn't be too difficult to adapt this for other filetypes for which
such an approach could be more useful.
- The code makes it now possible to somehow plug in custom bit types by
defining TSkelFiletypeBits_{NAME}(dict, filetype), or
TSkelFiletypeBits_{NAME}_{FILETYPE}(dict, filetype),
TSkelBufferBits_{NAME}(dict, filetype),
TSkelBufferBits_{NAME}_{FILETYPE}(dict, filetype).
- FIX s:RetrieveAgent_read(): Delete last line, which should fix the
problem with extraneous return characters in recursively included
skeleton bits.
- FIX: bits containing backslashes
- FIX TSkeletonGoToNextTag(): Moving cursor when no tag was found.
- FIX: Minibits are now properly displayed in the menu.
tSkeleton-Samples.zip 3.0samples 2007-04-24 6.0 Tom Link This files contains some templates to be used with this plugin. They were previously distributed with the plugin.
tSkeleton.zip 2.3a 2006-10-03 6.0 Tom Link Support for current versions of genutils (> 2.0), really
tSkeleton.zip 2.2 2006-09-23 6.0 Tom Link - Don't display query menu, when there is only one eligible bit
- EncodeURL.vim now correctly en/decoded urls
- UTF8 compatibility -- use col() instead of virtcol() (thanks to Elliot Shank)
tSkeleton.zip 2.1 2006-05-10 6.0 Tom Link - Don't accidentally remove torn off menus; rebuild the menu less often
- Maintain insert mode (don't switch back to normal mode) in <c-\><c-\> imap
- If no menu support is available, use the <SID>Query function to let the user select among eligible bits (see also g:tskelQueryType)
- Create a normal and an insert mode menu
- Fixed selection of eligible bits
- Ensure that g:tskelDir ends with a (back)slash
- Search for 'skeletons/' in &runtimepath & set g:tskelDir accordingly
- If a template is named "#.suffix", an autocmd is created automatically.
- Set g:tskelQueryType to 'popup' only if gui is win32 or gtk.
- Minor tweak for vim 7.0 compatibility
tSkeleton.zip 2.0 2005-08-11 6.0 Tom Link - You can define "groups of bits" (e.g. in php mode, all html bits are
  available too)
- context sensitive expansions (only very few examples yet); this causes
  some slowdown; if it is too slow, delete the files in .vim/skeletons/map/
- one-line "mini bits" defined in either
  ./vim/skeletons/bits/{&filetype}.txt or in $PWD/.tskelmini
- Added a few LaTeX, HTML and many Viki skeleton bits
- Added EncodeURL.vim
- Hierarchical bits menu by calling a bit "SUBMENU.BITNAME" (the "namespace"
  is flat though; the prefix has no effect on the bit name; see the "bib"
  directory for an example)
- the bit file may have an ampersand (&) in their names to define the
  keyboard shortcut
- Some special characters in bit names may be encoded as hex (%XX as in
  URLs)
- Insert mode: map g:tskelMapInsert ('<c-\><c-\>', which happens to be the
  <c-#> key on a German qwertz keyboard) to TSkeletonExpandBitUnderCursor()
- New <tskel:msg> tag in skeleton bits
- g:tskelKeyword_{&filetype} variable to define keywords by regexp (when
  'iskeyword' isn't flexible enough)
- removed the g:tskelSimpleBits option
- Fixed some problems with the menu
- Less use of globpath()
tSkeleton.zip 1.5 2005-07-28 6.0 Tom Link - Menu of small skeleton "bits"
- TSkeletonLateExpand() (mapped to <Leader>#x)
- Disabled <Leader># mapping (use it as a prefix only)
- Fixed copy & paste error (loaded_genutils)
- g:tskelDir defaults to $HOME ."/vimfiles/skeletons/" on Win32
- Some speedup
tSkeleton.zip 1.4 2005-05-19 6.0 Tom Link - Popup menu with possible completions if TSkeletonExpandBitUnderCursor() is
called for an unknown code skeleton (if there is only one possible completion,
this one is automatically selected)
- Make sure not to change the alternate file and not to distort the window
layout
- require genutils
- Syntax highlighting for code skeletons
- Skeleton bits can now be expanded anywhere in the line. This makes it
possible to sensibly use small bits like date or time.
- Minor adjustments
- g:tskelMapLeader for easy customization of key mapping (changed the map
leader to "<Leader>#" in order to avoid a conflict with Align; set
g:tskelMapLeader to "<Leader>t" to get the old mappings)
- Utility function: TSkeletonGoToNextTag(); imaps.vim like key bindings via TSkeletonMapGoToNextTag()
tSkeleton.zip 1.3 2005-03-06 6.0 Tom Link - TSkeletonCleanUpBibEntry (mapped to <Leader>tc for bib files)
- complete set of bibtex entries
- fixed problem with [&bg]: tags
- fixed typo that caused some slowdown
- other bug fixes
- a query must be enclosed in question marks as in <+?Which ID?+>
- the "test_tSkeleton" skeleton can be used to test if tSkeleton is working
- and: after/before blocks must not contain function definitions
tSkeleton.zip 1.2 2005-03-02 6.0 Tom Link - new pseudo tags: bit (recursive code skeletons), call (insert function result)
- before & after sections in bit definitions may contain function definitions
- fixed: no bit name given in <SID>SelectBit()
- don't use ={motion} to indent text, but simply shift it
tSkeleton.zip 1.1 2005-01-20 6.0 Tom Link - Skeleton bits (small inline skeletons or whatever you want to call it)
- User-defined tags
- Modifiers <+NAME:MODIFIERS+> (c=capitalize, u=toupper, l=tolower, s//=substitute)
- the default markup for tags has changed to <+TAG+> (for "compatibility" with
imaps.vim), the cursor position is marked as <+CURSOR+> (but this can be
changed by setting g:tskelPatternLeft, g:tskelPatternRight, and
g:tskelPatternCursor)
- in the not so simple mode, skeleton bits can contain vim code that is
evaluated after expanding the template tags (see .../skeletons/bits/vim/if for
an example)
- function TSkeletonExpandBitUnderCursor(), which is mapped to <Leader>#
- utility function: TSkeletonIncreaseRevisionNumber()
tSkeleton.zip 1.0 2004-12-20 6.0 Tom Link Initial upload
ip used for rating: 142.132.191.50

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github