René Nyffenegger's collection of things on the web | |
René Nyffenegger on Oracle - Most wanted - Feedback
- Follow @renenyffenegger
|
VisualBlockBoundaries [Vim Script] | ||
Determine the boundaries of a visual selection and return them in a dictionary.
fu! VisualBlockBoundaries() " IMHO, the first line starts on line 0, " and the first character starts with character 0 " therefor the adjustments with -1 let l:ret = { \ 'line_b': line("'<") - 1, \ 'line_e': line("'>") , \ 'col_b' : col ("'<") - 1, \ 'col_e' : col ("'>") \ } return l:ret endfu |