makecols.vim: converting lists to columns made simple
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
497 B

9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
  1. " makecols.vim - Makecolumns
  2. " Author: Levi Olson <http://leviolson.com/>
  3. " Version: 1.0
  4. function! s:beep()
  5. exe "norm! \<Esc>"
  6. return ""
  7. endfunction
  8. function! s:makecols()
  9. let selection = $selection
  10. let lines = getline("'<")[getpos("'<")[2]-1:getpos("'>")[2]]
  11. echo lines
  12. return s:beep()
  13. endfunction
  14. if !exists("g:makecols_no_mappings") || ! g:makecols_no_mappings
  15. vnoremap mc :call <SID>makecols()<CR>
  16. endif
  17. " vim:set ft=vim sw=4 sts=4 et: