Skip to content

Instantly share code, notes, and snippets.

@yuya-matsushima
Created April 22, 2015 14:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuya-matsushima/93e12291af5f4b323b69 to your computer and use it in GitHub Desktop.
Save yuya-matsushima/93e12291af5f4b323b69 to your computer and use it in GitHub Desktop.
vimで保存時にslimの構文チェックする
"gem install slim_lint が必要
function! SlimLint()
let slim_lint = "slim-lint"
silent cexpr system(slim_lint . " " . shellescape(expand('%')))
copen
endfunction
"augroupで適当にくくったほうがいい
autocmd BufWritePost *.slim call SlimLint()
@yuya-matsushima
Copy link
Author

参考: sds/slim-lint

@yuya-matsushima
Copy link
Author

動作確認用のアレ

---
title: test

---
- puts '1'
- puts '2'
- puts '3'


doctype html
html
  head
    meta charset="utf-8"
  body
    div

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment