X-Git-Url: http://git.iain.cx/?p=profile.git;a=blobdiff_plain;f=.vimrc;h=c2705edf17dd80c72066b73f65cf34f67b0b4e45;hp=65e88b3988292569fe7382f75aa7e3295609ff9e;hb=3eb908d588d1c1cd6bb5abd1886b9bec4fab701f;hpb=0897bbd45d9649a23a819291f7ab769c563648d1 diff --git a/.vimrc b/.vimrc index 65e88b3..c2705ed 100644 --- a/.vimrc +++ b/.vimrc @@ -942,12 +942,30 @@ fun! Cycle_Signs(resize) "{{{2 while strlen(l:signs) let l:sign = matchstr(l:signs, '^[A-Za-z]\+\(:.\)*[.=-][^ ]\+') - let l:sign = substitute(l:sign, ':.', "", "") - let l:sign = substitute(l:sign, '=', " texthl=MarkSign text=", "") - let l:sign = substitute(l:sign, '\.', " texthl=MarkDot text=", "") - let l:sign = substitute(l:sign, '-', " texthl=MarkLine linehl=MarkLine text=", "") + let l:name = substitute(l:sign, '[:.=-].*', "", "") + let l:sign = substitute(l:sign, '^[A-Za-z]\+', "", "") + let l:ascii = matchstr(l:sign, '^:.') + let l:mark = substitute(l:sign, '^\(:.\)*[.=-]', "", "") + if strlen(l:ascii) + let l:ascii = substitute(l:ascii, '^:', "", "") + let l:ascii = matchstr(l:ascii, '^.') + else + let l:ascii = l:mark + endif + let l:ascii = substitute(l:ascii, '"', '\\"', "") + let l:type = substitute(l:sign, '^:.', "", "") + let l:type = matchstr(l:type, '^.') + + let l:hl = "" + if l:type == "=" + let l:hl = "texthl=MarkSign text=" + elseif l:type == "." + let l:hl = "texthl=MarkDot text=" + elseif l:type == "-" + let l:hl = "texthl=MarkLine text=" + endif - exe "sign define Mark" . l:sign + exe "sign define Mark" . l:name . " " . l:hl . l:mark let l:signs = substitute(l:signs, '^[^ ]\+ *', "", "") endwhile