Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork67
Syntax highlighting for VIM
License
slim-template/vim-slim
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
slim syntax highlighting for vim.
If you are already using pathogen, you can skip to step 3.
Install pathogen (if you haven't already)
mkdir -p ~/.vim/autoload ~/.vim/bundle && \ curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
Edit
~/.vimrc
to run pathogen as the first line of the file (if you haven't already)executepathogen#infect()syntaxonfiletypepluginindenton
Install slim-vim
pushd ~/.vim/bundle; \ git clone git://github.com/slim-template/vim-slim.git; \ popd
- Install Vundle into
~/.vim/bundle/
.
mkdir -p ~/.vim/bundle; pushd ~/.vim/bundle; \ git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim popd
Configure your vimrc for Vundle. Here's a bare-minimum vimrc that enables vim-slim :
setrtp+=~/.vim/bundle/Vundle.vimcallvundle#begin()Plugin'gmarik/Vundle.vim'Plugin'slim-template/vim-slim.git'callvundle#end()syntaxenablefiletypepluginindenton
If you're adding Vundle to a built-up vimrc, just make sure all these callsare in there and that they occur in this order.
- Open vim and run
:PluginInstall
.
To update, open vim and run:PluginInstall!
(notice the bang!)
We usesetfiletype
upon autodetect, which does not overrides filetype once itwas set. That leads into an issue when filetype is set tohtml
before we tookour chance (happens when slim file hasdoctype html
header):
Vim's
filetype.vim
has anautocmd
that tries to detecthtml files basedondoctype and this is triggeredbefore scripts inftdetect/*
are sourced.
To avoid that you have two options. Either usingdoctype 5
instead ofdoctype html
or adding your own enforced version ofautocmd
to your.vimrc
:
autocmdBufNewFile,BufRead*.slimsetlocalfiletype=slim
See Also:
About
Syntax highlighting for VIM
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.