Skip to content

Commit

Permalink
New ftdetect file
Browse files Browse the repository at this point in the history
See. :help ftdetect
  • Loading branch information
sgur committed Apr 27, 2015
1 parent 34a38f1 commit 010865d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
15 changes: 15 additions & 0 deletions ftdetect/cs.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
" Vim plugin ftdetects
" Language: Microsoft C#
" Maintainer: Kian Ryan (kian@orangetentacle.co.uk)
" Last Change: 2015 Apr 27

" Set msproj file extensions
au BufNewFile,BufRead *.cs compiler msbuild
au BufNewFile,BufRead *.proj compiler msbuild | set filetype=xml
au BufNewFile,BufRead *.csproj compiler msbuild | set filetype=xml
au BufNewFile,BufRead *.sln compiler msbuild | set filetype=xml
au BufNewFile,BufRead *.cshtml compiler msbuild | set filetype=cshtml.html syntax=cshtml
au BufNewFile,BufRead *.aspx compiler msbuild | set filetype=aspx.html syntax=aspx
au BufNewFile,BufRead *.ascx compiler msbuild | set filetype=aspx.html syntax=aspx
au BufNewFile,BufRead *.master compiler msbuild | set filetype=aspx.html syntax=aspx

12 changes: 1 addition & 11 deletions plugin/cs.vim
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
" Vim plugin file
" Language: Microsoft C#
" Maintainer: Kian Ryan (kian@orangetentacle.co.uk)
" Last Change: 2012 Sep 23
" Last Change: 2015 Apr 27

function! MsProjFile(file)
let g:net_build_file = a:file
Expand All @@ -17,16 +17,6 @@ function! IISExpress()
e ~\Documents\IISExpress\config\applicationhost.config
endfunction

" Set msproj file extensions
au BufNewFile,BufRead *.cs compiler msbuild
au BufNewFile,BufRead *.proj compiler msbuild | set filetype=xml
au BufNewFile,BufRead *.csproj compiler msbuild | set filetype=xml
au BufNewFile,BufRead *.sln compiler msbuild | set filetype=xml
au BufNewFile,BufRead *.cshtml compiler msbuild | set filetype=cshtml.html syntax=cshtml
au BufNewFile,BufRead *.aspx compiler msbuild | set filetype=aspx.html syntax=aspx
au BufNewFile,BufRead *.ascx compiler msbuild | set filetype=aspx.html syntax=aspx
au BufNewFile,BufRead *.master compiler msbuild | set filetype=aspx.html syntax=aspx

com! -complete=file -nargs=1 MsProjFile :call MsProjFile(<f-args>)
com! -nargs=1 MsVersion :call MsVersion(<f-args>)
com! IISExpress :call IISExpress()

0 comments on commit 010865d

Please sign in to comment.