首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >vim Tagbar插件

vim Tagbar插件
EN

Stack Overflow用户
提问于 2014-02-10 23:50:57
回答 1查看 2K关注 0票数 3

我确实将vim与标记栏和-NERD-tree插件一起使用。我也喜欢启用autochdir。但有时,当我使用NERD-tree插件在文件之间切换时,Tagbar不会刷新其内容,而是坚持使用前一个文件中的标签。如果我再次执行"TagbarToggle“-第二个标记栏窗口出现当前文件标签。如果我禁用autochdir -它似乎工作正常。我如何解决这个问题?当前.vimrc已附加。谢谢。

代码语言:javascript
复制
syntax on           " syntax hl by default
set background=dark " dark background
set shortmess+=I    " no startup uganda msg
set showcmd         " Show (partial) command in status line.
set showmatch       " Show matching brackets.
set incsearch       " Incremental search
set autowrite       " Automatically save before commands like :next and :make
set hidden          " Hide buffers when they are abandoned
set mouse=a         " Enable mouse usage (all modes)
set number          " line numbers
set guioptions-=T   " no toolbar 
set vb t_vb=        " no beeps
set ruler           " status bar and ruller for each windows
set showmatch       " show matching brace
set autoindent      " the current line's indent level to set the indent level of new lines)
set smartindent     " attempt to intelligently guess the indent level
set smartcase       " Do smart case matching
set ignorecase      " Do case insensitive matching
set virtualedit=all " This setting allows the cursor to freely roam anywhere it likes in command mode.
"set autochdir       " Automaticly changes dir to active
"set autowriteall    " Autosave files

"-color scheme-------------------------------------------
"colorscheme ir_black

"-tabs configs-------------------------------------------
set expandtab
set tabstop=4
set showtabline=4
set shiftwidth=4

"-ctags configs------------------------------------------
"search for tag files until root
set tags=tags;/ 

"-autosave configs---------------------------------------
set autowrite

"-search configs-----------------------------------------
set hlsearch 
" seek for selected test
nnoremap * *N 
"turn off higliting
nnoremap 8 :nohlsearch<CR>
"nnoremap <S-F8> :nohlsearch<CR>
" search in selected text
vnoremap * y :execute ":let @/=@\""<CR> :execute "set hlsearch"<CR>

"-spellcheck configs-------------------------------------
set spelllang=en_us
nn <F7> :setlocal spell!<CR>
let g:spellfile_URL = 'http://ftp.vim.org/vim/runtime/spell'
"setlocal spell spelllang=en_us
"nn <F7> :setlocal spell! spelllang=en_us<CR>
"imap <F7> <C-o>:setlocal spell! spelllang=en_us<CR>
"it should get the dictionary files

"-move between windows-----------------------------------
nmap <silent> <C-k> :wincmd k<CR>
nmap <silent> <C-j> :wincmd j<CR>
nmap <silent> <C-h> :wincmd h<CR>
nmap <silent> <C-l> :wincmd l<CR>
"move between windows
nnoremap <Tab> <C-W>w
"move between windows backwards
nnoremap <S-Tab> <C-W>W

"-encoding-----------------------------------------------
"set encoding=utf-8

"-show invisible chars-----------------------------------
set listchars=tab:>-,eol:$
nnoremap <F8> :set list!<CR>
":highlight NonText ctermfg=red
"set listchars=tab:▸\ ,eol:¬
"set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:<

"-Tag bar config-----------------------------------------
nnoremap <F4> :TagbarToggle<CR>

"-buffers------------------------------------------------
"nnoremap <F7> :TMiniBufExplorer<CR>
nnoremap <F5> :ls<CR>
nnoremap <C-n> :bnext<CR>
nnoremap <C-b> :bprev<CR>
nnoremap <C-c> :enew<CR>
nnoremap <C-x> :bp<bar>sp<bar>bn<bar>bd<CR>

"-grep---------------------------------------------------
nnoremap <silent> <F9> :Grep<CR> 

"-nerd tree----------------------------------------------
nnoremap <F3> :NERDTreeToggle<CR>

"-clipboard----------------------------------------------
set clipboard=unnamedplus

"-easymotion---------------------------------------------
map <F6> <Leader><Leader>W

"-cscope---------------------------------------------

"-VIM plugins--------------------------------------------
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
filetype plugin indent on

" L9 - vim programming library
Bundle 'L9'
Bundle 'The-NERD-tree'
Bundle 'EasyMotion'
Bundle 'grep.vim' 
Bundle 'Tagbar'
Bundle 'chazy/cscope_maps'

"Bundle 'buftabs'
"Bundle 'autoload_cscope.vim' 
"Bundle 'chazy/cscope_maps'
"Bundle 'FuzzyFinder'
"Bundle 'tpope/vim-fugitive' 
EN

回答 1

Stack Overflow用户

发布于 2014-02-11 03:09:57

尝试更新到Vim 7.4。我也有同样的问题,as described on this tagbar issue

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21681721

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档