-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
select dsscript; only enable commands in dsscript; bug fix gui launch
- Loading branch information
Showing
4 changed files
with
99 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,14 @@ | ||
au BufRead *.isml set ft=isml | ||
au BufRead *.ds set ft=javascript | ||
fun! s:SelectDSSCRIPT() | ||
let n = 1 | ||
while n < 100 && n <= line("$") | ||
" check for jinja | ||
if getline(n) =~ '\(dw\/\w\{-\}\/\w*\)\|\(guard\.ensure\)\|\(cartridge\/scripts\)' | ||
set ft=dsscript | ||
return | ||
endif | ||
let n = n + 1 | ||
endwhile | ||
endfun | ||
autocmd BufNewFile,BufRead *.js call s:SelectDSSCRIPT() | ||
autocmd BufNewFile,BufRead *.isml set ft=isml | ||
autocmd BufNewFile,BufRead *.ds set ft=dsscript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
if !exists("main_syntax") | ||
if version < 600 | ||
syntax clear | ||
elseif exists("b:current_syntax") | ||
finish | ||
endif | ||
let main_syntax = 'dsscript' | ||
endif | ||
|
||
" pull in javascript syntax | ||
runtime! syntax/javascript.vim | ||
runtime! indent/javascript.vim | ||
|
||
" if ultisnips is present ensure javascript snippets are loaded | ||
if exists(":UltiSnipsAddFiletypes") | ||
execute "silent UltiSnipsAddFiletypes javascript.dsscript" | ||
end |