Skip to content

Commit bda92d5

Browse files
committed
be silent! and forceful
1 parent 89846ed commit bda92d5

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

syntax/vidir-ls.vim

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
" What: ls colors for vidir file listings
22
" Where: $VIMRUNTIME/syntax/vidir-ls.vim
33
" Author: Magnus Woldrich <[email protected]>
4+
" Update: 2012-07-01 22:07:28
45
" URL: https://github.com/trapd00r/vim-syntax-vidir-ls
6+
" http://devel.japh.se/vim-syntax-vidir-ls/
7+
" http://devel.japh.se/vidir
58
"
69
" This is supposed to be used with vidir [0]:
710
" export VIDIR_EDITOR_ARGS='-c :set nolist | :set ft=vidir-ls'
@@ -18,7 +21,7 @@ if exists('b:current_syntax')
1821
finish
1922
endif
2023

21-
function <SID>MakeStyle(ls_color_style)
24+
function! <SID>MakeStyle(ls_color_style)
2225
let l:style_settings = split(a:ls_color_style, ';')
2326

2427
let l:style_string = ''
@@ -52,7 +55,7 @@ function <SID>MakeStyle(ls_color_style)
5255
return l:style_string
5356
endfunction
5457

55-
function <SID>MakeSyntax(ls_color)
58+
function! <SID>MakeSyntax(ls_color)
5659
let [l:glob, l:colors] = split(a:ls_color, '=')
5760

5861
if l:glob =~ '^\*\..*'
@@ -62,13 +65,13 @@ function <SID>MakeSyntax(ls_color)
6265
let l:ext = substitute(l:ext, '[.~]', '_', 'g')
6366
elseif l:glob == 'di'
6467
let l:ext = 'DI'
65-
let l:regex = '\v.+[/]\zs.+[/]$'
68+
let l:regex = '\v.+[/].+[/]$'
6669
else
6770
return
6871
endif
6972

70-
execute 'hi ls_' . l:ext . <SID>MakeStyle(l:colors)
71-
execute 'syn match ls_' . l:ext . ' display "' . l:regex . '"'
73+
execute 'silent! hi ls_' . l:ext . <SID>MakeStyle(l:colors)
74+
execute 'silent! syn match ls_' . l:ext . ' display "' . l:regex . '"'
7275
endfunction
7376

7477
let s:ls_colors = split($LS_COLORS, ':')

0 commit comments

Comments
 (0)