Map leader不适用于c.vim插件

Map leader不适用于c.vim插件,vim,Vim,我正在尝试将c.vim插件包含到我的vim中 不知何故,它没有意识到,我将mapleader更改为,,并且仍然使用\ 我想,问题隐藏在我的.vimrc中的某个地方,因此我将附加它 任何帮助都将不胜感激 "#################################################### " Basic Settings "#################################################### "Set the Ma

我正在尝试将c.vim插件包含到我的vim中

不知何故,它没有意识到,我将mapleader更改为
,并且仍然使用
\

我想,问题隐藏在我的.vimrc中的某个地方,因此我将附加它

任何帮助都将不胜感激

"####################################################
"             Basic Settings
"#################################################### 
"Set the Mapleader
let mapleader=","
"Setzt den Localleader
let localleader="-"
"Aktiviert Plugins
filetype plugin on
source ~/.vim/ftplugin/c.vim
"Neue Dateien werden beim erstellen gespeichert
autocmd BufNewFile * :write 
"####################################################
"       Various Settings
"####################################################

" Complete options (disable preview scratch window)
"set completeopt = menu, menuone, longest
" Limit popup menu height
"set pumheight = 15
" SuperTab option for context aware completion     
let g:SuperTabDefaultCompletionType = "context"

" Disable auto popup, use <Tab> to autocomplete
let g:clang_complete_auto = 0
" Show clang errors in the quickfix window
let g:clang_complete_copen = 1
"Automatic VIMRC update when VIMRC is written
au! BufWritePost .vimrc source % 

"####################################################
"            Basic Maps
"#####################################################

"interpreting ii as <ESC>
inoremap ii <ESC>
"cnoremap jj <c-c>
",v opens .vimrc in a new window
noremap <leader>v :e $MYVIMRC<CR><C-W>
"Y yanks to the end of the line
nnoremap Y y$
"shorcut for  copying line to clipboard
nnoremap <leader>y "*y
nnoremap <leader>p "*p
"word around the cursor is capitalized
inoremap <c-u> <ESC>BvWU<ESC>Ea 
"H moves the cursor to the begining of the line, L to the end
nnoremap H 0
nnoremap L $
"LustyJuggler is activated with ,b
nnoremap <silent> <leader>b :LustyJuggler<CR>
"mark a word in visual mode
vnoremap <leader>a <ESC>bve


"#################################################
"        C++ - Settings
"################################################# 

"#################################################
"            Various Settings
"################################################

"Spellcheking in German
set spelllang=de
set spellfile=~/.vim/spell.de.utf-8.add
nnoremap <leader>s :setlocal spell! spelllang=de

"Change the directory to the one of the current file
autocmd BufEnter * lcd %:p:h
”####################################################
“基本设置
"#################################################### 
“设置Mapleader
让mapleader=“,”
“设置一个本地领导者
让localleader=“-”
“Aktiviert插件
上的文件类型插件
source~/.vim/ftplugin/c.vim
“新的日期已经过去了
autocmd BufNewFile*:写入
"####################################################
“各种设置
"####################################################
“完整选项(禁用预览草稿窗口)
“set completeopt=菜单,菜单单,最长
“限制弹出菜单的高度
“设置泵的高度=15
“用于上下文感知完成的SuperTab选项
设g:SuperTabDefaultCompletionType=“context”
“禁用自动弹出,用于自动完成
设g:clang_complete_auto=0
“在快速修复窗口中显示叮当声错误
设g:clang_complete_copen=1
“写入VIMRC时自动更新VIMRC
哎呀!BufWritePost.vimrc源%
"####################################################
“基本地图
"#####################################################
“将二解释为
inoremap ii
“重新映射jj
,v打开。在新窗口中显示vimrc
noremap v:e$MYVIMRC
“Y猛拉到队伍的尽头
NNOREY$
“用于将行复制到剪贴板的shorcut
nnoremap y“*y
nnoremap p“*p
“光标周围的单词大写
伊诺雷玛酒店
H将光标移到行的开头,L移到行的结尾
nNOREMAPH 0
nnoremap L$
“LustyJuggler通过,b激活
nnoremap b:LustyJuggler
“在视觉模式下标记一个单词
vnoremap a bve
"#################################################
“C++设置”
"################################################# 
"#################################################
“各种设置
"################################################
“德语拼写检查”
设置拼写lang=de
设置拼写文件=~/.vim/spell.de.utf-8.add
nnoremap s:setlocal-spell!spelllang=de
“将目录更改为当前文件的目录
autocmd BufEnter*液晶显示器%:p:h

根据

更改此插件的mapleader的正确方法是设置
g:C\u mapleader

这是从c.vim的帮助中复制的。(
:h cs支持使用vim


此外,在vimrc中不需要
source~/.vim/ftplugin/c.vim
。这应该为您完成。

没有变量
localleader
。我想你是说
maplocalleader
。详情请参见“没有变量”,呵呵。看看我的智能手机有多智能?
Changing the default map leader '\'
-----------------------------------
The map leader can be changed by the user by setting a global variable in the
file .vimrc

 let g:C_MapLeader = ','

The map leader is now a comma. The 'line end comment' command is now defined
as ',cl'. This setting will be used as a so called local leader and influences
only files with filetype 'c' and 'cpp'.