From 936a6d24c9f70982952789f5d1ef145d9aa519ae Mon Sep 17 00:00:00 2001 From: Henrik Bakken Date: Wed, 14 Oct 2020 17:16:35 +0200 Subject: [PATCH] updates --- nvim/init.vim | 53 +++++++++++++++++++++++-------------------------- root/.tmux.conf | 12 +++++------ 2 files changed, 31 insertions(+), 34 deletions(-) diff --git a/nvim/init.vim b/nvim/init.vim index e970313..d6bf154 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -22,7 +22,7 @@ Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'junegunn/fzf', {'dir': '~/.fzf', 'do': './install --all'} Plug 'junegunn/fzf.vim' Plug 'antoinemadec/coc-fzf', {'branch': 'release'} -Plug 'liuchengxu/vista.vim' " tags explorer +"Plug 'liuchengxu/vista.vim' " tags explorer Plug 'sheerun/vim-polyglot' " language syntax " git Plug 'tpope/vim-fugitive' @@ -136,6 +136,7 @@ set shiftwidth=4 set expandtab " other +set autochdir set lazyredraw set updatetime=300 set timeoutlen=500 @@ -158,7 +159,7 @@ nnoremap Q vnoremap v nmap :noh nmap R :so ~/.config/nvim/init.vim -nmap E :tabe ~/.config/nvim/init.vim +nmap E :tabe ~/OneDrive/dotfiles/nvim/init.vim " nerdcommenter: 'c ', 'cl' aligned and 'cu>' remove " vim-surround: visual 'SA' to wrap in A. Surround 'csAB' to change from A to B, 'dsA' to remove A. Word 'ysiwA' to wrap with A @@ -213,14 +214,9 @@ let g:asterisk#keeppos=1 " ***************************** " CURSOR -" indenting -"nnoremap >>_ -"nnoremap <<_ -"vnoremap >gv -"vnoremap >gv +vnoremap inoremap @@ -259,7 +255,8 @@ nnoremap > nmap :cn nmap :cp " close buffer -nmap :bd +nmap :b#bd# +nmap :b#bd!# " ***************************** " MARKDOWN @@ -269,7 +266,6 @@ let g:vim_markdown_conceal=0 let g:vim_markdown_conceal_code_blocks=0 let g:vim_markdown_math=1 let g:vim_markdown_folding_disabled=0 -let g:vim_markdown_math=0 " markdown preview let g:mkdp_auto_start=0 " auto start on moving into let g:mkdp_auto_close=0 " auto close on moving away @@ -288,32 +284,33 @@ let g:mkdp_preview_options={ " GIT " vim-fugitive " g? for fugitive help. :Gdiff, :Gblame, :Gstats '=' expand, '-' add/reset changes, :Gcommit % to commit current file with messag -nmap gg :vertical Gstatus:vertical resize 60 +nmap :vertical Git:vertical resize 60 " fzf -map gc :Commits -map gf :BCommits +nmap :GFiles? +nmap :Commits +nmap :BCommits " coc git -nmap gn (coc-git-nextchunk) -nmap gp (coc-git-prevchunk) -nmap g (coc-git-chunkinfo) -nmap gs :CocCommand git.chunkStage -vmap gs :CocCommand git.chunkStage -nmap gX :CocCommand git.chunkUndo -vmap gX :CocCommand git.chunkUndo +nmap i (coc-git-chunkinfo) +nmap n (coc-git-prevchunk) +nmap m (coc-git-nextchunk) +nmap s :CocCommand git.chunkStage +vmap s :CocCommand git.chunkStage +nmap x :CocCommand git.chunkUndo +vmap x :CocCommand git.chunkUndo " ***************************** " EXPLORERS " vista and coc-explorer -map :Vista!! map :CocCommand explorer -let g:vista_default_executive = 'ctags' -let g:vista_fzf_preview = ['right:50%'] +"map :Vista!! +"let g:vista_default_executive = 'ctags' +"let g:vista_fzf_preview = ['right:50%'] " ***************************** " POPUPS +command! -bang -nargs=* Ag call fzf#vim#ag(, {'options': '--delimiter : --nth 4..'}, 0) nmap :Ag -nmap :CocFzfList -nmap :CocFzfList symbols +nmap :CocFzfList nmap :CocFzfList symbols --kind Variable nmap :CocFzfList symbols --kind Function nmap :History @@ -321,7 +318,7 @@ nmap :History/ nmap :GFiles nmap :Files nmap :Buffers -map :Colors +map :Colors map :Filetypes let g:fzf_preview_command='bat --color=always --plain {-1}' " Installed bat let g:fzf_preview_grep_cmd='rg --smart-case --line-number --no-heading --color=never' diff --git a/root/.tmux.conf b/root/.tmux.conf index c5796d4..6c0d150 100644 --- a/root/.tmux.conf +++ b/root/.tmux.conf @@ -57,8 +57,7 @@ unbind -a bind ? list-keys bind d detach-client bind D choose-client -bind : command-prompt -bind Enter command-prompt +bind ø command-prompt #bind \ show-messages # Copy mode @@ -71,9 +70,6 @@ bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -i -f -selection bind -T copy-mode-vi r send-keys -X rectangle-toggle bind -T copy-mode-vi Escape send-keys -X cancel -# Refresh client -bind R refresh-client \; display-message "Refresh already" - # Rename window bind , command-prompt "rename-window %%" @@ -84,7 +80,7 @@ bind t clock-mode bind i display-panes # Config Reloads -bind r source-file ~/.tmux.conf \; display-message "Config reloaded" +bind r source-file ~/.tmux.conf \; refresh-client \; display-message "Config reloaded" # resize controls bind -r h resize-pane -L 2 \; display-message "Resize left" @@ -98,10 +94,14 @@ bind -n M-o resize-pane -Z # split panes using | and -, make sure they open in the same path bind | split-window -h -c "#{pane_current_path}" bind - split-window -v -c "#{pane_current_path}" +bind § split-window -fh -c "#{pane_current_path}" +bind _ split-window -fv -c "#{pane_current_path}" # Change layouts bind o rotate-window bind Space next-layout +bind M-- select-layout even-horizontal +bind M-| select-layout even-vertical bind K swap-pane -d -t "{up-of}" bind J swap-pane -d -t "{down-of}" bind H swap-pane -d -t "{left-of}"