if version >= "600"
version 6.0
+if has("win32")
+ se encoding=utf-8
+endif
+
" Remember quickfix state.
let g:quickfixing=0
if g:marksigns
" Signs to highlight marks.
" Syntax won't work properly in Vim 6.
- sign define MarkDash text=' texthl=MarkSign
- sign define MarkDot text=* texthl=MarkDot
- sign define MarkQuote text=" texthl=MarkSign
+ if <SID>Has_Unicode()
+ sign define MarkDash text=’ texthl=MarkSign
+ sign define MarkDot text=• texthl=MarkDot
+ sign define MarkQuote text=” texthl=MarkSign
+ else
+ sign define MarkDash text=' texthl=MarkSign
+ sign define MarkDot text=* texthl=MarkDot
+ sign define MarkQuote text=" texthl=MarkSign
+ endif
sign define MarkCaret text=^ texthl=MarkDot
sign define MarkLess text=< texthl=MarkSign
sign define MarkGreater text=> texthl=MarkSign
endif
endfun
+fun! <SID>Has_Unicode()
+ if ! has('multi_byte')
+ return 0
+ endif
+
+ if version < "602"
+ return 0
+ endif
+
+ if &tenc =~? '^u\(tf\|cs\)'
+ return 1
+ endif
+
+ if ! strlen(&tenc) && &enc =~? '^u\(tf\|cs\)'
+ return 1
+ endif
+
+ return 0
+endfun
+
" Change list mode.
fun! Cycle_List()
" Pretty UTF-8 listchars.
- if has('multi_byte') && (&tenc =~? '^u\(tf\|cs\)' || (! strlen(&tenc) && &enc =~? '^u\(tf\|cs\)')) && v:version >= "602"
+ if <SID>Has_Unicode()
let basic='tab:»·,trail:…,extends:«,precedes:»'
let eol='eol:¶'
if version >= "700"