Bootstrap 3.2 markup snippets for vim-snipmate
Switch branches/tags
Nothing to show
Latest commit 3260e07 Jan 31, 2015 @bonsaiben Update README for Haml
Failed to load latest commit information.

Bootstrap Snippets

HTML and Haml snippets for Twitter Bootstrap 3.3.2 markup, for the Vim plugin snipMate.



Installation using Pathogen

$ cd ~/.vim
$ mkdir bundle
$ cd bundle

# Install dependencies:
$ git clone
$ git clone
$ git clone

# Install bootstrap-snippets
$ git clone -b bootstrap-3-3-2 git://


In an html or haml file, type a trigger name in Insert mode, and press Tab to expand it into HTML markup.

Trigger names are meant to be as predictable as possible without being too long or redundant.

Most trigger names correspond directly to the relevant tag or class name, minus hyphens. For example, btnprimary becomes:

<button type="button" class="btn btn-primary">Default</button>

Markup with .btn class uses the <button> tag by default, however there is usually a corresponding <a> tag version with the same trigger preceded by an a. For example, with btnprimary there is also abtnprimary which becomes:

<a href="#" class="btn btn-primary" role="button">Primary</a>

See Trigger Glossary below for a full list of triggers.


By default html snippets will only work in html files, or file formats associated with the html filetype in vim. If you are using a format like Ruby ERB (.html.erb) and the html snippets are not working, you may have to tell Vim to associate .html.erb files with the html filetype, for example:

autocmd BufRead,BufNewFile *.html.erb set filetype=html


bootstrap-snippets ships with a dictionary file containing all of the triggers. This can be used as a vim dictionary for autocomplete (Insert mode CTRL+N/CTRL+P).

Add the dictionary file and enable dictionary autocomplete:

set dictionary+=~/.vim/bundle/bootstrap-snippets/dictionary
set complete+=k

Trigger Glossary

You can find a trigger glossary in the Wiki here.