1
1
" What: ls colors for vidir file listings
2
2
" Where: $VIMRUNTIME/syntax/vidir-ls.vim
3
3
" Author: Magnus Woldrich <[email protected] >
4
+ " Update: 2012-07-01 22:07:28
4
5
" URL: https://github.com/trapd00r/vim-syntax-vidir-ls
6
+ " http://devel.japh.se/vim-syntax-vidir-ls/
7
+ " http://devel.japh.se/vidir
5
8
"
6
9
" This is supposed to be used with vidir [0]:
7
10
" export VIDIR_EDITOR_ARGS='-c :set nolist | :set ft=vidir-ls'
@@ -18,7 +21,7 @@ if exists('b:current_syntax')
18
21
finish
19
22
endif
20
23
21
- function <SID> MakeStyle (ls_color_style)
24
+ function ! <SID> MakeStyle (ls_color_style)
22
25
let l: style_settings = split (a: ls_color_style , ' ;' )
23
26
24
27
let l: style_string = ' '
@@ -52,7 +55,7 @@ function <SID>MakeStyle(ls_color_style)
52
55
return l: style_string
53
56
endfunction
54
57
55
- function <SID> MakeSyntax (ls_color)
58
+ function ! <SID> MakeSyntax (ls_color)
56
59
let [l: glob , l: colors ] = split (a: ls_color , ' =' )
57
60
58
61
if l: glob = ~ ' ^\*\..*'
@@ -62,13 +65,13 @@ function <SID>MakeSyntax(ls_color)
62
65
let l: ext = substitute (l: ext , ' [.~]' , ' _' , ' g' )
63
66
elseif l: glob == ' di'
64
67
let l: ext = ' DI'
65
- let l: regex = ' \v.+[/]\zs .+[/]$'
68
+ let l: regex = ' \v.+[/].+[/]$'
66
69
else
67
70
return
68
71
endif
69
72
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 . ' "'
72
75
endfunction
73
76
74
77
let s: ls_colors = split ($LS_COLORS , ' :' )
0 commit comments