mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
[nvim] replace : with <Cmd> most mappings to commands
This commit is contained in:
parent
d09430d0c2
commit
531e1071bd
7 changed files with 29 additions and 38 deletions
|
@ -41,16 +41,16 @@
|
|||
vmap <silent> <A-CR> <Plug>(coc-codeaction-selected)
|
||||
" nmap <silent> <leader>qf <Plug>(coc-fix-current)
|
||||
|
||||
nnoremap <silent> <space>l :CocList<CR>
|
||||
nnoremap <silent> <space>d :CocList --auto-preview diagnostics<CR>
|
||||
nnoremap <silent> <space>c :CocList commands<CR>
|
||||
nnoremap <silent> <space>o :CocList --auto-preview outline<CR>
|
||||
nnoremap <silent> <space>s :CocList --interactive symbols<CR>
|
||||
nnoremap <silent> <space>h :CocPrev<CR>
|
||||
nnoremap <silent> <space>k :CocPrev<CR>
|
||||
nnoremap <silent> <space>l :CocNext<CR>
|
||||
nnoremap <silent> <space>j :CocNext<CR>
|
||||
nnoremap <silent> <space>p :CocListResume<CR>
|
||||
nnoremap <silent> <space>l <Cmd>CocList<CR>
|
||||
nnoremap <silent> <space>d <Cmd>CocList --auto-preview diagnostics<CR>
|
||||
nnoremap <silent> <space>c <Cmd>CocList commands<CR>
|
||||
nnoremap <silent> <space>o <Cmd>CocList --auto-preview outline<CR>
|
||||
nnoremap <silent> <space>s <Cmd>CocList --interactive symbols<CR>
|
||||
nnoremap <silent> <space>h <Cmd>CocPrev<CR>
|
||||
nnoremap <silent> <space>k <Cmd>CocPrev<CR>
|
||||
nnoremap <silent> <space>l <Cmd>CocNext<CR>
|
||||
nnoremap <silent> <space>j <Cmd>CocNext<CR>
|
||||
nnoremap <silent> <space>p <Cmd>CocListResume<CR>
|
||||
" }}}
|
||||
|
||||
" CocFormat {{{
|
||||
|
|
|
@ -94,7 +94,7 @@ set foldmethod=marker
|
|||
" anywhere in pattern to override these two settings)
|
||||
set ignorecase smartcase
|
||||
|
||||
nnoremap \ :nohlsearch<CR>
|
||||
nnoremap \ <Cmd>nohlsearch<CR>
|
||||
|
||||
let g:indexed_search_center = 1
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ set wildignore+=.git,.svn,.hg,.DS_Store,*~
|
|||
" helper functions (which I use in my dotfiles)
|
||||
let g:loaded_netrwPlugin = 1
|
||||
" 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>
|
||||
" }}}
|
||||
|
||||
|
@ -32,7 +32,7 @@ set wildignore+=.git,.svn,.hg,.DS_Store,*~
|
|||
" Ranger {{{
|
||||
let g:ranger_replace_netrw = 1
|
||||
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
|
||||
" command is here just for compatitabilty
|
||||
command! -bang -complete=buffer -nargs=? Bclose Bdelete<bang> <args>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
" mappings {{{
|
||||
let g:gitgutter_map_keys = 0
|
||||
nnoremap <leader>gg :G
|
||||
nnoremap <leader>g :Git<space>
|
||||
nnoremap <leader>g :Git<space>
|
||||
nnoremap <leader>gs :Gstatus<CR>
|
||||
nnoremap <leader>gd :Gdiff
|
||||
nnoremap <leader>gb :Gblame<CR>
|
||||
|
|
|
@ -35,9 +35,9 @@ endif
|
|||
set diffopt+=vertical
|
||||
|
||||
" buffer navigation {{{
|
||||
noremap <silent> <Tab> :bnext<CR>
|
||||
noremap <silent> <S-Tab> :bprev<CR>
|
||||
noremap <silent> gb :buffer #<CR>
|
||||
noremap <silent> <Tab> <Cmd>bnext<CR>
|
||||
noremap <silent> <S-Tab> <Cmd>bprev<CR>
|
||||
noremap <silent> gb <Cmd>buffer#<CR>
|
||||
" }}}
|
||||
|
||||
" ask for confirmation when closing unsaved buffers
|
||||
|
@ -61,8 +61,8 @@ endif
|
|||
" }}}
|
||||
|
||||
" closing buffers {{{
|
||||
nnoremap <silent> <BS> :<C-u>call <SID>CloseBuffer('Bdelete')<CR>
|
||||
nnoremap <silent> <Del> :<C-u>quit <bar> call <SID>CloseBuffer('Bdelete')<CR>
|
||||
nnoremap <silent> <BS> <Cmd>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
|
||||
set noequalalways
|
||||
|
||||
" splitting {{{
|
||||
noremap <silent> <leader>h :split<CR>
|
||||
noremap <silent> <leader>v :vsplit<CR>
|
||||
" }}}
|
||||
|
||||
" closing windows {{{
|
||||
nnoremap <silent> <A-BS> :quit<CR>
|
||||
nnoremap <silent> <A-BS> <Cmd>quit<CR>
|
||||
" }}}
|
||||
|
||||
" }}}
|
||||
|
@ -151,9 +146,10 @@ endif
|
|||
|
||||
|
||||
" FZF {{{
|
||||
nnoremap <silent> <F1> :Helptags<CR>
|
||||
nnoremap <silent> <leader>f :Files<CR>
|
||||
nnoremap <silent> <leader>b :Buffers<CR>
|
||||
noremap <silent> <F1> <Cmd>Helptags<CR>
|
||||
inoremap <silent> <F1> <Cmd>Helptags<CR>
|
||||
nnoremap <silent> <leader>f <Cmd>Files<CR>
|
||||
nnoremap <silent> <leader>b <Cmd>Buffers<CR>
|
||||
" }}}
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
nnoremap <silent> <leader>t :terminal<CR>
|
||||
|
||||
augroup vimrc-terminal
|
||||
autocmd!
|
||||
autocmd TermOpen * setl nocursorline | IndentLinesDisable
|
||||
|
|
13
zsh/path.zsh
13
zsh/path.zsh
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
# make these variables unique (-U) arrays (-a)
|
||||
typeset -aU fpath manpath path
|
||||
typeset -aU fpath manpath path ldflags cppflags
|
||||
|
||||
if is_macos; then
|
||||
path=(
|
||||
|
@ -14,20 +14,17 @@ if is_macos; then
|
|||
/usr/local/opt/gnu-getopt/bin # getopt
|
||||
/usr/local/opt/findutils/libexec/gnubin # GNU findutils
|
||||
/usr/local/opt/coreutils/libexec/gnubin # GNU coreutils
|
||||
/usr/local/opt/curl/bin # curl
|
||||
"${path[@]}"
|
||||
)
|
||||
|
||||
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/coreutils/libexec/gnuman # GNU coreutils
|
||||
"${manpath[@]}"
|
||||
)
|
||||
|
||||
export LDFLAGS="-L/usr/local/opt/ruby/lib"
|
||||
export CPPFLAGS="-I/usr/local/opt/ruby/include"
|
||||
fi
|
||||
|
||||
# add Go binaries
|
||||
|
|
Loading…
Reference in a new issue