From 0fafb4135f6560ab977dd2e6fd9c73cc297cd3a5 Mon Sep 17 00:00:00 2001 From: Derick Bailey Date: Mon, 8 Jul 2013 16:39:23 -0500 Subject: [PATCH] first working version of the plugin --- autoload/kendoui.vim | 31 ++++++++++++++++++++++++++++ ftplugin/html/kendoui-lint.vim | 7 +++++++ ftplugin/javascript/kendoui-lint.vim | 7 +++++++ 3 files changed, 45 insertions(+) create mode 100644 autoload/kendoui.vim create mode 100644 ftplugin/html/kendoui-lint.vim diff --git a/autoload/kendoui.vim b/autoload/kendoui.vim new file mode 100644 index 0000000..a762367 --- /dev/null +++ b/autoload/kendoui.vim @@ -0,0 +1,31 @@ +" Vim plugin for KendoUI-Lint integration +" +" +" Author: Derick Bailey +" + +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 diff --git a/ftplugin/html/kendoui-lint.vim b/ftplugin/html/kendoui-lint.vim new file mode 100644 index 0000000..dc06f67 --- /dev/null +++ b/ftplugin/html/kendoui-lint.vim @@ -0,0 +1,7 @@ +" Vim plugin for KendoUI-Lint integration +" +" +" Author: Derick Bailey +" + +command! KUILint call kendoui#KUILintHTML() diff --git a/ftplugin/javascript/kendoui-lint.vim b/ftplugin/javascript/kendoui-lint.vim index e69de29..430ed3b 100644 --- a/ftplugin/javascript/kendoui-lint.vim +++ b/ftplugin/javascript/kendoui-lint.vim @@ -0,0 +1,7 @@ +" Vim plugin for KendoUI-Lint integration +" +" +" Author: Derick Bailey +" + +command! KUILint call kendoui#KUILintJS()