Update 2026-01-25 09:38 OpenBSD/amd64-t14
This commit is contained in:
2
.vim/pack/plugins/start/vim-luakit/ftdetect/luakit.vim
Normal file
2
.vim/pack/plugins/start/vim-luakit/ftdetect/luakit.vim
Normal file
@@ -0,0 +1,2 @@
|
||||
au BufNewFile,BufRead */luakit/**/*.lua set ft=luakit
|
||||
au BufNewFile,BufRead */luakit/*.lua set ft=luakit
|
||||
69
.vim/pack/plugins/start/vim-luakit/ftplugin/luakit.vim
Normal file
69
.vim/pack/plugins/start/vim-luakit/ftplugin/luakit.vim
Normal file
@@ -0,0 +1,69 @@
|
||||
" Vim filetype plugin
|
||||
" Language: luakit configuration
|
||||
" Maintainer: Gregor Uhlenheuer <kongo2002@googlemail.com>
|
||||
" Last Change: Tue 14 Sep 2010 01:18:20 PM CEST
|
||||
|
||||
" Custom configuration:
|
||||
"
|
||||
" Set 'g:luakit_prefix' to the path prefix where the system-wide
|
||||
" luakit configuration files are installed to. The default is set to
|
||||
" something like '/etc/xdg' or '/usr/share/xdg'.
|
||||
" If this variable is not defined the path is tried to determine via the
|
||||
" environment variable $XDG_CONFIG_DIRS
|
||||
"
|
||||
" let g:luakit_prefix = '/etc/xdg'
|
||||
"
|
||||
" Defined mappings (buffer-local):
|
||||
"
|
||||
" <Leader>ld Diff current config file with its system-wide counterpart
|
||||
|
||||
if exists('b:did_luakit')
|
||||
finish
|
||||
endif
|
||||
let b:did_luakit = 1
|
||||
|
||||
if !exists('g:luakit_prefix')
|
||||
let g:luakit_prefix = '/etc/xdg'
|
||||
endif
|
||||
|
||||
function! s:GetFile()
|
||||
let fcomponents = []
|
||||
if $XDG_CONFIG_DIRS != ''
|
||||
call add(fcomponents, $XDG_CONFIG_DIRS)
|
||||
else
|
||||
call add(fcomponents, g:luakit_prefix)
|
||||
endif
|
||||
call add(fcomponents, "luakit")
|
||||
call add(fcomponents, expand('%:t'))
|
||||
let config_file = join(fcomponents, '/')
|
||||
if filereadable(config_file)
|
||||
return config_file
|
||||
endif
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
if !exists('*CompareLuakitFile')
|
||||
function! CompareLuakitFile()
|
||||
let file = <SID>GetFile()
|
||||
if file != ''
|
||||
if file != expand('%:p')
|
||||
exe 'vert diffsplit' file
|
||||
wincmd p
|
||||
else
|
||||
echohl WarningMsg
|
||||
echom 'You cannot compare the file with itself'
|
||||
echohl None
|
||||
endif
|
||||
else
|
||||
echohl WarningMsg
|
||||
echom 'Could not find system-wide luakit '''.expand('%:t').''' file'
|
||||
echom 'Please define ''g:luakit_prefix'''
|
||||
echohl None
|
||||
endif
|
||||
endfunction
|
||||
endif
|
||||
|
||||
com! -buffer LuakitDiff call CompareLuakitFile()
|
||||
nmap <buffer> <Leader>ld :LuakitDiff<CR>
|
||||
|
||||
runtime! ftplugin/lua.vim
|
||||
10
.vim/pack/plugins/start/vim-luakit/indent/luakit.vim
Normal file
10
.vim/pack/plugins/start/vim-luakit/indent/luakit.vim
Normal file
@@ -0,0 +1,10 @@
|
||||
" Vim indent file
|
||||
" Language: luakit configuration
|
||||
" Maintainer: Gregor Uhlenheuer <kongo2002@googlemail.com>
|
||||
" Last Change: Fri 27 Aug 2010 09:49:20 PM CEST
|
||||
|
||||
if exists('b:did_indent')
|
||||
finish
|
||||
endif
|
||||
|
||||
runtime! indent/lua.vim
|
||||
33
.vim/pack/plugins/start/vim-luakit/syntax/luakit.vim
Normal file
33
.vim/pack/plugins/start/vim-luakit/syntax/luakit.vim
Normal file
@@ -0,0 +1,33 @@
|
||||
" Vim syntax file
|
||||
" Language: luakit configuration
|
||||
" Maintainer: Gregor Uhlenheuer <kongo2002@googlemail.com>
|
||||
" Last Change: Fri 27 Aug 2010 09:46:46 PM CEST
|
||||
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
runtime! syntax/lua.vim
|
||||
|
||||
" Javascript between [=[ & ]=] regions
|
||||
unlet b:current_syntax
|
||||
syntax include @JAVASCRIPT syntax/javascript.vim
|
||||
try | syntax include @JAVASCRIPT after/syntax/javascript.vim | catch | endtry
|
||||
syntax region jsBLOCK matchgroup=jsBLOCKMATCH start=/\[=\[/ end=/\]=\]/ contains=@JAVASCRIPT
|
||||
hi link jsBLOCKMATCH SpecialComment
|
||||
|
||||
" HTML between [==[ & ]==] regions
|
||||
unlet b:current_syntax
|
||||
syntax include @HTML syntax/html.vim
|
||||
try | syntax include @HTML after/syntax/html.vim | catch | endtry
|
||||
syntax region htmlBLOCK matchgroup=htmlBLOCKMATCH start=/\[==\[/ end=/\]==\]/ contains=@HTML
|
||||
hi link htmlBLOCKMATCH SpecialComment
|
||||
|
||||
" CSS between [===[ & ]===] regions
|
||||
unlet b:current_syntax
|
||||
syntax include @CSS syntax/css.vim
|
||||
try | syntax include @CSS after/syntax/css.vim | catch | endtry
|
||||
syntax region cssBLOCK matchgroup=cssBLOCKMATCH start=/\[===\[/ end=/\]===\]/ contains=@CSS
|
||||
hi link cssBLOCKMATCH SpecialComment
|
||||
|
||||
let b:current_syntax = 'luakit'
|
||||
Reference in New Issue
Block a user