From 531e1071bd86b971db889669ff108194dae67087 Mon Sep 17 00:00:00 2001 From: Dmytro Meleshko Date: Wed, 1 May 2019 17:40:25 +0300 Subject: [PATCH] [nvim] replace : with most mappings to commands --- nvim/lib/completion.vim | 20 ++++++++++---------- nvim/lib/editing.vim | 2 +- nvim/lib/files.vim | 4 ++-- nvim/lib/git.vim | 2 +- nvim/lib/interface.vim | 24 ++++++++++-------------- nvim/lib/terminal.vim | 2 -- zsh/path.zsh | 13 +++++-------- 7 files changed, 29 insertions(+), 38 deletions(-) diff --git a/nvim/lib/completion.vim b/nvim/lib/completion.vim index 9716729..bfaeedf 100644 --- a/nvim/lib/completion.vim +++ b/nvim/lib/completion.vim @@ -41,16 +41,16 @@ vmap (coc-codeaction-selected) " nmap qf (coc-fix-current) - nnoremap l :CocList - nnoremap d :CocList --auto-preview diagnostics - nnoremap c :CocList commands - nnoremap o :CocList --auto-preview outline - nnoremap s :CocList --interactive symbols - nnoremap h :CocPrev - nnoremap k :CocPrev - nnoremap l :CocNext - nnoremap j :CocNext - nnoremap p :CocListResume + nnoremap l CocList + nnoremap d CocList --auto-preview diagnostics + nnoremap c CocList commands + nnoremap o CocList --auto-preview outline + nnoremap s CocList --interactive symbols + nnoremap h CocPrev + nnoremap k CocPrev + nnoremap l CocNext + nnoremap j CocNext + nnoremap p CocListResume " }}} " CocFormat {{{ diff --git a/nvim/lib/editing.vim b/nvim/lib/editing.vim index 488f453..f819f8b 100644 --- a/nvim/lib/editing.vim +++ b/nvim/lib/editing.vim @@ -94,7 +94,7 @@ set foldmethod=marker " anywhere in pattern to override these two settings) set ignorecase smartcase - nnoremap \ :nohlsearch + nnoremap \ nohlsearch let g:indexed_search_center = 1 diff --git a/nvim/lib/files.vim b/nvim/lib/files.vim index d83d496..3be8713 100644 --- a/nvim/lib/files.vim +++ b/nvim/lib/files.vim @@ -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 gx :call netrw#BrowseX(expand(''),netrw#CheckIfRemote()) + nnoremap gx call netrw#BrowseX(expand(''),netrw#CheckIfRemote()) xnoremap gx :call netrw#BrowseXVis() " }}} @@ -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 o :Ranger + nnoremap o Ranger " 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 diff --git a/nvim/lib/git.vim b/nvim/lib/git.vim index df59ecd..8f2626b 100644 --- a/nvim/lib/git.vim +++ b/nvim/lib/git.vim @@ -1,7 +1,7 @@ " mappings {{{ let g:gitgutter_map_keys = 0 nnoremap gg :G - nnoremap g :Git + nnoremap g :Git nnoremap gs :Gstatus nnoremap gd :Gdiff nnoremap gb :Gblame diff --git a/nvim/lib/interface.vim b/nvim/lib/interface.vim index d9cfab5..d7f0c5e 100644 --- a/nvim/lib/interface.vim +++ b/nvim/lib/interface.vim @@ -35,9 +35,9 @@ endif set diffopt+=vertical " buffer navigation {{{ - noremap :bnext - noremap :bprev - noremap gb :buffer # + noremap bnext + noremap bprev + noremap gb buffer# " }}} " ask for confirmation when closing unsaved buffers @@ -61,8 +61,8 @@ endif " }}} " closing buffers {{{ - nnoremap :call CloseBuffer('Bdelete') - nnoremap :quit call CloseBuffer('Bdelete') + nnoremap call CloseBuffer('Bdelete') + nnoremap quit call CloseBuffer('Bdelete') " }}} " }}} @@ -83,13 +83,8 @@ endif " don't automatically make all windows the same size set noequalalways - " splitting {{{ - noremap h :split - noremap v :vsplit - " }}} - " closing windows {{{ - nnoremap :quit + nnoremap quit " }}} " }}} @@ -151,9 +146,10 @@ endif " FZF {{{ - nnoremap :Helptags - nnoremap f :Files - nnoremap b :Buffers + noremap Helptags + inoremap Helptags + nnoremap f Files + nnoremap b Buffers " }}} diff --git a/nvim/lib/terminal.vim b/nvim/lib/terminal.vim index 3faca85..4942478 100644 --- a/nvim/lib/terminal.vim +++ b/nvim/lib/terminal.vim @@ -1,5 +1,3 @@ -nnoremap t :terminal - augroup vimrc-terminal autocmd! autocmd TermOpen * setl nocursorline | IndentLinesDisable diff --git a/zsh/path.zsh b/zsh/path.zsh index ffa8e7e..81fc7ec 100644 --- a/zsh/path.zsh +++ b/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