This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " Parse current buffer :syntax for hl names that link to hl-groups | |
| function! activewin#syntax#Parse() | |
| redir => l:buf_syntax | |
| silent exec 'syntax' | |
| redir END | |
| let l:group_keys = [] | |
| let l:hl_pattern = '^\w\+\(\_.*links to\)\@=' | |
| call substitute(l:buf_syntax, l:hl_pattern, '\=add(l:group_keys, submatch(0))', 'g') | |
| echom string(l:group_keys) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " Tab to cycle through instances of partially complete search pattern {{{ | |
| set wildcharm=<Tab> | |
| cnoremap <expr> <Tab> BetterIncSearch('tab') | |
| cnoremap <expr> <S-Tab> BetterIncSearch('stab') | |
| " better incremental search | |
| function! BetterIncSearch(key) abort | |
| if getcmdtype() ==# '/' || getcmdtype() ==# '?' | |
| if (a:key ==# 'tab' && v:searchforward) || (a:key ==# 'stab' && !v:searchforward) | |
| return "\<CR>/\<C-r>/" |
NewerOlder