<leader> changed to <space>
This commit is contained in:
parent
50bdbcd016
commit
32873f9271
76
vimrc
76
vimrc
|
@ -77,35 +77,35 @@ set wrapmargin=0
|
|||
" key #mappings{{{
|
||||
let g:mapleader = "\<space>"
|
||||
|
||||
nnoremap <leader>rc :so $MYVIMRC<CR>
|
||||
nnoremap <space>rc :so $MYVIMRC<CR>
|
||||
|
||||
" Focus on current fold, close the rest
|
||||
nnoremap <leader>zz zMzvzz
|
||||
nnoremap <space>zz zMzvzz
|
||||
|
||||
" replace current word with last yanked/deleted text
|
||||
nnoremap <leader>rr "_diwP
|
||||
nnoremap <space>rr "_diwP
|
||||
" replace current word with last yanked text
|
||||
nnoremap <leader>ry diw"0P
|
||||
nnoremap <space>ry diw"0P
|
||||
|
||||
inoremap jk <esc>
|
||||
|
||||
nnoremap A :call CheckLineEnding()<CR>
|
||||
|
||||
nnoremap <leader>co :!clear;
|
||||
nnoremap <space>co :!clear;
|
||||
|
||||
nnoremap <leader>gs :!clear; echo 'git status'; git status<CR>
|
||||
nnoremap <leader>gd :!clear; echo 'git diff'; git diff<CR>
|
||||
nnoremap <leader>ga :!clear; git add %; git status<CR>
|
||||
nnoremap <leader>gA :!clear; git add .; git status<CR>
|
||||
nnoremap <leader>gc :!clear; git commit -m ''<Left>
|
||||
nnoremap <leader>gg :!clear; git add %; git commit -m ''<Left>
|
||||
nnoremap <leader>gp :!clear; echo 'git push'; git push<CR>
|
||||
nnoremap <leader>gl :!clear; git log<CR>
|
||||
nnoremap <space>gs :!clear; echo 'git status'; git status<CR>
|
||||
nnoremap <space>gd :!clear; echo 'git diff'; git diff<CR>
|
||||
nnoremap <space>ga :!clear; git add %; git status<CR>
|
||||
nnoremap <space>gA :!clear; git add .; git status<CR>
|
||||
nnoremap <space>gc :!clear; git commit -m ''<Left>
|
||||
nnoremap <space>gg :!clear; git add %; git commit -m ''<Left>
|
||||
nnoremap <space>gp :!clear; echo 'git push'; git push<CR>
|
||||
nnoremap <space>gl :!clear; git log<CR>
|
||||
|
||||
" netrw
|
||||
nnoremap <leader>ex :Ex<CR>
|
||||
nnoremap <leader>ee :e .<CR>
|
||||
nnoremap <leader>eq :Rex<CR>
|
||||
nnoremap <space>ex :Ex<CR>
|
||||
nnoremap <space>ee :e .<CR>
|
||||
nnoremap <space>eq :Rex<CR>
|
||||
|
||||
" better window navigaton
|
||||
nnoremap <C-h> <C-w>h
|
||||
|
@ -120,29 +120,29 @@ nnoremap <Esc>h :vertical resize -5<CR>
|
|||
nnoremap <Esc>= <C-w>=
|
||||
|
||||
"location list and quickfix mappings
|
||||
nnoremap <leader>ll :botright lwindow<CR>
|
||||
nnoremap <leader>lp :lprev<CR>
|
||||
nnoremap <leader>ln :lnext<CR>
|
||||
nnoremap <leader>lc :lclose<CR>
|
||||
nnoremap <leader>llh :lhistory<CR>
|
||||
nnoremap <leader>llp :lolder<CR>
|
||||
nnoremap <leader>lln :lnewer<CR>
|
||||
nnoremap <space>ll :botright lwindow<CR>
|
||||
nnoremap <space>lp :lprev<CR>
|
||||
nnoremap <space>ln :lnext<CR>
|
||||
nnoremap <space>lc :lclose<CR>
|
||||
nnoremap <space>llh :lhistory<CR>
|
||||
nnoremap <space>llp :lolder<CR>
|
||||
nnoremap <space>lln :lnewer<CR>
|
||||
|
||||
nnoremap <leader>qf :botright cwindow<CR>
|
||||
nnoremap <leader>qp :cprev<CR>
|
||||
nnoremap <leader>qn :cnext<CR>
|
||||
nnoremap <leader>qc :cclose<CR>
|
||||
nnoremap <leader>qfh :chistory<CR>
|
||||
nnoremap <leader>qfp :colder<CR>
|
||||
nnoremap <leader>qfn :cnewer<CR>
|
||||
nnoremap <space>qf :botright cwindow<CR>
|
||||
nnoremap <space>qp :cprev<CR>
|
||||
nnoremap <space>qn :cnext<CR>
|
||||
nnoremap <space>qc :cclose<CR>
|
||||
nnoremap <space>qfh :chistory<CR>
|
||||
nnoremap <space>qfp :colder<CR>
|
||||
nnoremap <space>qfn :cnewer<CR>
|
||||
|
||||
nnoremap <leader>nh :noh<CR>
|
||||
nnoremap <space>nh :noh<CR>
|
||||
|
||||
" quick grep of visual selection
|
||||
vnoremap <leader>gr y:grep! -R <C-r>" .
|
||||
vnoremap <space>gr y:grep! -R <C-r>" .
|
||||
|
||||
" open quickfix window of TODOs
|
||||
nnoremap <leader>td :grep! -R '// *TODO' .<CR>:botright cwindow<CR>:echo len(getqflist()) 'TODOs'<CR>
|
||||
nnoremap <space>td :grep! -R '// *TODO' .<CR>:botright cwindow<CR>:echo len(getqflist()) 'TODOs'<CR>
|
||||
|
||||
" brace/quotes completion
|
||||
inoremap {{ {}<left>
|
||||
|
@ -163,11 +163,11 @@ inoremap '; '';<Left><Left>
|
|||
|
||||
inoremap ;; ;<esc>
|
||||
|
||||
nnoremap <leader>nn :set invrelativenumber<CR>
|
||||
nnoremap <leader>hl :nohlsearch<CR>
|
||||
nnoremap <space>nn :set invrelativenumber<CR>
|
||||
nnoremap <space>hl :nohlsearch<CR>
|
||||
|
||||
" devdocs mapping
|
||||
nnoremap <leader>dd :DD<CR>
|
||||
nnoremap <space>dd :DD<CR>
|
||||
"}}}
|
||||
|
||||
" #abbreviations{{{
|
||||
|
@ -244,7 +244,7 @@ endfunction"}}}
|
|||
function! SyntaxItem() abort "{{{
|
||||
return synIDattr(synID(line('.'),col('.'),1),'name') . ' -> ' . synIDattr(synIDtrans(synID(line('.'),col('.'),1)), 'name' )
|
||||
endfunction
|
||||
nnoremap <leader>p :echom SyntaxItem()<CR>"}}}
|
||||
nnoremap <space>p :echom SyntaxItem()<CR>"}}}
|
||||
|
||||
" devdocs DD
|
||||
" https://gist.github.com/romainl/8d3b73428b4366f75a19be2dad2f0987#file-devdocs-vim
|
||||
|
@ -276,7 +276,7 @@ if !exists('*RangerExplorer') "{{{
|
|||
endif
|
||||
redraw!
|
||||
endfun
|
||||
map <Leader>ra :call RangerExplorer()<CR>
|
||||
map <space>ra :call RangerExplorer()<CR>
|
||||
endif"}}}
|
||||
|
||||
function! GetLinterStatus(key) abort "{{{
|
||||
|
|
|
@ -47,7 +47,7 @@ function! GetStatus(isactive)
|
|||
" current register
|
||||
if a:isactive
|
||||
let l:statusline.=l:separator . l:active
|
||||
let l:ttatusline.=' %#StatusLineActiveQuotes#"' . l:active . '%{v:register}%#StatusLineActiveQuotes#" '
|
||||
let l:statusline.=' %#StatusLineActiveQuotes#"' . l:active . '%{v:register}%#StatusLineActiveQuotes#" '
|
||||
endif
|
||||
|
||||
|
||||
|
|
|
@ -129,8 +129,8 @@ augroup END
|
|||
|
||||
|
||||
" ALE
|
||||
nnoremap <leader>ne :lnext<cr>
|
||||
nnoremap <leader>pe :lprev<cr>
|
||||
nnoremap <space>ne :lnext<cr>
|
||||
nnoremap <space>pe :lprev<cr>
|
||||
|
||||
let g:ale_sign_error = '>>'
|
||||
let g:ale_sign_warning = '--'
|
||||
|
@ -155,14 +155,14 @@ let g:netrw_list_hide='^\..*'
|
|||
|
||||
|
||||
" bufexploer
|
||||
nnoremap <leader>o :BufExplorer<CR>
|
||||
nnoremap <space>o :BufExplorer<CR>
|
||||
|
||||
" undotree
|
||||
nnoremap <leader>ut :UndotreeToggle<cr>
|
||||
nnoremap <space>ut :UndotreeToggle<cr>
|
||||
|
||||
" TagBar
|
||||
nnoremap <leader>tb :TagbarOpen fj<CR>
|
||||
nnoremap <leader>] :tag /[.#@]<c-r>=expand('<cword>')<cr><cr>
|
||||
nnoremap <space>tb :TagbarOpen fj<CR>
|
||||
nnoremap <space>] :tag /[.#@]<c-r>=expand('<cword>')<cr><cr>
|
||||
let g:tagbar_autoclose = 1
|
||||
" let g:tagbar_autopreview = 1
|
||||
" let g:tagbar_previewwin_pos = ''
|
||||
|
|
Loading…
Reference in New Issue