mirror of
https://github.com/amix/vimrc
synced 2025-02-28 14:12:51 +08:00
add conditional branches to mapleader
Use conditional branches to select an appropriate mapleader.
This commit is contained in:
parent
f6855c3c41
commit
e2cf7ec963
@ -42,8 +42,16 @@ set autoread
|
|||||||
au FocusGained,BufEnter * checktime
|
au FocusGained,BufEnter * checktime
|
||||||
|
|
||||||
" With a map leader it's possible to do extra key combinations
|
" With a map leader it's possible to do extra key combinations
|
||||||
" like <leader>w saves the current file
|
" like <leader>w saves the current file.
|
||||||
let mapleader = ","
|
" To override this behavior and set it back to '\' (or any other
|
||||||
|
" character) add the following to your ~/.vim_runtime/eden_configs.vim file:
|
||||||
|
" let g:amix_leader='\'
|
||||||
|
" The method comes from sfp13/spf13-vim.
|
||||||
|
if !exists('g:amix_leader')
|
||||||
|
let mapleader = ','
|
||||||
|
else
|
||||||
|
let mapleader=g:amix_leader
|
||||||
|
endif
|
||||||
|
|
||||||
" Fast saving
|
" Fast saving
|
||||||
nmap <leader>w :w!<cr>
|
nmap <leader>w :w!<cr>
|
||||||
|
Loading…
Reference in New Issue
Block a user