From ef5e361568c6c1daaedf250a8f4b9e1c87fa5cf5 Mon Sep 17 00:00:00 2001 From: Nachuan Tang Date: Fri, 14 Oct 2022 00:46:01 -0400 Subject: [PATCH] add new plugins and remove some useless stuff --- .vimrc | 8 +------- .vimrc.bundles | 32 ++++++++++++++++++++++++++++++-- 2 files changed, 31 insertions(+), 9 deletions(-) diff --git a/.vimrc b/.vimrc index 60b0dc4..76d035e 100644 --- a/.vimrc +++ b/.vimrc @@ -199,7 +199,7 @@ " Map ff to display all lines with keyword under cursor " and ask which one to jump to - nmap ff [I:let nr = input("Which one: ")exe "normal " . nr ."[\t" + nmap j [I:let nr = input("Which one: ")exe "normal " . nr ."[\t" " Easier horizontal scrolling map zl zL @@ -216,12 +216,6 @@ nmap ac ToggleAutoCloseMappings " } - " JSON { - nmap jt :%!python -m json.tool:set filetype=json - let g:vim_json_syntax_conceal = 0 - " } - - " } " Functions { diff --git a/.vimrc.bundles b/.vimrc.bundles index 77359c8..ea26f3c 100644 --- a/.vimrc.bundles +++ b/.vimrc.bundles @@ -9,6 +9,7 @@ " Plugin_Preferences " Theme_Appearance " Key_Mappings +" Useful_Info " Environment { set nocompatible " Must be first line @@ -29,7 +30,6 @@ endif Plug 'rust-lang/rust.vim' - Plug 'leafgarland/typescript-vim' " { Plug 'alvan/vim-closetag' @@ -76,6 +76,9 @@ Plug 'mbbill/undotree' Plug 'tpope/vim-commentary' + " put text in neibouring tmux pane into auto complete + Plug 'wellle/tmux-complete.vim' + " only work with nvim > 0.5 " For other versions, just loading the plugin may " cause error @@ -129,6 +132,25 @@ if g:vim_type == 'nvim' endif " } + " easymotion/vim-easymotion { + + " f{char} to move to {char} + map f (easymotion-bd-f) + nmap f (easymotion-overwin-f) + + " s{char}{char} to move to {char}{char} + nmap s (easymotion-overwin-f2) + + " Move to line + map L (easymotion-bd-jk) + nmap L (easymotion-overwin-line) + + " Move to word + map w (easymotion-bd-w) + nmap w (easymotion-overwin-w) + + " } + " antoinemadec/coc-fzf { if isdirectory(expand(plugin_dir . "/coc-fzf")) nnoremap :CocFzfList @@ -155,7 +177,8 @@ endif " airblade/vim-rooter { if isdirectory(expand(plugin_dir . "/vim-rooter")) - let g:rooter_patterns = ['.vscode', '.git'] + let g:rooter_patterns = ['.vscode', '.git', '*.sln'] + let g:rooter_change_directory_for_non_project_files = 'current' endif " } @@ -561,3 +584,8 @@ endif nnoremap % :vsplit nnoremap " :split " } +" +" Useful_Info{ +" show mapping info +" :verbose map ,cf +" }