[nvim] replace : with <Cmd> most mappings to commands

This commit is contained in:
Dmytro Meleshko 2019-05-01 17:40:25 +03:00
parent d09430d0c2
commit 531e1071bd
7 changed files with 29 additions and 38 deletions

View file

@ -41,16 +41,16 @@
vmap <silent> <A-CR> <Plug>(coc-codeaction-selected) vmap <silent> <A-CR> <Plug>(coc-codeaction-selected)
" nmap <silent> <leader>qf <Plug>(coc-fix-current) " nmap <silent> <leader>qf <Plug>(coc-fix-current)
nnoremap <silent> <space>l :CocList<CR> nnoremap <silent> <space>l <Cmd>CocList<CR>
nnoremap <silent> <space>d :CocList --auto-preview diagnostics<CR> nnoremap <silent> <space>d <Cmd>CocList --auto-preview diagnostics<CR>
nnoremap <silent> <space>c :CocList commands<CR> nnoremap <silent> <space>c <Cmd>CocList commands<CR>
nnoremap <silent> <space>o :CocList --auto-preview outline<CR> nnoremap <silent> <space>o <Cmd>CocList --auto-preview outline<CR>
nnoremap <silent> <space>s :CocList --interactive symbols<CR> nnoremap <silent> <space>s <Cmd>CocList --interactive symbols<CR>
nnoremap <silent> <space>h :CocPrev<CR> nnoremap <silent> <space>h <Cmd>CocPrev<CR>
nnoremap <silent> <space>k :CocPrev<CR> nnoremap <silent> <space>k <Cmd>CocPrev<CR>
nnoremap <silent> <space>l :CocNext<CR> nnoremap <silent> <space>l <Cmd>CocNext<CR>
nnoremap <silent> <space>j :CocNext<CR> nnoremap <silent> <space>j <Cmd>CocNext<CR>
nnoremap <silent> <space>p :CocListResume<CR> nnoremap <silent> <space>p <Cmd>CocListResume<CR>
" }}} " }}}
" CocFormat {{{ " CocFormat {{{

View file

@ -94,7 +94,7 @@ set foldmethod=marker
" anywhere in pattern to override these two settings) " anywhere in pattern to override these two settings)
set ignorecase smartcase set ignorecase smartcase
nnoremap \ :nohlsearch<CR> nnoremap \ <Cmd>nohlsearch<CR>
let g:indexed_search_center = 1 let g:indexed_search_center = 1

View file

@ -24,7 +24,7 @@ set wildignore+=.git,.svn,.hg,.DS_Store,*~
" helper functions (which I use in my dotfiles) " helper functions (which I use in my dotfiles)
let g:loaded_netrwPlugin = 1 let g:loaded_netrwPlugin = 1
" re-add Netrw's gx mappings since we've disabled them " re-add Netrw's gx mappings since we've disabled them
nnoremap <silent> gx :call netrw#BrowseX(expand('<cfile>'),netrw#CheckIfRemote())<CR> nnoremap <silent> gx <Cmd>call netrw#BrowseX(expand('<cfile>'),netrw#CheckIfRemote())<CR>
xnoremap <silent> gx :<C-u>call netrw#BrowseXVis()<CR> xnoremap <silent> gx :<C-u>call netrw#BrowseXVis()<CR>
" }}} " }}}
@ -32,7 +32,7 @@ set wildignore+=.git,.svn,.hg,.DS_Store,*~
" Ranger {{{ " Ranger {{{
let g:ranger_replace_netrw = 1 let g:ranger_replace_netrw = 1
let g:ranger_map_keys = 0 let g:ranger_map_keys = 0
nnoremap <silent> <Leader>o :Ranger<CR> nnoremap <silent> <Leader>o <Cmd>Ranger<CR>
" ranger.vim relies on the Bclose.vim plugin, but I use Bbye.vim, so this " ranger.vim relies on the Bclose.vim plugin, but I use Bbye.vim, so this
" command is here just for compatitabilty " command is here just for compatitabilty
command! -bang -complete=buffer -nargs=? Bclose Bdelete<bang> <args> command! -bang -complete=buffer -nargs=? Bclose Bdelete<bang> <args>

View file

@ -1,7 +1,7 @@
" mappings {{{ " mappings {{{
let g:gitgutter_map_keys = 0 let g:gitgutter_map_keys = 0
nnoremap <leader>gg :G nnoremap <leader>gg :G
nnoremap <leader>g :Git<space> nnoremap <leader>g :Git<space>
nnoremap <leader>gs :Gstatus<CR> nnoremap <leader>gs :Gstatus<CR>
nnoremap <leader>gd :Gdiff nnoremap <leader>gd :Gdiff
nnoremap <leader>gb :Gblame<CR> nnoremap <leader>gb :Gblame<CR>

View file

@ -35,9 +35,9 @@ endif
set diffopt+=vertical set diffopt+=vertical
" buffer navigation {{{ " buffer navigation {{{
noremap <silent> <Tab> :bnext<CR> noremap <silent> <Tab> <Cmd>bnext<CR>
noremap <silent> <S-Tab> :bprev<CR> noremap <silent> <S-Tab> <Cmd>bprev<CR>
noremap <silent> gb :buffer #<CR> noremap <silent> gb <Cmd>buffer#<CR>
" }}} " }}}
" ask for confirmation when closing unsaved buffers " ask for confirmation when closing unsaved buffers
@ -61,8 +61,8 @@ endif
" }}} " }}}
" closing buffers {{{ " closing buffers {{{
nnoremap <silent> <BS> :<C-u>call <SID>CloseBuffer('Bdelete')<CR> nnoremap <silent> <BS> <Cmd>call <SID>CloseBuffer('Bdelete')<CR>
nnoremap <silent> <Del> :<C-u>quit <bar> call <SID>CloseBuffer('Bdelete')<CR> nnoremap <silent> <Del> <Cmd>quit <bar> call <SID>CloseBuffer('Bdelete')<CR>
" }}} " }}}
" }}} " }}}
@ -83,13 +83,8 @@ endif
" don't automatically make all windows the same size " don't automatically make all windows the same size
set noequalalways set noequalalways
" splitting {{{
noremap <silent> <leader>h :split<CR>
noremap <silent> <leader>v :vsplit<CR>
" }}}
" closing windows {{{ " closing windows {{{
nnoremap <silent> <A-BS> :quit<CR> nnoremap <silent> <A-BS> <Cmd>quit<CR>
" }}} " }}}
" }}} " }}}
@ -151,9 +146,10 @@ endif
" FZF {{{ " FZF {{{
nnoremap <silent> <F1> :Helptags<CR> noremap <silent> <F1> <Cmd>Helptags<CR>
nnoremap <silent> <leader>f :Files<CR> inoremap <silent> <F1> <Cmd>Helptags<CR>
nnoremap <silent> <leader>b :Buffers<CR> nnoremap <silent> <leader>f <Cmd>Files<CR>
nnoremap <silent> <leader>b <Cmd>Buffers<CR>
" }}} " }}}

