Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Syntax highlighting for VIM

License

NotificationsYou must be signed in to change notification settings

slim-template/vim-slim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slim syntax highlighting for vim.

Install with pathogen

If you are already using pathogen, you can skip to step 3.

  1. Install pathogen (if you haven't already)

     mkdir -p ~/.vim/autoload ~/.vim/bundle && \ curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
  2. Edit~/.vimrc to run pathogen as the first line of the file (if you haven't already)

    executepathogen#infect()syntaxonfiletypepluginindenton
  3. Install slim-vim

     pushd ~/.vim/bundle; \ git clone git://github.com/slim-template/vim-slim.git; \ popd

Install with Vundle

  1. 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
  1. 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.

  1. Open vim and run:PluginInstall.

To update, open vim and run:PluginInstall! (notice the bang!)

Known Issues

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'sfiletype.vim has anautocmd that tries to detecthtml files basedondoctype and this is triggeredbefore scripts inftdetect/*are sourced.

--#38 (comment)

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

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Contributors32


[8]ページ先頭

©2009-2025 Movatter.jp