diff --git a/.gitignore b/.gitignore index ef3c6c4..cfb5e0e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ .vim/ autoload/ node_modules/ +tags diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e69de29..0000000 diff --git a/.vimrc b/.vimrc index 60b0dc4..2027b0c 100644 --- a/.vimrc +++ b/.vimrc @@ -12,6 +12,9 @@ let g:vim_version = str2float(g:vim_version) let g:dotfile_path = '~/.dotfiles/' + set runtimepath^=~/.vim runtimepath+=~/.vim/after + let &packpath=&runtimepath + " The default leader is '\', but many people prefer ',' as it's in a standard let mapleader = ',' let maplocalleader = '_' @@ -199,7 +202,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 +219,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 92d4e11..08e7723 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' @@ -38,7 +38,6 @@ Plug 'scrooloose/nerdtree' - Plug 'godlygeek/tabular' " for markdown{ Plug 'preservim/vim-markdown' "} @@ -76,6 +75,11 @@ Plug 'mbbill/undotree' Plug 'tpope/vim-commentary' + " put text in neibouring tmux pane into auto complete + Plug 'wellle/tmux-complete.vim' + + Plug 'ludovicchabant/vim-gutentags' + " only work with nvim > 0.5 " For other versions, just loading the plugin may " cause error @@ -129,6 +133,30 @@ if g:vim_type == 'nvim' endif " } + " ludovicchabant/vim-gutentags { + set statusline+=%{gutentags#statusline()} + let g:gutentags_cache_dir=g:vim_dir . '/.vimtags/' + "} + + " 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,24 +183,11 @@ 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 " } - " godlygeek/tabular { - if isdirectory(expand(plugin_dir . "/tabular")) - nmap t= :Tabularize /= - vmap t= :Tabularize /= - - nmap t\| :Tab /\| - vmap t\| :Tab /\| - - nmap t: :Tab /:\zs - vmap t: :Tab /:\zs - endif - - " } - " NerdTree { if isdirectory(expand(plugin_dir . "/nerdtree")) let g:NERDShutUp=1 @@ -368,11 +383,12 @@ endif highlight CocInfoSign ctermbg=none highlight CocHintSign ctermbg=none if g:theme_color == 'dark' - highlight! link CocFloating PmenuThumb - highlight! link CocErrorFloat PmenuThumb - highlight! link CocWarningFloat PmenuThumb - highlight! link CocInfoFloat PmenuThumb - highlight! link CocHintFloat PmenuThumb + highlight! link TempColor Visual + highlight! link CocFloating TempColor + highlight! link CocErrorFloat TempColor + highlight! link CocWarningFloat TempColor + highlight! link CocInfoFloat TempColor + highlight! link CocHintFloat TempColor endif endif endfunction @@ -560,3 +576,8 @@ endif nnoremap % :vsplit nnoremap " :split " } +" +" Useful_Info{ +" show mapping info +" :verbose map ,cf +" }