This file contains 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
nnoremap <silent> <Plug>select_cstyle_if :<C-u>call <SID>select_cstyle_if()<CR> | |
function! s:select_cstyle_if() " {{{ | |
let orig_view = winsaveview() | |
let if_start_pos = [] | |
while searchpair('{', '', '}', 'bW', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string"') != 0 | |
let brace_start_pos = getpos('.') | |
normal! ge | |
let save = @" | |
normal! yl |