diff --git a/install_script.sh b/install_script.sh index 796edf0..f85b7b7 100644 --- a/install_script.sh +++ b/install_script.sh @@ -1,5 +1,5 @@ # Generic -sudo apt install zsh neovim silversearcher-ag fzf nnn vifm thefuck +sudo apt install zsh neovim silversearcher-ag fzf nnn vifm thefuck ripgrep # SSH Key ssh-keygen -t ed25519 -C "flamelegrems@gmail.com" diff --git a/tmux.conf b/tmux.conf index d470acb..f24a06f 100644 --- a/tmux.conf +++ b/tmux.conf @@ -7,6 +7,7 @@ bind-key C-a send-prefix bind | split-window -h -c "#{pane_current_path}" bind - split-window -v -c "#{pane_current_path}" bind s split-window -h -p 25 -c "#{pane_current_path}" +bind g split-window -h -p 25 -c "#{pane_current_path}" -b bind v split-window -v -p 30 -c "#{pane_current_path}" # switch panes @@ -40,11 +41,11 @@ set -g history-file ~/.tmux_history # List of plugins set -g @plugin 'tmux-plugins/tpm' -set -g @plugin 'tmux-plugins/tmux-resurrect' +#set -g @plugin 'tmux-plugins/tmux-resurrect' set -g @plugin 'tmux-plugins/tmux-yank' run -b '~/.tmux/plugins/tpm/tpm' -run-shell ~/tmux-resurrect/resurrect.tmux +#run-shell ~/tmux-resurrect/resurrect.tmux set -s escape-time 0 set-option -g default-terminal "screen-256color" diff --git a/vimrc b/vimrc index f8dcff3..efe1c47 100644 --- a/vimrc +++ b/vimrc @@ -203,6 +203,8 @@ Plug 'https://github.com/tpope/vim-fugitive' let g:statline_fugitive = 1 let g:fugitive_gitlab_domains = ['https://git.arcanite.ch', 'https://git.polylan.ch'] Plug 'https://github.com/junegunn/gv.vim' + +Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'https://github.com/vim-syntastic/syntastic.git' let g:syntastic_auto_loc_list=0 let g:syntastic_enable_loc_list=0 @@ -226,6 +228,14 @@ let g:gitgutter_eager = 0 " only update on read/write let g:gitgutter_sign_column_always = 0 Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } Plug 'https://github.com/junegunn/fzf.vim' +let g:fzf_commits_log_options = '--format="%C(yellow)%h%d %s %C(cyan)(%aN) %C(black)%C(bold)%cr"' + +let g:fzf_preview_command = 'bat --color=always --plain {-1}' +let g:fzf_preview_git_status_preview_command = + \ "[[ $(git diff --cached -- {-1}) != \"\" ]] && git diff --cached --color=always -- {-1} | delta || " . + \ "[[ $(git diff -- {-1}) != \"\" ]] && git diff --color=always -- {-1} | delta || " . + \ g:fzf_preview_command + Plug 'https://github.com/shumphrey/fugitive-gitlab.vim' Plug 'https://tpope.io/vim/surround.git' Plug 'https://github.com/saltstack/salt-vim' @@ -434,19 +444,38 @@ set splitright set relativenumber " Custom shortcuts +"-------------------------------------------------------------------------------------------| +" Modes | Normal | Insert | Command | Visual | Select | Operator | Terminal | Lang-Arg | +" [nore]map | @ | - | - | @ | @ | @ | - | - | +" n[nore]map | @ | - | - | - | - | - | - | - | +" n[orem]ap! | - | @ | @ | - | - | - | - | - | +" i[nore]map | - | @ | - | - | - | - | - | - | +" c[nore]map | - | - | @ | - | - | - | - | - | +" v[nore]map | - | - | - | @ | @ | - | - | - | +" x[nore]map | - | - | - | @ | - | - | - | - | +" s[nore]map | - | - | - | - | @ | - | - | - | +" o[nore]map | - | - | - | - | - | @ | - | - | +" t[nore]map | - | - | - | - | - | - | @ | - | +" l[nore]map | - | @ | @ | - | - | - | - | @ | +"-------------------------------------------------------------------------------------------" " Search in files nnoremap :Ag +"nnoremap :CocCommand fzf-preview.ProjectGrep " Git status " Old layout in the bottom "nnoremap :15Gstatus " New layout vertical nnoremap :vertical topleft Gstatus vertical resize 50 " Search file name -nnoremap :Files +"nnoremap :Files +" Ignore ignored files => all files +nnoremap :CocCommand fzf-preview.DirectoryFiles --no-ignore-vcs " Search git file name -nnoremap :GFiles +"nnoremap :GFiles +nnoremap :CocCommand fzf-preview.DirectoryFiles " Search buffers -nnoremap :Buffers +"nnoremap :Buffers +nnoremap :CocCommand fzf-preview.Buffers " Open Flake8 error nnoremap :Errors " Force write as unix type (/n instead of /r/n) @@ -454,15 +483,18 @@ nnoremap :w! ++ff=unix " Force quit nnoremap :q! " Split diff -nnoremap :Gdiffsplit +" nnoremap :Gdiffsplit +nnoremap :tab Git diff % +nnoremap :tab Git diff +" Using git-delta " Buffer "" F1-12 Shortcuts nnoremap :tabprevious nnoremap :tabnext nnoremap :GV -nnoremap :Git add % -nnoremap :Gcommit +nnoremap :tab Git show - +nnoremap :Git rebase -i HEAD~ nnoremap :SyntasticCheck nnoremap :SyntasticReset @@ -480,10 +512,20 @@ nnoremap O " nnoremap %!xxd nnoremap / Telescope search_history -nnoremap ch Telescope command_history -nnoremap gc Telescope git_commits -nnoremap gb Telescope git_branches -nnoremap gss Telescope git_status -nnoremap gsc Telescope git_stash +"nnoremap ch Telescope command_history +nnoremap ch CocCommand fzf-preview.CommandPalette +"nnoremap gc Telescope git_commits +nnoremap gc CocCommand fzf-preview.GitLogs +"nnoremap gb Telescope git_branches +nnoremap gb CocCommand fzf-preview.GitBranches +"nnoremap gss Telescope git_status +nnoremap gss CocCommand fzf-preview.GitStatus +"nnoremap gsc Telescope git_stash +nnoremap gsc CocCommand fzf-preview.GitStashes nnoremap iss ! glab issue list + +" Copy into temp file +vmap y :w! /tmp/vimtmp +" Read from temp file +nmap p :r! cat /tmp/vimtmp