Update 2024-12-23 13:03 OpenBSD/amd64-t14
This commit is contained in:
parent
0701e19f1e
commit
19fc60ef8b
4
.bin/cam
4
.bin/cam
@ -12,12 +12,12 @@ do
|
|||||||
s|start) shift; _start=1 ;;
|
s|start) shift; _start=1 ;;
|
||||||
k|kill|stop) shift; _stop=1 ;;
|
k|kill|stop) shift; _stop=1 ;;
|
||||||
l|list) shift; _list=1 ;;
|
l|list) shift; _list=1 ;;
|
||||||
|
30) shift; _fps="-framerate 30" ;;
|
||||||
|
60) shift; _fps="-framerate 60" ;;
|
||||||
raw) shift; _format="-input_format yuyv422" ;;
|
raw) shift; _format="-input_format yuyv422" ;;
|
||||||
fullhd) shift; _res="-video_size 1920x1080" ;;
|
fullhd) shift; _res="-video_size 1920x1080" ;;
|
||||||
hd) shift; _res="-video_size 1280x720" ;;
|
hd) shift; _res="-video_size 1280x720" ;;
|
||||||
sd) shift; _res="-video_size 640x360" ;;
|
sd) shift; _res="-video_size 640x360" ;;
|
||||||
30) shift; _fps="-framerate 30" ;;
|
|
||||||
60) shift; _fps="-framerate 60" ;;
|
|
||||||
max) shift; _res="max" ;;
|
max) shift; _res="max" ;;
|
||||||
[0-9]*x[0-9]*) shift; _res="-video_size $arg" ;;
|
[0-9]*x[0-9]*) shift; _res="-video_size $arg" ;;
|
||||||
[0-9]) shift; _dev="$arg" ;;
|
[0-9]) shift; _dev="$arg" ;;
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
# poppy.vim
|
|
||||||
vim port of [highlightparentheses.el](https://github.com/tsdh/highlight-parentheses.el) which gives rainbow parens propagating from the cursor
|
|
||||||
|
|
||||||
Enabled with autocmds ( :h autocommand )
|
|
||||||
|
|
||||||
example:
|
|
||||||
|
|
||||||
`au! cursormoved * call PoppyInit()`
|
|
||||||
|
|
||||||
or:
|
|
||||||
|
|
||||||
`au! cursormoved *.lisp call PoppyInit()`
|
|
||||||
|
|
||||||
or even make a mapping:
|
|
||||||
|
|
||||||
```
|
|
||||||
augroup Poppy
|
|
||||||
au!
|
|
||||||
augroup END
|
|
||||||
nnoremap <silent> <leader>hp :call clearmatches() \| let g:poppy = -get(g:,'poppy',-1) \|
|
|
||||||
\ exe 'au! Poppy CursorMoved *' . (g:poppy > 0 ? ' call PoppyInit()' : '') <cr>
|
|
||||||
```
|
|
||||||
|
|
||||||
modify coloring by changing `g:poppyhigh`, which is a list of highlight group names.
|
|
||||||
|
|
||||||
If you want only 1 paren level highlighted, let `g:poppyhigh` to a list with 1 group name.
|
|
||||||
|
|
||||||
If you want the highlighting to include matches which are under the cursor, like the matchparen plugin
|
|
||||||
included with vim, `let g:poppy_point_enable = 1` .
|
|
@ -1,49 +0,0 @@
|
|||||||
if !has('reltime') || exists('*PoppyInit')
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
let g:poppyhigh = get(g:,'poppyhigh',['identifier','constant','preproc','special','type'])
|
|
||||||
|
|
||||||
function s:highpat()
|
|
||||||
let s:synid_cache = {}
|
|
||||||
let stoplinebottom = line('w$')
|
|
||||||
let stoplinetop = line('w0')
|
|
||||||
let s:poppyhigh = deepcopy(g:poppyhigh)
|
|
||||||
let inc = get(g:,'poppy_point_enable') && getline('.')[col('.')-1] =~ '[[({]' ? 'c' : ''
|
|
||||||
call searchpair('\m[[({]','','noop',inc.(len(g:poppyhigh) > 1 ? 'r' : '').'nbW',"getline('.')[col('.')-1] == 'n' ||"
|
|
||||||
\ ."s:SynAt(line('.'),col('.')) =~? 'regex\\|comment\\|string' ||"
|
|
||||||
\ ."s:endpart(".stoplinebottom.")",stoplinetop,30)
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function s:SynAt(l,c)
|
|
||||||
let pos = a:l.','.a:c
|
|
||||||
if !has_key(s:synid_cache,pos)
|
|
||||||
let s:synid_cache[pos] = synIDattr(synID(a:l,a:c,0),'name')
|
|
||||||
endif
|
|
||||||
return s:synid_cache[pos]
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
if exists('*matchaddpos')
|
|
||||||
function s:matchadd(hi,pos)
|
|
||||||
return matchaddpos(a:hi,a:pos)
|
|
||||||
endfunction
|
|
||||||
else
|
|
||||||
function s:matchadd(hi,pos)
|
|
||||||
return matchadd(a:hi,'\%' . a:pos[0][0] . 'l\%' . a:pos[0][1] . 'c\|\%' . a:pos[1][0] . 'l\%' . a:pos[1][1] . 'c')
|
|
||||||
endfunction
|
|
||||||
endif
|
|
||||||
|
|
||||||
function s:endpart(b)
|
|
||||||
let i = stridx('[({',getline('.')[col('.')-1])
|
|
||||||
let p = searchpairpos('\V'.'[({'[i],'','\V'.'])}'[i],'nW',"s:SynAt(line('.'),col('.')) =~? 'regex\\|comment\\|string'"
|
|
||||||
\ ,a:b,300)
|
|
||||||
if p[0] && (line2byte(p[0])+p[1] > line2byte(s:pos[0]) + s:pos[1] || get(g:,'poppy_point_enable') && p == s:pos)
|
|
||||||
let w:poppies += [s:matchadd(remove(add(s:poppyhigh,s:poppyhigh[0]),0), [getpos('.')[1:2],p])]
|
|
||||||
else
|
|
||||||
return 1
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function PoppyInit()
|
|
||||||
let s:pos = getpos('.')[1:2] | let w:poppies = get(w:,'poppies',[])
|
|
||||||
\ | silent! call filter(w:poppies,'matchdelete(v:val)>0') | call s:highpat()
|
|
||||||
endfunction
|
|
@ -349,4 +349,4 @@ augroup END
|
|||||||
augroup diffsyntax
|
augroup diffsyntax
|
||||||
autocmd! OptionSet diff syntax off
|
autocmd! OptionSet diff syntax off
|
||||||
augroup END
|
augroup END
|
||||||
autocmd FocusLost <buffer> silent write
|
|
||||||
|
Loading…
Reference in New Issue
Block a user