a

      我的日志 2007-8-26 11:54
  • inoremap ( ()<esc>:call BC_AddChar(")")<cr>i
  • inoremap { {<cr>}<esc>:call BC_AddChar("}")<cr><esc>kA<cr>
  • inoremap [ []<esc>:call BC_AddChar("]")<cr>i
  • inoremap " ""<esc>:call BC_AddChar(""")<cr>i
  • " jump out of parenthesis
  • inoremap <C-j> <esc>:call search(BC_GetChar(), "W")<cr>a
  •  
  • function! BC_AddChar(schar)
  • if exists("b:robstack")
  • let b:robstack = b:robstack . a:schar
  • else
  • let b:robstack = a:schar
  • endif
  • endfunction
  •  
  • function! BC_GetChar()
  • let l:char = b:robstack[strlen(b:robstack)-1]
  • let b:robstack = strpart(b:robstack, 0, strlen(b:robstack)-1)
  • return l:char
  • endfunction
标签集:TAGS:a
回复Comments() 点击Count()

回复Comments

{commenttime}{commentauthor}

{CommentUrl}
{commentcontent}