mirror of
https://github.com/amix/vimrc
synced 2025-06-16 09:35:01 +08:00
Updated plugins
This commit is contained in:
@ -1,17 +1,24 @@
|
||||
" @Author: Tom Link (mailto:micathom AT gmail com?subject=[vim])
|
||||
" @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
|
||||
" @Revision: 18
|
||||
" @Revision: 26
|
||||
|
||||
|
||||
function! tlib#number#ConvertBase(num, base, ...) "{{{3
|
||||
let rtype = a:0 >= 1 ? a:1 : 'string'
|
||||
if a:base > 36
|
||||
throw 'tlib#number#ConvertBase: base > 36 is not supported'
|
||||
endif
|
||||
" TLogVAR a:num, a:base, rtype
|
||||
if a:base == 32
|
||||
let chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"
|
||||
elseif a:base == 63 || a:base == 64
|
||||
let chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
|
||||
elseif a:base == 85
|
||||
let chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_`{|}~"
|
||||
elseif a:base <= 62
|
||||
let chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
|
||||
else
|
||||
throw 'tlib#number#ConvertBase: base is not supported'
|
||||
endif
|
||||
let rv = []
|
||||
let num = 0.0 + a:num
|
||||
let chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||
while floor(num) > 0.0
|
||||
let div = floor(num / a:base)
|
||||
let num1 = float2nr(num - a:base * div)
|
||||
|
@ -73,7 +73,11 @@ endif
|
||||
" Return vim code to jump back to the original window.
|
||||
function! tlib#win#SetById(win_id) "{{{3
|
||||
if a:win_id != g:tlib#win#null_id
|
||||
let win_id = tlib#win#GetID()
|
||||
if g:tlib#win#use_winid
|
||||
let win_id = tlib#win#GetID()
|
||||
else
|
||||
let win_id = tlib#win#GetID().win_id
|
||||
endif
|
||||
call tlib#win#GotoID(a:win_id)
|
||||
return printf('call tlib#win#GotoID(%s)', win_id)
|
||||
" " TLogVAR a:winnr
|
||||
|
Reference in New Issue
Block a user