隐藏MacVim源代码工具提示

时间:2014-11-07 00:54:52

标签: vim homebrew macvim osx-yosemite

我使用Homebrew在MacOs X Yosemite上安装了MacVim 7.4-73_1。当在ruby文件中悬停在某些单词上时会导致工具提示淡入。它似乎会减慢Vim的速度,导致工具提示加载时出现短暂的延迟,它们也会导致阻碍。所以,我的目标是将这些工具提示全部隐藏起来。我知道这可能是由我使用的插件引起的,但我似乎无法将其固定下来。

我在下面附上了一个显示另一个奇怪行为的gif。如果我开始从vim资源管理器编辑文件,则仅显示工具提示。

Example GIF http://f.cl.ly/items/0x0q2a083J392t412f2P/2014-11-06%2019_37_12.gif

以下是我正在使用的vim插件和我的.vimrc

的列表

我的所有插件

ack.vim
mustache
nerdcommenter
sass-convert.vim
snipmate-mocha
snipmate-snippets
tabular
tlib_vim
vim-addon-mw-utils
vim-coffee-script
vim-css-color
vim-fugitive
vim-less
vim-rails
vim-rspec
vim-snipmate

我的Vimrc文件

" Use Pathogen
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()

" ================
" Ruby stuff
" ================
syntax on                 " Enable syntax highlighting
filetype plugin indent on " Enable filetype-specific indenting and plugins

augroup myfiletypes
  " Clear old autocmds in group
  autocmd!
  " autoindent with two spaces, always expand tabs
  autocmd FileType ruby,eruby,yaml set ai sw=2 sts=2 et
augroup END
 "================

let mapleader = ","

" START html.tidy
:vmap <Leader>ti :!tidy -q -i --show-errors 0<CR>

