Code Monkey home page Code Monkey logo

skeleton's Introduction

This is a mirror of http://www.vim.org/scripts/script.php?script_id=2291

*skeleton* is a Vim plugin to set up a skeleton for a newly created buffer.
Once you put skeleton files into specific directories, appropriate ones will
be automatically expanded for newly created buffers.

- Skeleton files must be put in a directory named "xtr/skeleton/" which is
  under any directory listed in 'runtimepath'.

  For example: ~/.vim/xtr/skeleton/

- The name of a skeleton file should be "{filetype}" or "{filetype}-{suffix}",
  where {filetype} is the 'filetype' for a newly created buffer and {suffix}
  is an arbitrary string.

  The former "{filetype}" is used as the default skeleton file for that
  'filetype'.  The latter "{filetype}-{suffix}" is used to override the
  default one for some cases which are speicifed by user.

  For example: ~/.vim/xtr/skeleton/vim ~/.vim/xtr/skeleton/vim-plugin

- Whenever user starts to edit a file that doesn't exists:

  1) Skeleton publish a |User:plugin-skeleton-detect| event.  This event can
     be used to |:SkeletonLoad| a special skeleton file other than the default
     one.

  2) If |:SkeletonLoad| is not done for the previous step, Skeleton executes
     the following command:

	execute 'SkeletonLoad' &l:filetype

     This means a skeleton file named "{filetype}" in a directory
     "xtr/skeleton/" which is under any directory listed in 'runtimepath' is
     loaded as a skeleton file.

     If there is no such skeleton file, nothing will be happened.


Requirements:
- Vim 7.1 or later

Latest version:
http://github.com/kana/vim-skeleton

Document in HTML format:
http://kana.github.com/config/vim/skeleton.html

skeleton's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.