2012-04-24 69 views
0

簡而言之:我的<Leader>關鍵在啓動過程中發生了某些變化。我已將其保留爲默認\,但我的一些插件使用<C-A>代替。我的領袖突然變心!或者爲什麼一些插件的默認領導者改變了?

我知道有些插件沒有在所有使用<Leader>或使用自己<LocalLeader>鍵或類似的東西(例如c.vim默認爲\即使你在.vimrc裏改變<Leader>,而這是該插件的文檔)。

但是,我的問題是插件,明確指出他們使用<Leader>並最終映射到<C-A>something而不是\something

這樣做的插件是:Command-T,easymotion,screen,ShowMarks。

插件不受影響是bash支持,a.vim。

我所有的插件是:

1: /usr/share/vim/vimrc 
    2: /usr/share/vim/vim73/debian.vim 
    3: /usr/share/vim/vim73/syntax/syntax.vim 
    4: /usr/share/vim/vim73/syntax/synload.vim 
    5: /usr/share/vim/vim73/syntax/syncolor.vim 
    6: /usr/share/vim/vim73/filetype.vim 
    7: /usr/share/vim/vim73/menu.vim 
    8: /usr/share/vim/vim73/autoload/paste.vim 
    9: /home/users/dslavchev/.vimrc 
10: /usr/share/vim/vim73/ftoff.vim 
11: /home/users/dslavchev/.vim/bundle/vundle/autoload/vundle.vim 
12: /home/users/dslavchev/.vim/bundle/vundle/autoload/vundle/config.vim 
13: /home/users/dslavchev/.vim/bundle/Vim-R-plugin/ftdetect/r.vim 
14: /usr/share/vim/vim73/ftplugin.vim 
15: /usr/share/vim/vim73/indent.vim 
16: /usr/share/vim/vim73/syntax/nosyntax.vim 
17: /home/users/dslavchev/.vim/bundle/headlights/plugin/headlights.vim 
18: /home/users/dslavchev/.vim/bundle/a.vim/plugin/a.vim 
19: /home/users/dslavchev/.vim/bundle/bash-support.vim/plugin/bash-support.vim 
20: /home/users/dslavchev/.vim/bundle/c.vim/plugin/c.vim 
21: /home/users/dslavchev/.vim/bundle/errormarker.vim/plugin/errormarker.vim 
22: /home/users/dslavchev/.vim/bundle/reload.vim/plugin/reload.vim 
23: /home/users/dslavchev/.vim/bundle/screen.vim/plugin/screen.vim 
24: /home/users/dslavchev/.vim/bundle/ShowMarks/plugin/showmarks.vim 
25: /home/users/dslavchev/.vim/bundle/surround.vim/plugin/surround.vim 
26: /home/users/dslavchev/.vim/bundle/taglist.vim/plugin/taglist.vim 
27: /home/users/dslavchev/.vim/bundle/valgrind.vim/plugin/valgrind.vim 
28: /home/users/dslavchev/.vim/bundle/YankRing.vim/plugin/yankring.vim 
29: /home/users/dslavchev/.vim/bundle/NERD_tree-Project/plugin/NERD_tree_project.vim 
30: /home/users/dslavchev/.vim/bundle/The-NERD-tree/plugin/NERD_tree.vim 
31: /home/users/dslavchev/.vim/bundle/Conque-Shell/plugin/conque_term.vim 
32: /home/users/dslavchev/.vim/bundle/python.vim/plugin/python_fn.vim 
33: /home/users/dslavchev/.vim/bundle/vim-fugitive/plugin/fugitive.vim 
34: /home/users/dslavchev/.vim/bundle/vim-easymotion/plugin/EasyMotion.vim 
35: /home/users/dslavchev/.vim/bundle/vim-easymotion/autoload/EasyMotion.vim 
36: /home/users/dslavchev/.vim/bundle/vim-rails/plugin/rails.vim 
37: /home/users/dslavchev/.vim/bundle/L9/plugin/l9.vim 
38: /home/users/dslavchev/.vim/bundle/L9/autoload/l9.vim 
39: /home/users/dslavchev/.vim/bundle/FuzzyFinder/plugin/fuf.vim 
40: /home/users/dslavchev/.vim/bundle/FuzzyFinder/autoload/fuf.vim 
41: /home/users/dslavchev/.vim/bundle/FuzzyFinder/autoload/fuf/buffer.vim 
42: /home/users/dslavchev/.vim/bundle/FuzzyFinder/autoload/fuf/file.vim 
43: /home/users/dslavchev/.vim/bundle/FuzzyFinder/autoload/fuf/coveragefile.vim 
44: /home/users/dslavchev/.vim/bundle/FuzzyFinder/autoload/fuf/dir.vim 
45: /home/users/dslavchev/.vim/bundle/FuzzyFinder/autoload/fuf/bookmarkfile.vim 
46: /home/users/dslavchev/.vim/bundle/FuzzyFinder/autoload/fuf/bookmarkdir.vim 
47: /home/users/dslavchev/.vim/bundle/FuzzyFinder/autoload/fuf/tag.vim 
48: /home/users/dslavchev/.vim/bundle/FuzzyFinder/autoload/fuf/buffertag.vim 
49: /home/users/dslavchev/.vim/bundle/FuzzyFinder/autoload/fuf/taggedfile.vim 
50: /home/users/dslavchev/.vim/bundle/FuzzyFinder/autoload/fuf/jumplist.vim 
51: /home/users/dslavchev/.vim/bundle/FuzzyFinder/autoload/fuf/changelist.vim 
52: /home/users/dslavchev/.vim/bundle/FuzzyFinder/autoload/fuf/quickfix.vim 
53: /home/users/dslavchev/.vim/bundle/FuzzyFinder/autoload/fuf/line.vim 
54: /home/users/dslavchev/.vim/bundle/FuzzyFinder/autoload/fuf/help.vim 
55: /home/users/dslavchev/.vim/bundle/FuzzyFinder/autoload/fuf/givenfile.vim 
56: /home/users/dslavchev/.vim/bundle/FuzzyFinder/autoload/fuf/givendir.vim 
57: /home/users/dslavchev/.vim/bundle/FuzzyFinder/autoload/fuf/givencmd.vim 
58: /home/users/dslavchev/.vim/bundle/FuzzyFinder/autoload/fuf/callbackfile.vim 
59: /home/users/dslavchev/.vim/bundle/FuzzyFinder/autoload/fuf/callbackitem.vim 
60: /home/users/dslavchev/.vim/bundle/command-t/plugin/command-t.vim 
61: /home/users/dslavchev/.vim/bundle/clang-complete/plugin/clang_complete.vim 
62: /home/users/dslavchev/.vim/bundle/clang/plugin/clang.vim 
63: /home/users/dslavchev/.vim/bundle/better-snipmate-snippet/plugin/nerd_snippets.vim 
64: /home/users/dslavchev/.vim/bundle/better-snipmate-snippet/plugin/snipMate.vim 
65: /home/users/dslavchev/.vim/bundle/better-snipmate-snippet/plugin/support_functions.vim 
66: /home/users/dslavchev/.vim/bundle/SuperTab-continued./plugin/supertab.vim 
67: /usr/share/vim/vim73/plugin/getscriptPlugin.vim 
68: /usr/share/vim/vim73/plugin/gzip.vim 
69: /usr/share/vim/vim73/plugin/matchparen.vim 
70: /usr/share/vim/vim73/plugin/netrwPlugin.vim 
71: /usr/share/vim/vim73/plugin/rrhelper.vim 
72: /usr/share/vim/vim73/plugin/spellfile.vim 
73: /usr/share/vim/vim73/plugin/tarPlugin.vim 
74: /usr/share/vim/vim73/plugin/tohtml.vim 
75: /usr/share/vim/vim73/plugin/vimballPlugin.vim 
76: /usr/share/vim/vim73/plugin/zipPlugin.vim 
77: /home/users/dslavchev/.vim/bundle/better-snipmate-snippet/after/plugin/snipMate.vim 
78: /usr/share/vim/gvimrc 
79: /home/users/dslavchev/.gvimrc 
80: /usr/share/vim/vim73/synmenu.vim 
81: /usr/share/vim/vim73/scripts.vim 
82: /usr/share/vim/vim73/ftplugin/vim.vim 
83: /usr/share/vim/vim73/indent/vim.vim 
84: /usr/share/vim/vim73/syntax/vim.vim 
85: /usr/share/vim/vim73/syntax/lua.vim 
86: /usr/share/vim/vim73/syntax/perl.vim 
87: /usr/share/vim/vim73/syntax/ruby.vim 
88: /usr/share/vim/vim73/syntax/python.vim 
89: /home/users/dslavchev/.vim/bundle/The-NERD-tree/nerdtree_plugin/exec_menuitem.vim 
90: /home/users/dslavchev/.vim/bundle/The-NERD-tree/nerdtree_plugin/fs_menu.vim 
91: /home/users/dslavchev/.vim/bundle/The-NERD-tree/syntax/nerdtree.vim 

