[英]E488: Trailing characters: tags = tags; on Windows 7 running gVim
I am getting an error every time I run gVim that says: 每次运行gVim时,我都会收到一条错误消息:
Error detected while processing C:\Workspaces\workspace1\_vimrc:
line 4:
E488: Trailing characters: tags = tags;
If I move the line tags = tags;
如果我移动线tags = tags;
from my local _vimrc file to the global _vimrc file I get the same error. 从我的本地_vimrc文件到全局_vimrc文件,我得到了相同的错误。 I also tried using an absolute path and get the same error. 我也尝试使用绝对路径并得到相同的错误。 I am starting gVim from the command line in the C:\\Workspaces\\workspace1\\ directory. 我从C:\\ Workspaces \\ workspace1 \\目录中的命令行启动gVim。 I have tried disabling all plugins in my _vimrc and doing a :PluginClean for Vundle. 我尝试禁用_vimrc中的所有插件,并为Vundle做一个:PluginClean。
The contents of my _vimrc file: 我的_vimrc文件的内容:
set nocompatible " be iMproved, required
filetype off " required
set rtp+=~/vimfiles/bundle/Vundle.vim/
let path='~/vimfiles/bundle'
call vundle#begin(path)
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin 'kien/ctrlp.vim'
Plugin 'scrooloose/nerdtree'
"Plugin 'scrooloose/syntastic'
Plugin 'bling/vim-airline'
"Plugin 'altercation/vim-colors-solarized'
Plugin 'xolox/vim-misc'
Plugin 'xolox/vim-session'
Plugin 'jnurmine/Zenburn'
Plugin 'majutsushi/tagbar'
Plugin 'brookhong/cscope.vim'
call vundle#end() " required
filetype plugin indent on " required
"Set Color Scheme and Font Options
syntax enable
set background=dark
colorscheme zenburn
set guifont=Consolas:h10:cANSI
"set secure " disable unsafe commands in local .vimrc files
set exrc " enable per-directory .vimrc files
set clipboard=unnamed
"set line no, buffer, search, highlight, autoindent and more.
set nu
set hidden
set ignorecase
set incsearch
set smartcase
set showmatch
set autoindent
set ruler
set vb
set viminfo+=n$VIM/_viminfo
set noerrorbells
set showcmd
set mouse=a
set history=1000
set undolevels=1000
set nowrap
set backspace=start,eol,indent
set guioptions-=m
set guioptions-=T
set guioptions-=r
set listchars=tab:>.,trail:.
set tabstop=4
set shiftwidth=4
set expandtab
set softtabstop=4
"Set working directory to the current file
"set autochdir
map <F2> :NERDTreeToggle<CR>
map <Leader>nt :NERDTree %:p:h<CR>
nnoremap <F8> :TagbarToggle<CR>
"Ctrl-P CONFIG
"set wildignore+=*\\tmp\\*,*.swp,*.zip,*.exe " Windows
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'
let g:ctrlp_extensions = ['tag', 'line']
"Fuzzy searching for tags
nnoremap <leader>t :CtrlPTag<CR>
let g:session_autoload = 'yes'
let g:session_autosave = 'yes'
nnoremap <C-Right> :tabnext<CR>
nnoremap <C-Left> :tabprevious<CR>
nnoremap <C-Up> :tabnew<CR>
nnoremap <C-Down> :tabclose<CR>
" Vertical Split
nnoremap ,v <C-w>v
" Horizontal Split
nnoremap ,h <C-w>s
" Next window
nnoremap ,, <C-w>w
I have a feeling this is a matter of my _vimrc file being too unorganized and me being too careless copy-pasting things I do not fully understand in there, but I'm trying to get out of the beginner phase with the hands on approach and trying to find which plugins work for me. 我感觉这是因为我的_vimrc文件太杂乱无章,而且我对复制粘贴太粗心了,我在那儿不完全了解,但是我正尝试着脱离方法进入初学者阶段,试图找到适合我的插件。
Any info on what might be causing this error is greatly appreciated! 非常感谢任何可能导致此错误的信息! Also, if there is anything else in my _vimrc file that is a bad idea please let me know! 另外,如果_vimrc文件中还有其他不好的主意,请告诉我!
The real rules are slightly less strict but, following is a simple way to set
non-boolean options and let
variables. 实际的规则不太严格,但是下面是set
非布尔选项和let
变量的简单方法。 Stick to this convention and you'll be good. 遵守这个约定,您会变得很好。
set option=value
let variable = value
Note the spacing around the equal sign. 注意等号周围的间距。
The proper way to tell Vim where to look for tags
files is thus: 因此,告诉Vim在哪里寻找tags
文件的正确方法是:
set tags=value
About in your vimrc
: 关于您的vimrc
:
set nocompatible
is useless, you can safely drop it set nocompatible
是没有用的,您可以放心地删除它
let path='~/vimfiles/bundle'
is useless too, just pass the string to the function directly let path='~/vimfiles/bundle'
也没用,直接将字符串传递给函数
prefer long forms, set visualbell
, to short forms, set vb
首选长格式, set visualbell
,短格式, set vb
you don't need to change 'tabstop'
您不需要更改'tabstop'
here is a very optimal value for the 'tags'
option: 这是'tags'
选项的最佳值:
set tags=./tags;,tags;
that will look for tags
files in the directory of the file associated with the current buffer and in the working directory, and up and up until it reaches /
. 它将在与当前缓冲区关联的文件的目录中以及在工作目录中,直到其到达/
为止,一直在寻找tags
文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.