页次: 1
我已经找到即时更改的办法了
:hi Pmenu ctermbg=red
这个是可以起作用的。
但是如果写到vimrc里面
hi Pmenu ctermbg=red
确实无效的,用:highlight查看显示Pmenu为cleared。
难道是我语法有问题?
离线
注意执行的顺序。配色是由配色方案管理的,它会在执行时清除一下再应用自己的设置。所以你要么去修改你所使用的配色方案,要么在 ColorScheme 事件之后执行。
在线
我放置的位置应该是没问题,在文件最下面,下面是我的vimrc
"设置Vundle
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim/
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'altercation/vim-colors-solarized'
Plugin 'https://github.com/Lokaltog/vim-powerline'
Plugin 'scrooloose/nerdtree'
Plugin 'jistr/vim-nerdtree-tabs'
Plugin 'yonchu/accelerated-smooth-scroll'
Plugin 'VST'
Plugin 'kien/ctrlp.vim'
Plugin 'python.vim'
Plugin 'django.vim'
Plugin 'vim-scripts/VimIM'
Plugin 'https://github.com/terryma/vim-multiple-cursors'
Plugin 'https://github.com/nathanaelkane/vim-indent-guides'
"Plugin 'plasticboy/vim-markdown'
"Plugin 'asins/vimcdoc'
"Plugin 'yonchu/accelerated-smooth-scroll'
"Plugin 'vimwiki'
"Plugin 'myusuf3/numbers.vim'
call vundle#end()
filetype plugin indent on
syntax on
"colorscheme solarized
colorscheme desert
set background=dark
"显示行号
set nu rnu
"自动匹配括号
set showmatch
"设置Leader为,
let mapleader=","
"设置窗口大小
"set lines=30 columns=100
if has('gui_running')
set lines=30 columns=100
endif
"第一行设置tab自动变为空格,第二行设置tab键为4个空格,第三行设置当行之间交错时使用4个空格
set expandtab
set tabstop=4
set shiftwidth=4
"为光标所在行加高亮
"set cursorline
"为光标所在列加高亮
set cuc
"总是显示状态栏
set laststatus=2
"去除菜单栏
"set go=
"去除自动备份
set nobackup
"Vst设置
let g:vst_write_export=1
"设置字体
"set guifont=明兰_Code:h12
"powerline{
"set guifont=DejaVu\ Sans\ Mono\ for\ Powerline
set guifont=Consolas\ for\ Powerline\ 11
set t_Co=256
let g:Powerline_symbols='fancy'
"}
"消除乱码
"set termencoding=chinese
set encoding=utf-8
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
set fileencodings=utf-8,chinese,utf-16,big5
let g:indent_guides_enable_on_vim_startup = 1
"自动判断VIM配置文件目录
"if has("win32")
" let $VIMFILES = $VIM.'/vimfiles'
"else
" let $VIMFILES = $HOME.'/.vim'
"endif
"设置NERDTree
map <F2> :NERDTreeToggle<cr>
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") &&b:NERDTreeType == "primary") | q | endif
"autocmd vimenter * NERDTree
"Tab页设置
set showtabline=2
map <C-t> :tabe<cr>
"设置python插件
set filetype=python
au BufNewFile,BufRead *.py,*.pyw setf python
"映射用sudo保存文件
cmap w!! w !sudo tee > /dev/null %
"设置切换粘贴模式快捷键
set pastetoggle=<F9>
"设置VimIM
let g:vimim_cloud=-1 "关闭云输入
" 设置快捷键将选中文本块复制至系统剪贴板
vnoremap <Leader>y "+y
" 设置快捷键将系统剪贴板内容粘贴至 vim
nmap <Leader>p "+p
"CtrlP设置
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'
let g:ctrlp_working_path_mode = 'ra'
"YouCompleteM设置
let g:ycm_collect_identifiers_from_tags_files = 1 " Let YCM read tags from Ctags file
let g:ycm_use_ultisnips_completer = 1 " Default 1, just ensure
let g:ycm_seed_identifiers_with_syntax = 1 " Completion for programming language's keyword
let g:ycm_complete_in_comments = 1 " Completion in comments
let g:ycm_complete_in_strings = 1 " Completion in string
"弹出菜单颜色
hi Pmenu ctermbg=red
离线
嗯看上去应该是没有问题的。用 'verbose' 和 'verbosefile' 选项检查一下实际都执行了些什么吧。
在线
页次: 1