我的.vimrc:

set nocompatible    " be iMproved 
filetype off     " required! 

set rtp+=~/.vim/bundle/vundle/ 
call vundle#rc() 

" let Vundle manage Vundle 
" required! 
Bundle 'gmarik/vundle' 

" My Bundles here: 
"Bundle 'VimLite' 
Bundle 'mbadran/headlights' 
Bundle 'a.vim' 
Bundle 'bash-support.vim' 
Bundle 'c.vim' 
Bundle 'errormarker.vim' 
Bundle 'reload.vim' 
Bundle 'screen.vim' 
Bundle 'ShowMarks' 
Bundle 'surround.vim' 
Bundle 'taglist.vim' 
Bundle 'valgrind.vim' 
Bundle 'YankRing.vim' 
Bundle 'NERD_tree-Project' 
Bundle 'The-NERD-tree' 
Bundle 'cflow-output-colorful' 
Bundle 'Vim-R-plugin' 
" Conque Term 
Bundle 'Conque-Shell' 
" Python 
Bundle 'python.vim' 
" original repos on github 
Bundle 'tpope/vim-fugitive' 
Bundle 'Lokaltog/vim-easymotion' 
Bundle 'rstacruz/sparkup', {'rtp': 'vim/'} 
Bundle 'tpope/vim-rails.git' 
" vim-scripts repos 
Bundle 'L9' 
Bundle 'FuzzyFinder' 
" non github repos 
"Bundle 'git://git.wincent.com/command-t.git' 
" ... 
" Clang complete 
Bundle 'clang-complete' 
Bundle 'clang' 

