Skip to content

Commit

Permalink
first working version of the plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Derick Bailey committed Jul 8, 2013
1 parent a55032f commit 0fafb41
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
31 changes: 31 additions & 0 deletions autoload/kendoui.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
" Vim plugin for KendoUI-Lint integration
" <https://github.com/kendo-labs/kendoui-lint.vim>
"
" Author: Derick Bailey <[email protected]>
"

if exists("g:loaded_kendoui_autoload")
finish
endif
let g:loaded_kendoui_autoload = 1

if !exists("s:kui_command")
let s:kui_command = "kendo-lint"
endif

function! kendoui#version()
return '0.0.1'
endfunction

function! s:Lint(mode)
silent !clear
execute "!" . s:kui_command . " --".a:mode . " " . bufname("%")
endfunction

function! kendoui#KUILintJS()
:call s:Lint("js")
endfunction

function! kendoui#KUILintHTML()
:call s:Lint("html")
endfunction
7 changes: 7 additions & 0 deletions ftplugin/html/kendoui-lint.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
" Vim plugin for KendoUI-Lint integration
" <https://github.com/kendo-labs/kendoui-lint.vim>
"
" Author: Derick Bailey <[email protected]>
"

command! KUILint call kendoui#KUILintHTML()
7 changes: 7 additions & 0 deletions ftplugin/javascript/kendoui-lint.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
" Vim plugin for KendoUI-Lint integration
" <https://github.com/kendo-labs/kendoui-lint.vim>
"
" Author: Derick Bailey <[email protected]>
"

command! KUILint call kendoui#KUILintJS()

0 comments on commit 0fafb41

Please sign in to comment.