mirror of
https://github.com/chenasraf/vim-matchup.git
synced 2026-05-18 01:38:57 +00:00
Use ▶ instead of ⯈, add opt where_separator
This commit is contained in:
@@ -59,6 +59,7 @@ function! s:init_options()
|
||||
call s:init_option('matchup_surround_enabled', 0)
|
||||
|
||||
call s:init_option('matchup_where_enabled', 1)
|
||||
call s:init_option('matchup_where_separator', '')
|
||||
|
||||
call s:init_option('matchup_matchpref', {})
|
||||
endfunction
|
||||
|
||||
@@ -9,10 +9,9 @@ scriptencoding utf8
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let s:arrow = '⯈'
|
||||
let s:curpos = []
|
||||
|
||||
function! matchup#where#get(timeout)
|
||||
function! matchup#where#get(timeout) abort " {{{1
|
||||
let l:save_view = winsaveview()
|
||||
let l:trail = []
|
||||
|
||||
@@ -39,6 +38,8 @@ function! matchup#where#get(timeout)
|
||||
return reverse(l:trail)
|
||||
endfunction
|
||||
|
||||
" }}}1
|
||||
|
||||
function! s:print_verbose() " {{{1
|
||||
let l:trail = matchup#where#get(400)
|
||||
let l:last = -1
|
||||
@@ -77,7 +78,7 @@ function! s:print_short() " {{{1
|
||||
continue
|
||||
endif
|
||||
if l:prev != -1
|
||||
let l:fullstr .= ' %#Title#'.s:arrow.'%#Normal# '
|
||||
let l:fullstr .= ' %#Title#' . s:arrow() . '%#Normal# '
|
||||
endif
|
||||
let l:fullstr .= l:str
|
||||
let l:prev = l:adj
|
||||
@@ -87,6 +88,13 @@ function! s:print_short() " {{{1
|
||||
call matchup#perf#toc('where', 'echohlstring')
|
||||
endfunction
|
||||
|
||||
function! s:arrow()
|
||||
if empty(g:matchup_where_separator)
|
||||
return '▶'
|
||||
endif
|
||||
return g:matchup_where_separator
|
||||
endfunction
|
||||
|
||||
" }}}1
|
||||
|
||||
function! matchup#where#print(args)
|
||||
|
||||
Reference in New Issue
Block a user