On 8/10/2012 4:00 AM, sheetal wrote:
Hello everyone,
What i want to do is map some key<A-S-j/k> such that when ever i press the key
i want the current tabpage to be moved previous to a tab/after the next tab and still
keep my cursor in the current tab only.
All I wanted to know is this possible and if so, then how can get the current
tabpage no.
forgot where I got this (mostly from vim plugin website)
but this provide what you are asking for:
function! MoveCurrentTab(value)
if a:value == 0
return
endif
let move = a:value - 1
let move_to = tabpagenr() + move
if move_to < 0
let move_to = 0
endif
exe 'tabmove '.move_to
endfunction
map <silent> <M-left> :call MoveCurrentTab(-1)<Esc>
map <silent> <M-right> :call MoveCurrentTab(1)<Esc>
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php