commit eab7260b95aa17311e2d1c70498d53a089362096 Author: wunewww <55101139+wunewww@users.noreply.github.com> Date: Thu May 2 12:55:31 2024 +0800 init commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..81f5ae3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +backup/ +swap/ +undo/ diff --git a/.netrwhist b/.netrwhist new file mode 100644 index 0000000..21ccb0e --- /dev/null +++ b/.netrwhist @@ -0,0 +1,4 @@ +let g:netrw_dirhistmax =10 +let g:netrw_dirhistcnt =2 +let g:netrw_dirhist_2='C:/Program Files/Vim' +let g:netrw_dirhist_1='C:/Program Files/Vim/vim91' diff --git a/pack/plugin/opt/vim-easymotion b/pack/plugin/opt/vim-easymotion new file mode 160000 index 0000000..b3cfab2 --- /dev/null +++ b/pack/plugin/opt/vim-easymotion @@ -0,0 +1 @@ +Subproject commit b3cfab2a6302b3b39f53d9fd2cd997e1127d7878 diff --git a/pack/vendor/opt/nerdtree b/pack/vendor/opt/nerdtree new file mode 160000 index 0000000..f3a4d8e --- /dev/null +++ b/pack/vendor/opt/nerdtree @@ -0,0 +1 @@ +Subproject commit f3a4d8eaa8ac10305e3d53851c976756ea9dc8e8 diff --git a/vimrc b/vimrc new file mode 100644 index 0000000..ec3735e --- /dev/null +++ b/vimrc @@ -0,0 +1,137 @@ +" This is vimrc file, using as the profile of vim. +" After modify vimrc, use `:so $MYVIMRC` to reload new profile. + +" This part is only for gvim {{{ + +if has("gui_running") + if has("gui_gtk2") + set guifont=Inconsolata\ 12 + elseif has("gui_macvim") + set guifont=Menlo\ Regular:h14 + elseif has("gui_win32") + set guifont=Consolas:h12 + endif + set go-=T + set go-=m + set go-=r + set go-=L +endif + +" gvim part ends }}} + +" Easymotion {{{ +packadd! vim-easymotion +let g:EasyNotion_do_mapping = 0 " Disable default mapping +map (easymotion-prefix) + +" 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) + +" Gif config +nmap s (easymotion-s2) +nmap t (easymotion-t2) +map / (easymotion-sn) +omap / (easymotion-tn) + +" These `n` & `N` mappings are options. You do not have to map `n` & `N` to EasyMotion. +" Without these mappings, `n` & `N` works fine. (These mappings just provide +" different highlight method and have some other features ) +map n (easymotion-next) +map N (easymotion-prev) + +" Gif config +map l (easymotion-lineforward) +map j (easymotion-j) +map k (easymotion-k) +map h (easymotion-linebackward) + +let g:EasyMotion_startofline = 0 " keep cursor column when JK motion +let g:Easymotion_smartcase = 1 +" Easymotion }}} + +" NerdTree {{{ +packadd! nerdtree +nnoremap n :NERDTreeToggle +" }}} + +filetype plugin indent on " Load plugins according to detected filetype. +syntax on " Enable syntax highlighting. + +set autoindent " Indent according to previous line. +set expandtab " Use spaces instead of tabs. +set softtabstop =4 " Tab key indents by 4 spaces. +set shiftwidth =4 " >> indents by 4 spaces. +set shiftround " >> indents to next multiple of 'shiftwidth'. + +set backspace =indent,eol,start " Make backspace work as you would expect. +set hidden " Switch between buffers without having to save first. +set laststatus =2 " Always show statusline. +set display =lastline " Show as much as possible of the last line. + +set showmode " Show current mode in command-line. +set showcmd " Show already typed keys when more are expected. + +set incsearch " Highlight while searching with / or ?. +set hlsearch " Keep matches highlighted. + +set ttyfast " Faster redrawing. +set lazyredraw " Only redraw when necessary. + +set splitbelow " Open new windows below the current window. +set splitright " Open new windows right of the current window. + +set cursorline " Find the current line quickly. +set wrapscan " Searches wrap around end-of-file. +set report =0 " Always report changed lines. +set synmaxcol =200 " Only highlight the first 200 columns. + +set list " Show non-printable characters. + +if has('multi_byte') && &encoding ==# 'utf-8' + let &listchars = 'tab:▸ ,extends:❯,precedes:❮,nbsp:±' +else + let &listchars = 'tab:> ,extends:>,precedes:<,nbsp:.' +endif + +" The fish shell is not very compatible to other shells and unexpectedly +" breaks things that use 'shell'. +if &shell =~# 'fish$' + set shell=/bin/bash +endif + +if has('win32') + set shell=pwsh.exe + set shellcmdflag=-command + set shellquote=\" + set shellxquote= +endif + +" Put all temporary files under the same directory. +" https://github.com/mhinz/vim-galore#temporary-files + set backup + set backupdir =$USERPROFILE/vimfiles/backup/ + set backupext =-vimbackup + set backupskip = + set directory =$USERPROFILE/vimfiles/swap/ + set updatecount =100 + set undofile + set undodir =$USERPROFILE/vimfiles/undo/ + +" set textwidth =80 + +set updatetime =300 +set signcolumn =yes + +set foldmethod =marker