From e2cf7ec9636acb7d9ad07294c3c9bdaba89d7a10 Mon Sep 17 00:00:00 2001 From: Revc Date: Thu, 18 Feb 2021 12:55:50 +0800 Subject: [PATCH] add conditional branches to mapleader Use conditional branches to select an appropriate mapleader. --- vimrcs/basic.vim | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/vimrcs/basic.vim b/vimrcs/basic.vim index 4b3173ca..dcf60978 100644 --- a/vimrcs/basic.vim +++ b/vimrcs/basic.vim @@ -42,8 +42,16 @@ set autoread au FocusGained,BufEnter * checktime " With a map leader it's possible to do extra key combinations -" like w saves the current file -let mapleader = "," +" like 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 w :w!