bairui

more <expr> maps

Jan 9th, 2012
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 0.26 KB | None | 0 0
  1. function! T(char)
  2.   return ":Tabularize /" . a:char . "\<cr>"
  3. endfunction
  4.  
  5. nnoremap <expr> <leader>t T(nr2char(getchar()))
  6. vnoremap <expr> <leader>t T(nr2char(getchar()))
  7.  
  8. finish
  9.  
  10. one = two
  11. five = six
  12. twenty = 10
  13.  
  14. one ; two
  15. five ; six
  16. twenty ; 10
Advertisement
Add Comment
Please, Sign In to add comment