" START TAB.vim
nmap <Leader>a{ :Tabularize /{<CR>
vmap <Leader>a= :Tabularize /=<CR>
nmap <Leader>a= :Tabularize /=<CR>
nmap <Leader>a. :Tabularize /=><CR>
vmap <Leader>a. :Tabularize /=><CR>
nmap <Leader>a: :Tabularize /:\zs<CR>
vmap <Leader>a: :Tabularize /:\zs<CR>

"inoremap <silent> = =<Esc>:call <SID>ealign()<CR>a
function! s:ealign()
  let p = '^.*=[^>]*$'
  if exists(':Tabularize') && getline('.') =~# '^.*=' && (getline(line('.')-1) =~# p || getline(line('.')+1) =~# p)
    let column = strlen(substitute(getline('.')[0:col('.')],'[^=]','','g'))
    let position = strlen(matchstr(getline('.')[0:col('.')],'.*=\s*\zs.*'))
    Tabularize/=/l1
    normal! 0
    call search(repeat('[^=]*=',column).'\s\{-\}'.repeat('.',position),'ce',line('.'))
  endif
endfunction

"inoremap <silent> => =><Esc>:call <SID>ralign()<CR>a
function! s:ralign()
  let p = '^.*=>*$'
  if exists(':Tabularize') && getline('.') =~# '^.*=>' && (getline(line('.')-1) =~# p || getline(line('.')+1) =~# p)
    let column = strlen(substitute(getline('.')[0:col('.')],'[^=>]','','g'))
    let position = strlen(matchstr(getline('.')[0:col('.')],'.*=>\s*\zs.*'))
    Tabularize/=/l1
    normal! 0
    call search(repeat('[^=>]*=>',column).'\s\{-\}'.repeat('.',position),'ce',line('.'))
  endif
endfunction

inoremap <silent> <Bar> <Bar><Esc>:call <SID>palign()<CR>a

function! s:palign()
  let p = '^\s*|\s.*\s|\s*$'
  if exists(':Tabularize') && getline('.') =~# '^\s*|' && (getline(line('.')-1) =~# p || getline(line('.')+1) =~# p)
    let column = strlen(substitute(getline('.')[0:col('.')],'[^|]','','g'))
    let position = strlen(matchstr(getline('.')[0:col('.')],'.*|\s*\zs.*'))
    Tabularize/|/l1
    normal! 0
    call search(repeat('[^|]*|',column).'\s\{-\}'.repeat('.',position),'ce',line('.'))
  endif
endfunction
" END TAB.vim

noremap <Up> <nop>
noremap <Down> <nop>
noremap <Left> <nop>
noremap <Right> <nop>


" START rspec.vim

"map <Leader>t :call RunCurrentSpecFile()<CR>
"map <Leader>s :call RunNearestSpec()<CR>
"map <Leader>l :call RunLastSpec()<CR>
map <Leader>ra :call RunAllSpecs()<CR>

" END rspec.vim

set nocompatible
set backspace=indent,eol,start " allow backspacing over everything in insert mode
set history=500     " keep 500 lines of command line history
set ruler       " show the cursor position all the time
set showcmd     " display incomplete commands
set autoindent " indent next line
set showmatch " Attempts to show matching (), {}, or []
set nowrap

"set nobackup
"set noswapfile
set backupdir=~/.tmp
set directory=~/.tmp " Don't clutter my dirs up with swp and tmp files

set autoread 
set wmh=0 " This sets the minimum window height to 0, so you can stack many more files before things get crowded. Vim will only display the filename.
set viminfo+=! 


" Edit another file in the same directory as the current file
" uses expression to extract path from current file's path
map <Leader>e :Explore 
map <Leader>ep :e <C-R>=expand("%:p:h") . '/'<CR>
map <Leader>s :Sexplore 
map <Leader>v :Vexplore 
map <Leader>nt :tabe <C-R>=expand("%:p:h") . '/'<CR>

" Easy window navigation
map <C-h> <C-w>h
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-l> <C-w>l

vmap <leader>h :!/Users/ross/.rvm/bin/vim_html2haml<cr>

function! PasteAsCoffee()

  :read !pbpaste | js2coffee

endfunction

:command! PasteAsCoffee :call PasteAsCoffee()
:map <leader>pc :PasteAsCoffee<CR>

set tabstop=2 " Set tabs to 2 spaces
set autowriteall " Auto save on close
set spell
set list
set listchars=tab:>.,trail:.,extends:#,nbsp:. " Highlight problematic whitespace

set et " expand tab
set sw=2 " shift width < >
set smarttab " deltes of adds a tab
set tw=80 " auto break lines at 80 columns
set incsearch " don't show search matches as you type
set ignorecase smartcase " when searching ignore case when the pattern contains lowercase letters only.
set laststatus=2  " show status line. never=0 only when split=1 always=2
set number " show line numbers
set gdefault " assume the /g flag on :s substitutions to replace all matches in a line
set autoindent " always set autoindenting on

set pastetoggle=<F2> " Don't auto indent pasted text after F2

let g:netrw_preview = 1
let g:fuzzy_ignore = ".DS_Store;*.png;*.PNG;*.JPG;*.jpg;*.GIF;*.gif;vendor/**;coverage/**;tmp/**;rdoc/**"
set nofoldenable " Say no to code folding...
set statusline+=%<%f\ %h%m%r%{fugitive#statusline()}%=%-14.(%l,%c%V%)\ %P

" I don't remember what this does
autocmd BufEnter * silent! lcd %:p:h

" remove search highlight with ,/
nmap <silent> ,/ :nohlsearch<CR>

" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
  syntax on
  set hlsearch
endif

" Only do this part when compiled with support for autocommands.
if has("autocmd")

  " Enable file type detection.
  " Use the default filetype settings, so that mail gets 'tw' set to 72,
  " 'cindent' is on in C files, etc.
  " Also load indent files, to automatically do language-dependent indenting.
  filetype plugin indent on


endif " has("autocmd")

colors codeschool

1 个答案:

答案 0 :(得分:5)

您可以在:help balloon-eval中了解该功能。

默认情况下禁用该选项,因此您的某个插件可能已启用它。这个命令应该显示哪一个是罪魁祸首:

:verbose set ballooneval?

您可以使用:set noballooneval停用该功能。