"snipmate 
Bundle 'better-snipmate-snippet' 

" SuperTab install 
Bundle 'SuperTab-continued.' 

filetype plugin indent on  " required! 

"Change Leader 
"let mapleader="," 
" Shows the leader 
set showcmd 
"This is to enable VimCCC 
let g:VIMCCC_Enable = 1 
" Headlights debug 
let g:headlights_debug_mode = 1 
"This is for using autosyntax 
syntax enable 
let c_gnu = 1 
let c_comment_strings = 1 
let c_space_errors = 1 
let urly_error = 1 
" This is for omni completion 
set ofu=syntaxcomplete#Complete 
" This for replacing without changing clipboard 
nnoremap S "_diwP 
vnoremap S "_d"0P 

"make buffers not resize 
set noequalalways 

" Highlights too long lines 
if exists('+colorcolumn') 
    set colorcolumn=80 
else 
    au BufWinEnter * let w:m2=matchadd('ErrorMsg', '\%>80v.\+', -1) 
endif 

" This is for numbering 
set number 

"This is for cflow 
au BufNewFile,BufRead *.cflow setf cflow 

"This is for tags 
set tags+=tags 
set tags+=tags;/ 
set tags+=~/.vim/tags/tags 
set tags+=~/.vim/tags/opencv_tags 
set tags+=~/Nuclear_Testing/tags 
let Tlist_Auto_Open = 1 

