我已将旧的.vimrc切换到Arch Linux的新安装,每当我输入'。'时都会出现以下错误。编辑.cpp文件时(句点)
E117: Unknown function: omni#cpp#maycomplete#Dot
E15: Invalid expression: omni#cpp#maycomplete#Dot()
起初我没有明确安装任何自动完成插件。在那之后我尝试安装了一对,但是在这一点上它太费劲了,所以我删除了所有内容,但仍然得到了这个错误。
有没有人知道如何在不打扰自动完成插件的情况下让错误消失?我希望能够输入'。'再次:))
仅供参考,这是我的〜.vimrc
" .vimrc
" See: http://vimdoc.sourceforge.net/htmldoc/options.html for details
" For multi-byte character support (CJK support, for example):
"set fileencodings=ucs-bom,utf-8,cp936,big5,euc-jp,euc-kr,gb18030,latin1
set tabstop=4 " Number of spaces that a <Tab> in the file counts for.
set shiftwidth=4 " Number of spaces to use for each step of (auto)indent.
"set expandtab " Use the appropriate number of spaces to insert a <Tab>.
" Spaces are used in indents with the '>' and '<' commands
" and when 'autoindent' is on. To insert a real tab when
" 'expandtab' is on, use CTRL-V <Tab>.
"set smarttab " When on, a <Tab> in front of a line inserts blanks
" according to 'shiftwidth'. 'tabstop' is used in other
" places. A <BS> will delete a 'shiftwidth' worth of space
" at the start of the line.
set showcmd " Show (partial) command in status line.
set number " Show line numbers.
set showmatch " When a bracket is inserted, briefly jump to the matching
" one. The jump is only done if the match can be seen on the
" screen. The time to show the match can be set with
" 'matchtime'.
set hlsearch " When there is a previous search pattern, highlight all
" its matches.
set incsearch " While typing a search command, show immediately where the
" so far typed pattern matches.
set ignorecase " Ignore case in search patterns.
set smartcase " Override the 'ignorecase' option if the search pattern
" contains upper case characters.
set backspace=2 " Influences the working of <BS>, <Del>, CTRL-W
" and CTRL-U in Insert mode. This is a list of items,
" separated by commas. Each item allows a way to backspace
" over something.
set autoindent " Copy indent from current line when starting a new line
" (typing <CR> in Insert mode or when using the "o" or "O"
" command).
set textwidth=0 " Maximum width of text that is being inserted. A longer
" line will be broken after white space to get this width.
set formatoptions=c,q,r,t " This is a sequence of letters which describes how
" automatic formatting is to be done.
"
" letter meaning when present in 'formatoptions'
" ------ ---------------------------------------
" c Auto-wrap comments using textwidth, inserting
" the current comment leader automatically.
" q Allow formatting of comments with "gq".
" r Automatically insert the current comment leader
" after hitting <Enter> in Insert mode.
" t Auto-wrap text using textwidth (does not apply
" to comments)
set ruler " Show the line and column number of the cursor position,
" separated by a comma.
set background=dark " When set to "dark", Vim will try to use colors that look
" good on a dark background. When set to "light", Vim will
" try to use colors that look good on a light background.
" Any other value is illegal.
set mouse=a " Enable the use of the mouse.
filetype plugin indent on
syntax on
let g:Imap_UsePlaceHolders = 0
let g:Tex_EnvironmentMaps = 0
let g:Tex_FontMaps = 0
let g:Tex_SectionMaps = 0
let g:Tex_SmartKeyBS = 0
let g:Tex_SmartKeyQuote = 0
let g:Tex_SmartKeySpace = 0
let g:Tex_SmartKeyDot = 0
let g:Tex_DefaultTargetFormat = 'pdf'
let g:Tex_MultipleCompileFormats = 'pdf dvi'
let g:Tex_EscapeChars = '\'
" arduino syntax
autocmd! BufNewFile,BufRead *.pde setlocal ft=arduino
call pathogen#infect()
call pathogen#helptags()
而且,因为我安装了病原体,所以〜/ .vim / bundle
的内容[~]$ ls ~/.vim/bundle/
total 0
drwxr-xr-x 6 ryantr ryantr 40 Jul 3 23:01 netrw
答案 0 :(得分:2)
cpp
的文件类型插件为.
提供了插入模式映射。检查:scriptnames
的输出是否包含相应缓冲区中包含.../ftplugin/cpp...
或:verbose imap .
的文件。
如果你找不到罪魁祸首(inoremap <buffer> .
),那么
:autocmd FileType cpp iunmap <buffer> .
你~/.vimrc
中的应该摆脱破碎的映射。
答案 1 :(得分:1)
看起来OmniCppComplete未正确安装。