Background
- vim 7.4
- VimL scripting problem
Question
Does VimL have a means of polling the current Visual selection?
Goal
Trevor wishes to create a function in VimL script that does one thing only.
- return
TRUEif there is currently a visual selection containing one or characters in the currently-active buffer. - return
FALSEif there is not currently a visual selection containing one or more characters in the currently-active buffer.
- return
The function will be an addon to other functions that need to exhibit different behavior, depending on whether or not there is a currently-non-empty Visual selection (either line-wise or character-wise) in the currently-active buffer.
Failed attempts
- For some reason this is not coming through in the docs, no existing solution seems readily apparent, and it seems like a pretty basic thing.
Trueif there is an existing visual selection, andFalseif there is not an existing visual selection.