From 9470d585cf398c9d417a7a468d29b93a7f7e2b54 Mon Sep 17 00:00:00 2001 From: Christian Nieves Date: Wed, 14 Sep 2022 21:49:53 +0000 Subject: [PATCH] Add vim-imp. Fix tmux breaking when reloading vimrc. Fix java highlight --- vim/.vim/prefs/google.vim | 7 ++---- vim/.vim/prefs/imp.vim | 12 ++++++++++ vim/.vim/prefs/leader.vim | 48 +------------------------------------ vim/.vim/prefs/mappings.vim | 14 ----------- vim/.vim/prefs/plugins.vim | 12 ++++------ vim/.vimrc | 19 +++++++-------- 6 files changed, 28 insertions(+), 84 deletions(-) create mode 100644 vim/.vim/prefs/imp.vim diff --git a/vim/.vim/prefs/google.vim b/vim/.vim/prefs/google.vim index 50bb1f0..256ac62 100644 --- a/vim/.vim/prefs/google.vim +++ b/vim/.vim/prefs/google.vim @@ -1,7 +1,5 @@ source /usr/share/vim/google/glug/bootstrap.vim source /usr/share/vim/google/core.vim -source /google/data/ro/projects/vigor/vigor.vim -" source /usr/share/vim/google/google.vim Plug 'vim-scripts/vcscommand.vim' Plug 'sso://user/chmnchiang/google-comments' @@ -40,8 +38,7 @@ let g:blazevim_quickfix_autoopen = 1 Glug buganizer plugin[mappings] Glug relatedfiles plugin[mappings] Glug g4 -Glug corpweb -Glug google-csimporter +"Glug google-csimporter " Update the current file's build deps Plug 'junegunn/fzf', { 'do': { -> fzf#install() }, 'commit': '3f75a83' } @@ -172,7 +169,7 @@ com! -nargs=? -complete=file Blame :call G4Blame() " removes the visual range because csearch doesn't support ranges. " Removes newlines to allow the entire line search using V-LINE mode. " vnoremap cs "ny:FzfCs "=substitute(@n, '\n', '', '')" -nnoremap csi :CsImporter +" " nnoremap CS :FzfCs nnoremap cc :CritiqueUnresolvedComments diff --git a/vim/.vim/prefs/imp.vim b/vim/.vim/prefs/imp.vim new file mode 100644 index 0000000..3dd4aab --- /dev/null +++ b/vim/.vim/prefs/imp.vim @@ -0,0 +1,12 @@ +source ~/.vim/prefs/google_comments.vim + +set runtimepath+=/google/src/files/head/depot/google3/experimental/users/tstone/vim/vim-imp +set runtimepath+=/google/src/files/head/depot/google3/experimental/users/tstone/vim/imp-csearch + +Glug! glaive +Glaive imp plugin[mappings] Suggest[default]=buffer,primp,csearch,prompt Report[default]=popupnotify +" +" nnoremap csi :CsImporter +nnoremap csi :ImpSuggest +" nnoremap ii :ImpSuggest +" nnoremap if :ImpFirst diff --git a/vim/.vim/prefs/leader.vim b/vim/.vim/prefs/leader.vim index 721ea99..2740981 100644 --- a/vim/.vim/prefs/leader.vim +++ b/vim/.vim/prefs/leader.vim @@ -1,53 +1,6 @@ -" --------- MAPPINGS FOR QUICK CONFIG EDITS --------- -" mnemonic: (e)dit (v)imrc -nmap ev :tabedit $MYVIMRC - -" mnemonic: (e)dit (t)mux.conf -nmap et :tabedit ~/.tmux.conf - -" mnemonic: (e)dit (g)oogle.vim -nmap eg :tabedit ~/.vim/prefs/google.vim - -" mnemonic: (e)dit (b)ash_profile -nmap eb :tabedit ~/.bash_profile - -" mnemonic: (e)dit (f)tplugin -nmap ef :tabedit ~/.vim/after/ftplugin - -" mnemonic: (e)dit (p)lugins -nmap ep :tabedit ~/.vim/prefs/plugins.vim - -" mnemonic: (e)dit (c)onfigs * opens NERDTree on the prefs dir -nmap ec :tabedit ~/.vim/prefs/ - -" mnemonic: (e)dit (p)refs, (i)nit.vim -nmap epi :tabedit ~/.vim/prefs/init.vim - -" mnemonic: (e)dit (p)refs, (l)eader.vim -nmap epl :tabedit ~/.vim/prefs/leader.vim - -" mnemonic: (e)dit (p)refs, (c)oc.vim -nmap epc :tabedit ~/.vim/prefs/coc.vim - -" mnemonic: (e)dit (p)refs, (m)appings.vim -nmap epm :tabedit ~/.vim/prefs/mappings.vim - -" mnemonic: (e)dit (p)refs, (p)lug_prefs.vim -nmap epp :tabedit ~/.vim/prefs/plug_prefs.vim - -" mnemonic: (e)dit (p)refs, (u)i.vim -nmap epu :tabedit ~/.vim/prefs/ui.vim -" -" mnemonic: (e)dit (p)refs, (g)olang.vim -nmap epg :tabedit ~/.vim/prefs/google.vim - -" mnemonic: (e)dit (z)shrc -nmap ez :tabedit ~/.zshrc -" " mnemonic: (i)nsert (l)ambda imap il l* - " HEX<->ASCII " mnemonic: (h)ex (t)o (a)scii vnoremap hta :s/\%V\x\x/\=nr2char(printf("%d", "0x".submatch(0)))/g`< @@ -180,3 +133,4 @@ vnoremap c$ :call nerdcommenter#Comment(0,"ToEOL") nmap yf :let @" = expand("%") nmap ut :UndotreeToggle +nmap e :e %% diff --git a/vim/.vim/prefs/mappings.vim b/vim/.vim/prefs/mappings.vim index 4f64a88..d8cdbb9 100644 --- a/vim/.vim/prefs/mappings.vim +++ b/vim/.vim/prefs/mappings.vim @@ -9,16 +9,6 @@ map [B map [C map [D -nnoremap -nnoremap -nnoremap -nnoremap - -tnoremap h -tnoremap j -tnoremap k -tnoremap l - " remove mapping to be used in nerdtree inoremap @@ -37,10 +27,6 @@ vnoremap ; : nnoremap J :tabprevious nnoremap K :tabnext -" tab arrangement, Shift-H and Shift-L to move tabs -" nnoremap :execute 'silent! tabmove ' . (tabpagenr()-2) -" nnoremap > :execute 'silent! tabmove ' . (tabpagenr()+1) -" " tab opening nnoremap tt :tabedit nnoremap td :tabclose diff --git a/vim/.vim/prefs/plugins.vim b/vim/.vim/prefs/plugins.vim index f8a23d2..98b636c 100644 --- a/vim/.vim/prefs/plugins.vim +++ b/vim/.vim/prefs/plugins.vim @@ -1,5 +1,7 @@ packadd termdebug -" packadd lspconfig +" MINE +Plug 'squk/vim-quantum' +Plug 'squk/java-syntax.vim' " LSP Plug 'hrsh7th/cmp-buffer' @@ -24,6 +26,7 @@ Plug 'sso://user/vintharas/telescope-codesearch.nvim' Plug 'ntpeters/vim-better-whitespace' "auto-set tab/space size Plug 'junegunn/fzf.vim' Plug 'vim-airline/vim-airline' " ... +Plug 'vim-airline/vim-airline-themes' Plug 'nathanaelkane/vim-indent-guides' Plug 'Konfekt/vim-scratchpad' Plug 'guns/xterm-color-table.vim' @@ -69,7 +72,6 @@ Plug 'tiagofumo/vim-nerdtree-syntax-highlight' " LANGUAGE PLUGINS Plug 'udalov/kotlin-vim' Plug 'hsanson/vim-android' -Plug 'squk/java-syntax.vim' Plug 'OmniSharp/omnisharp-vim' Plug 'whatyouhide/vim-tmux-syntax' Plug 'chase/vim-ansible-yaml' @@ -115,7 +117,6 @@ Plug 'gosukiwi/vim-atom-dark' Plug 'jacoborus/tender.vim' Plug 'kristijanhusak/vim-hybrid-material' Plug 'NLKNguyen/papercolor-theme' -Plug 'squk/vim-quantum' Plug 'arcticicestudio/nord-vim' Plug 'chase/focuspoint-vim' Plug 'patstockwell/vim-monokai-tasty' " airline @@ -125,8 +126,3 @@ Plug 'kristiandupont/shades-of-teal' Plug 'joshdick/onedark.vim' Plug 'google/vim-colorscheme-primary' Plug 'kyoz/purify', { 'rtp': 'vim' } - -" Plug 'google/vim-maktaba' -" Plug 'google/vim-glaive' -" -" call glaive#Install() diff --git a/vim/.vimrc b/vim/.vimrc index 4e2d4c9..34b86e7 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -18,7 +18,6 @@ let &t_AB="\e[48;5;%dm" let &t_AF="\e[38;5;%dm" syntax on - set laststatus=2 set cmdheight=1 set ttyfast @@ -87,13 +86,13 @@ call plug#begin('~/.vim/plugged') source ~/.vim/prefs/google.vim endif - source ~/.vim/prefs/mappings.vim - source ~/.vim/prefs/leader.vim - source ~/.vim/prefs/plug_prefs.vim - source ~/.vim/prefs/ui.vim - source ~/.vim/prefs/golang.vim - source ~/.vim/prefs/ultisnips.vim - source ~/.vim/prefs/ripgrep.vim + source ~/.vim/prefs/mappings.vim + source ~/.vim/prefs/leader.vim + source ~/.vim/prefs/plug_prefs.vim + source ~/.vim/prefs/ui.vim + source ~/.vim/prefs/golang.vim + source ~/.vim/prefs/ultisnips.vim + source ~/.vim/prefs/ripgrep.vim call plug#end() " required " Require CiderLSP and Diagnostics modules @@ -109,9 +108,9 @@ lua << EOF require("telescope_config") EOF -source ~/.vim/prefs/cmp.vim if filereadable(expand("~/use_google")) - source ~/.vim/prefs/google_comments.vim + source ~/.vim/prefs/cmp.vim + source ~/.vim/prefs/imp.vim endif filetype plugin on " redundant?