Giter Site home page Giter Site logo

snipmate's Introduction

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

snipMate.vim aims to be an unobtrusive, concise vim script that implements some of TextMate's snippets features in Vim. A snippet is a piece of often-typed text that you can insert into your document using a trigger word followed by a <tab>.

For instance, in a C file using the default installation of snipMate.vim, if you type "for<tab>" in insert mode, it will expand a typical for loop in C:

 for (i = 0; i < count; i++) {

 }

To go to the next item in the loop, simply <tab> over to it; if there is repeated code, such as the "i" variable in this example, you can simply start typing once it's highlighted and all the matches specified in the snippet will be updated.

Requires Vim 7 or higher.
For a quick introduction, see this screencast: http://vimeo.com/3535418
For more help see the documentation that comes with snipMate in ~/.vim/doc/snipMate.txt.

snipMate.vim has the following features among others:
  - The syntax of snippets is very similar to TextMate's, allowing easy conversion.
  - The position of the snippet is kept transparently (i.e., it does not use marks/placeholders inserted into the buffer), allowing you to escape out of an incomplete snippet, something particularly useful in Vim.
  - Variables in snippets are updated as-you-type.
  - Snippets can have multiple matches.
  - Snippets can be out of order. For instance, in a do...while loop, the condition can be added before the code.

Bug reports, feature requests, etc. are welcome and can be emailed to me or submitted on the issue tracker: http://code.google.com/p/snipmate/issues/list

If you would like to watch the development of this plugin, you can also follow it on github: http://github.com/msanders/snipmate.vim

Enjoy!

snipmate's People

Contributors

llinfeng avatar

Watchers

James Cloos 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.