bairui

IndentOfMatchEnd

Jul 1st, 2011
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 0.24 KB | None | 0 0
  1. function! IndentOfMatchEnd(pattern)
  2.   let cpos = getpos('.')
  3.   let mpos = searchpos(a:pattern, 'eW')
  4.   let cpos[2] = mpos[1]
  5.   call setpos('.', cpos)
  6. endfunction
  7.  
  8. finish
  9.  
  10. one two three four five six
  11. apple banana orange peach pear
Advertisement
Add Comment
Please, Sign In to add comment