From 9f204c225800ac4bfd82170dbd7cccacc7c09c22 Mon Sep 17 00:00:00 2001 From: xfy Date: Tue, 14 Jan 2025 13:22:18 +0800 Subject: [PATCH] add plugins for vim --- vim/vim/.gitignore | 2 ++ vim/vim/.netrwhist | 10 ---------- vim/vimrc | 26 +++++++++++++++++++------- 3 files changed, 21 insertions(+), 17 deletions(-) create mode 100644 vim/vim/.gitignore delete mode 100644 vim/vim/.netrwhist diff --git a/vim/vim/.gitignore b/vim/vim/.gitignore new file mode 100644 index 0000000..7ad560b --- /dev/null +++ b/vim/vim/.gitignore @@ -0,0 +1,2 @@ +bundle/ +.netrwhist diff --git a/vim/vim/.netrwhist b/vim/vim/.netrwhist deleted file mode 100644 index e0c68a0..0000000 --- a/vim/vim/.netrwhist +++ /dev/null @@ -1,10 +0,0 @@ -let g:netrw_dirhistmax =10 -let g:netrw_dirhistcnt =8 -let g:netrw_dirhist_8='/Users/xfy/Developer/vimrc/vim/colors' -let g:netrw_dirhist_7='/Users/xfy' -let g:netrw_dirhist_6='/Volumes/SN/Developer/show-client/src/show/lib' -let g:netrw_dirhist_5='/Volumes/SN/Developer/show-client/src/show/lib/core' -let g:netrw_dirhist_4='/Volumes/SN/Developer/show-client/src/show/lib' -let g:netrw_dirhist_3='/Users/xfy/Developer/vimrc' -let g:netrw_dirhist_2='/Users/xfy' -let g:netrw_dirhist_1='/Users/xfy/Developer/vimrc' diff --git a/vim/vimrc b/vim/vimrc index ef80133..8cf76cb 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -4,7 +4,14 @@ set nocompatible " Helps force plugins to load correctly when it is turned back on below filetype off -" TODO: Load plugins here (pathogen or vundle) +set rtp+=~/.vim/bundle/Vundle.vim +call vundle#begin() +Plugin 'VundleVim/Vundle.vim' +Plugin 'tpope/vim-surround' +Plugin 'scrooloose/nerdtree' +Plugin 'vim-airline/vim-airline' +Plugin 'vim-airline/vim-airline-themes' +call vundle#end() " Turn on syntax highlighting syntax on @@ -99,12 +106,15 @@ let g:solarized_termtrans=1 colorscheme nord " colorscheme catppuccin_mocha +" plugin +" nerdtree +let g:NERDTreeWinPos = "right" + " Mapping -map e :Ex " Open local-directory browser map :noh noremap - :Ex " Open local-directory browser tnoremap " test -"" siwtch window +" siwtch window map j tnoremap j map k @@ -113,17 +123,19 @@ map h tnoremap h map l tnoremap l -"" https://stackoverflow.com/questions/5933568/disable-blinking-at-the-first-last-line-of-the-file +" https://stackoverflow.com/questions/5933568/disable-blinking-at-the-first-last-line-of-the-file noremap k ((line('.')==1)?'':'k') noremap j ((line('.')==line('$'))?'':'j') -"" term +" term noremap tt :term ++curwin -"" buffer +" buffer noremap :bn noremap :bp noremap x :bd noremap b :ls:b -"" save +" save noremap :w map p :set paste map np :set nopaste +" nerdtree +map e :NERDTreeToggle " Open local-directory browser