View file

@ -1,5 +1,3 @@
nnoremap <silent> <leader>t :terminal<CR>
augroup vimrc-terminal augroup vimrc-terminal
autocmd! autocmd!
autocmd TermOpen * setl nocursorline | IndentLinesDisable autocmd TermOpen * setl nocursorline | IndentLinesDisable

View file

@ -1,7 +1,7 @@
#!/usr/bin/env zsh #!/usr/bin/env zsh
# make these variables unique (-U) arrays (-a) # make these variables unique (-U) arrays (-a)
typeset -aU fpath manpath path typeset -aU fpath manpath path ldflags cppflags
if is_macos; then if is_macos; then
path=( path=(
@ -14,20 +14,17 @@ if is_macos; then
/usr/local/opt/gnu-getopt/bin # getopt /usr/local/opt/gnu-getopt/bin # getopt
/usr/local/opt/findutils/libexec/gnubin # GNU findutils /usr/local/opt/findutils/libexec/gnubin # GNU findutils
/usr/local/opt/coreutils/libexec/gnubin # GNU coreutils /usr/local/opt/coreutils/libexec/gnubin # GNU coreutils
/usr/local/opt/curl/bin # curl
"${path[@]}" "${path[@]}"
) )
manpath=( manpath=(
/usr/local/opt/ruby/share/man
/usr/local/opt/file-formula/share/man # file
/usr/local/opt/gnu-tar/libexec/gnuman # GNU tar
/usr/local/opt/unzip/share/man # GNU unzip
/usr/local/opt/openssl/share/man # openssl
/usr/local/opt/gnu-getopt/share/man # getopt
/usr/local/opt/findutils/libexec/gnuman # GNU findutils /usr/local/opt/findutils/libexec/gnuman # GNU findutils
/usr/local/opt/coreutils/libexec/gnuman # GNU coreutils
"${manpath[@]}" "${manpath[@]}"
) )
export LDFLAGS="-L/usr/local/opt/ruby/lib"
export CPPFLAGS="-I/usr/local/opt/ruby/include"
fi fi
# add Go binaries # add Go binaries