"This is for theasures and such 
set thesaurus+=/home/users/dslavchev/.vim/thesaurus/mthes10/mthesaur.txt 

"This is for mapping 
let g:C_Ctrl_j = 'off' 
let g:BASH_Ctrl_j = 'off' 
nnoremap <C-h> <C-w>h 
nnoremap <C-j> <C-w>j 
nnoremap <C-k> <C-w>k 
nnoremap <C-l> <C-w>l 
map <leader>, A, 
inoremap <leader>, <C-o>A, 
map <leader>; A; 
inoremap <leader>; <C-o>A; 

"This is for opening tabs 
set tabstop=2 
set shiftwidth=2 
set expandtab 
set cindent 


"This is for setting Makefiles with tabs not spaces 
autocmd FileType make setlocal noexpandtab 

"This is for errormarker 
let &errorformat="%f:%l:%c: %t%*[^:]:%m,%f:%l: %t%*[^:]:%m," . &errorformat 
nmap <silent> <unique> \cx :ErrorAtCursor<CR> 

"This is for showing marks 
"command DoShowMarks 

"This is for Valgrind 
let g:valgrind_arguments='--num-callers=50' 
let g:valgrind_use_horizontal_window=0 

"this is for the path 
set path+=.,inc,src,../inc,../src 

"this is for spellchecks 
set spell 

"this is for easyreader 
let g:EasyMotion_leader_key = '<Leader><Leader>' 
+1

聽起來像這樣的問題應該被問到具體的插件時,他們說不使用。 – 2012-04-24 12:34:58

+1

你確定Command-T受到影響嗎?從它的代碼來看,它似乎並沒有將「」設置爲任何東西。你能告訴我們你的.vimrc嗎? – romainl 2012-04-24 13:27:14

+3

你也可以嘗試':詳細地圖'和':詳細地圖'。它會告訴你你的映射在哪裏定義了''和''。 – romainl 2012-04-24 13:32:16

回答

0

我已經找到了解決辦法。最後。

有人正在更改screen.vim插件中的映射。

只需在.vim中爲mapleader刷新即可完成工作。

" screen(1)-like mappings for buffers 
" Ricardo Signes <[email protected]> 

" there should contain a ^A between the quotes, below 
" the next revision will have a nicer system for loading this plugin with a 
" different meta/leader character 
let mapleader = "" 

nnoremap <Leader><Space> :bnext<CR> 
nnoremap <Leader>n  :bnext<CR> 
nnoremap <Leader><C-n> :bnext<CR> 
nnoremap <Leader>p  :bprev<CR> 
nnoremap <Leader><C-p> :bprev<CR> 
nnoremap <Leader>c  :new\|only<CR> 
nnoremap <Leader><C-c> :new\|onlyCR> 
nnoremap <Leader>K  :bdel<CR> 
nnoremap <Leader>S  :split<CR> 
nnoremap <Leader><Tab> :wincmd w<CR> 
nnoremap <Leader>Q  :only<CR> 
nnoremap <Leader>Q  :only<CR> 
nnoremap <Leader>w  :ls<CR> 
nnoremap <Leader><C-w> :ls<CR> 
nnoremap <Leader>a  :e #<CR> 
nnoremap <Leader><C-a> :e #<CR> 
nnoremap <Leader>"  :BufExp<CR> 
+1

[確實](http://stackoverflow.com/questions/10297767/my-leaders-sudden-change-of-heart-or-why-some-plugins-have-the-default-leader#comment13274125_10297767),'grep 「去拯救! – romainl 2012-04-25 14:00:09