vim: change leader to <Space>

This commit is contained in:
2019-04-23 22:58:19 +03:00
parent e3663e342d
commit eec928fa74

View File

@@ -19,8 +19,9 @@ set fileencoding=utf-8
set history=1000 set history=1000
" Remap the <leader> to , " Remap the <leader> to ,
let mapleader="," nnoremap <Space> <Nop>
let g:mapleader="," let mapleader="\<Space>"
let maplocalleader = "\<Space>"
" Includes ftplugin.vim which is responsible for filetype detection " Includes ftplugin.vim which is responsible for filetype detection
filetype plugin indent on filetype plugin indent on
@@ -607,13 +608,12 @@ nnoremap <C-l> <C-w>l
cnoremap <C-A> <Home> cnoremap <C-A> <Home>
cnoremap <C-E> <End> cnoremap <C-E> <End>
" CtrlP -> fzf :Files
nnoremap <silent> <expr> <space> (expand('%') =~ 'NERD_tree' ? "\<c-w>\<c-w>" : '').":Files\<cr>"
" ,<space> -> clears search highlight " ,<space> -> clears search highlight
nmap <silent><leader><space> :nohlsearch<cr> nmap <silent><leader><space> :nohlsearch<cr>
" ,, -> toggle between last open buffers " ,, -> toggle between last open buffers
nmap <leader><leader> <c-^> nmap <,><,> <c-^>
" CtrlP -> fzf :Files
nnoremap <silent> <expr> <leader><space> (expand('%') =~ 'NERD_tree' ? "\<c-w>\<c-w>" : '').":Files\<cr>"
" ,w -> strip trailing whitespace " ,w -> strip trailing whitespace
nmap <silent><leader>w :call StripTrailingWhitespace()<CR> nmap <silent><leader>w :call StripTrailingWhitespace()<CR>
" ,n -> NERDTree " ,n -> NERDTree