fweep / vim-tabber

A Vim plugin for labeling tabs, styled after Powerline, with additional tab management utilities.
MIT License
49 stars 11 forks source link

Tabber... Commands are not available until creating a :newtab #9

Open liammac opened 7 years ago

liammac commented 7 years ago

using

VIM: 7.4.1862 Pathogen: 7ba2e1b67a8f8bcbafedaf6763580390dfd93436

vimrc

execute pathogen#infect()
syntax on
filetype plugin indent on

if filereadable('.vimrc-project')
  source .vimrc-project
endif

set tabline=%!tabber#TabLine()

let g:tabber_wrap_when_shifting = 1

nnoremap <silent> <C-t>            :999TabberNew<CR>
nnoremap <silent> <Leader><Leader> :TabberSelectLastActive<CR>
nnoremap <silent> <Leader>tn       :TabberNew<CR>
nnoremap <silent> <Leader>tm       :TabberMove<CR>
nnoremap <silent> <Leader>tc       :tabclose<CR>
nnoremap <silent> <Leader>tl       :TabberShiftLeft<CR>
nnoremap <silent> <Leader>tr       :TabberShiftRight<CR>
nnoremap <silent> <Leader>ts       :TabberSwap<CR>
nnoremap <silent> <Leader>1        :tabnext 1<CR>
nnoremap <silent> <Leader>2        :tabnext 2<CR>
nnoremap <silent> <Leader>3        :tabnext 3<CR>
nnoremap <silent> <Leader>4        :tabnext 4<CR>
nnoremap <silent> <Leader>5        :tabnext 5<CR>
nnoremap <silent> <Leader>6        :tabnext 6<CR>
nnoremap <silent> <Leader>7        :tabnext 7<CR>
nnoremap <silent> <Leader>8        :tabnext 8<CR>
nnoremap <silent> <Leader>9        :tabnext 9<CR>

Error when attempting ctrl-t

E492: Not an editor command: 999TabberNew

Also tried changing

nnoremap <silent> <C-t>            :999TabberNew<CR>

to

nnoremap <silent> <C-t>            :TabberNew<CR>

with no change

E492: Not an editor command: TabberNew

Attempting commands directly results in the same error

fweep commented 7 years ago

I just had this same problem with a new installation myself, and thought it was perhaps to due with Vim 8.0, but I see you're using 7.4. Thanks for reporting. I'll investigate.

Khande commented 7 years ago

I have came across the same error on VIM 8.0 for macOS 10.11

fweep commented 7 years ago

This happens when the tabline isn't displayed. The line:

set tabline=%!tabber#TabLine()

sets things up so that the plugin is autoloaded when the tabline is rendered, but by default, Vim doesn't display any tabline.

I'll try to fix this, but meanwhile, if you always want a tabline displayed, setting:

set showtabline=2

will force the tabline to render when Vim starts, which will trigger the autoload and make the commands available.