1
0
mirror of https://github.com/amix/vimrc synced 2025-07-04 15:04:59 +08:00

add conditional branches to mapleader

Use conditional branches to select an appropriate mapleader.
This commit is contained in:
Revc
2021-02-18 12:55:50 +08:00
committed by GitHub
parent f6855c3c41
commit e2cf7ec963

View File

@ -42,8 +42,16 @@ set autoread
au FocusGained,BufEnter * checktime
" With a map leader it's possible to do extra key combinations
" like <leader>w saves the current file
let mapleader = ","
" like <leader>w saves the current file.
" 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
nmap <leader>w :w!<cr>