我正在用 gvim 编写 HTML,但让我烦恼的是,omni-complete 总是删除我以前的单词,甚至是我以前选择的单词。
例如,假设我正在编写以下代码**('_' 表示光标,此后)**:
<a style="_" ></a>
按^X-^O后,弹出提示列表,我选择“颜色:”
<a style="color:_" >
然后我再次按^X-^O,它确实弹出了正确的提示(“rgb(”,“#”),但同时删除了前一个单词,如下所示:
<a style="rgb(_" >
谁能给我一些帮助?非常感谢。这是我的 gvimrc:
set guifont=文泉驿等宽微米黑\ 14
colorscheme neverness_modified
set number
set guioptions-=T
winpos 0 0
set columns=1000
set lines=1000
set fileencodings=utf-8,gb18030
set smartindent
set tabstop=4
set shiftwidth=4
set expandtab
filetype on
filetype indent on
syntax on
set cindent
set completeopt+=longest
function Maximize_Window()
silent !wmctrl -r :ACTIVE: -b add,maximized_vert,maximized_horz
endfunction
" ========================
" TagList
" ========================
set tags+=/home/fish47/.vim/tags/STL.tags
" ========================
" TagList
" ========================
let Tlist_Show_One_File=1
let Tlist_Exit_OnlyWindow=1
" ========================
" WinManager
" ========================
let g:winManagerWindowLayout='FileExplorer|TagList'
WMToggle
" ========================
" OmniCppComplete
" ========================
set nocp
filetype plugin on
let OmniCpp_SelectFirstItem=2
let OmniCpp_MayCompleteDot=1
let OmniCpp_MayCompleteArrow=1
let OmniCpp_MayCompleteScope=1
set showcmd
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags