diff options
Diffstat (limited to 'vim/bundle/tlib_vim/autoload/tlib/selection.vim')
m--------- | vim/bundle/tlib_vim | 0 | ||||
-rw-r--r-- | vim/bundle/tlib_vim/autoload/tlib/selection.vim | 40 |
2 files changed, 0 insertions, 40 deletions
diff --git a/vim/bundle/tlib_vim b/vim/bundle/tlib_vim new file mode 160000 +Subproject 5636472e5dba1a4104376ce6bd93cc2546e0248 diff --git a/vim/bundle/tlib_vim/autoload/tlib/selection.vim b/vim/bundle/tlib_vim/autoload/tlib/selection.vim deleted file mode 100644 index 4417157..0000000 --- a/vim/bundle/tlib_vim/autoload/tlib/selection.vim +++ /dev/null @@ -1,40 +0,0 @@ -" @Author: Tom Link (mailto:micathom AT gmail com?subject=[vim]) -" @Website: http://www.vim.org/account/profile.php?user_id=4037 -" @License: GPL (see http://www.gnu.org/licenses/gpl.txt) -" @Last Change: 2016-01-03 -" @Revision: 3 - - -" :display: tlib#selection#GetSelection(mode, ?mbeg="'<", ?mend="'>", ?opmode='selection') -" mode can be one of: selection, lines, block -function! tlib#selection#GetSelection(mode, ...) range "{{{3 - if a:0 >= 2 - let mbeg = a:1 - let mend = a:2 - else - let mbeg = "'<" - let mend = "'>" - endif - let opmode = a:0 >= 3 ? a:3 : 'selection' - let l0 = line(mbeg) - let l1 = line(mend) - let text = getline(l0, l1) - let c0 = col(mbeg) - let c1 = col(mend) - " TLogVAR mbeg, mend, opmode, l0, l1, c0, c1 - " TLogVAR text[-1] - " TLogVAR len(text[-1]) - if opmode == 'block' - let clen = c1 - c0 - call map(text, 'strpart(v:val, c0, clen)') - elseif opmode == 'selection' - if c1 > 1 - let text[-1] = strpart(text[-1], 0, c1 - (a:mode == 'o' || c1 > len(text[-1]) ? 0 : 1)) - endif - if c0 > 1 - let text[0] = strpart(text[0], c0 - 1) - endif - endif - return text -endf - |