Add some packs and README, make the conf usable.
This commit is contained in:
parent
3f6ff81c9b
commit
4218db0e9e
6
.gitmodules
vendored
6
.gitmodules
vendored
@ -4,9 +4,6 @@
|
||||
[submodule "pack/plugin/start/vim-fugitive"]
|
||||
path = pack/plugin/start/vim-fugitive
|
||||
url = https://github.com/tpope/vim-fugitive.git
|
||||
[submodule "pack/plugin/opt/ale"]
|
||||
path = pack/plugin/opt/ale
|
||||
url = https://github.com/dense-analysis/ale.git
|
||||
[submodule "pack/plugin/opt/nerdtree"]
|
||||
path = pack/plugin/opt/nerdtree
|
||||
url = https://github.com/preservim/nerdtree.git
|
||||
@ -16,3 +13,6 @@
|
||||
[submodule "pack/plugin/start/vim-orgmode"]
|
||||
path = pack/plugin/start/vim-orgmode
|
||||
url = https://github.com/jceb/vim-orgmode.git
|
||||
[submodule "pack/plugin/start/ale"]
|
||||
path = pack/plugin/start/ale
|
||||
url = https://github.com/dense-analysis/ale.git
|
||||
|
||||
11
README.md
Normal file
11
README.md
Normal file
@ -0,0 +1,11 @@
|
||||
# vimfiles
|
||||
|
||||
This is wuniu's vim settings. This file describes wuniu's editing experience.
|
||||
|
||||
## Load Sequence
|
||||
|
||||
1. vimrc and scripts are triggered by vimrc
|
||||
1. plugins under `plugins/` and scripts triggered by them
|
||||
1. packs under `pack/plugin/start/` and etc.
|
||||
1. plugins under `after/plugins/` and etc.
|
||||
|
||||
41
after/plugin/30-Easymotion.vim
Normal file
41
after/plugin/30-Easymotion.vim
Normal file
@ -0,0 +1,41 @@
|
||||
" This is customized file for easymotion package.
|
||||
|
||||
packadd vim-easymotion
|
||||
let g:EasyNotion_do_mapping = 0 " Disable default mapping
|
||||
map <Leader> <Plug>(easymotion-prefix)
|
||||
|
||||
" <Leader>f{char} to move to {char}
|
||||
map <Leader>f <Plug>(easymotion-bd-f)
|
||||
nmap <Leader>f <Plug>(easymotion-overwin-f)
|
||||
|
||||
" s{char}{char} to move to {char}{char}
|
||||
nmap s <Plug>(easymotion-overwin-f2)
|
||||
|
||||
" Move to line
|
||||
map <Leader>L <Plug>(easymotion-bd-jk)
|
||||
nmap <Leader>L <Plug>(easymotion-overwin-line)
|
||||
|
||||
" Move to word
|
||||
map <Leader>w <Plug>(easymotion-bd-w)
|
||||
nmap <Leader>w <Plug>(easymotion-overwin-w)
|
||||
|
||||
" Gif config
|
||||
nmap s <Plug>(easymotion-s2)
|
||||
nmap t <Plug>(easymotion-t2)
|
||||
map / <Plug>(easymotion-sn)
|
||||
omap / <Plug>(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 <Plug>(easymotion-next)
|
||||
map N <Plug>(easymotion-prev)
|
||||
|
||||
" Gif config
|
||||
map <Leader>l <Plug>(easymotion-lineforward)
|
||||
map <Leader>j <Plug>(easymotion-j)
|
||||
map <Leader>k <Plug>(easymotion-k)
|
||||
map <Leader>h <Plug>(easymotion-linebackward)
|
||||
|
||||
let g:EasyMotion_startofline = 0 " keep cursor column when JK motion
|
||||
let g:Easymotion_smartcase = 1
|
||||
3
after/plugin/31-NerdTree.vim
Normal file
3
after/plugin/31-NerdTree.vim
Normal file
@ -0,0 +1,3 @@
|
||||
" This is configurations for NerdTree
|
||||
packadd nerdtree
|
||||
nnoremap <leader>n :NERDTreeFocus<CR>
|
||||
15
plugin/01-gui.vim
Normal file
15
plugin/01-gui.vim
Normal file
@ -0,0 +1,15 @@
|
||||
" This is special settings for vim-gui.
|
||||
"
|
||||
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=CaskaydiaMono\ NFM:h12
|
||||
endif
|
||||
set go-=T
|
||||
set go-=m
|
||||
set go-=r
|
||||
set go-=L
|
||||
endif
|
||||
7
plugin/30-ale.vim
Normal file
7
plugin/30-ale.vim
Normal file
@ -0,0 +1,7 @@
|
||||
" Enable completion where available.
|
||||
" This setting must be set before ALE is loaded.
|
||||
"
|
||||
" You should not turn this setting on if you wish to use ALE as a completion
|
||||
" source for other completion plugins, like Deoplete.
|
||||
let g:ale_completion_enabled = 1
|
||||
set omnifunc=ale#completion#OmniFunc
|
||||
88
vimrc
88
vimrc
@ -1,75 +1,17 @@
|
||||
" 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
|
||||
" env variables
|
||||
if has('win32') || has('win64')
|
||||
let g:CONFIGPATH = $USERPROFILE . '/vimfiles'
|
||||
elseif has('unix')
|
||||
let g:CONFIGPATH = $HOME . '/.vim'
|
||||
endif
|
||||
|
||||
" gvim part ends }}}
|
||||
|
||||
" Easymotion {{{
|
||||
packadd! vim-easymotion
|
||||
let g:EasyNotion_do_mapping = 0 " Disable default mapping
|
||||
map <Leader> <Plug>(easymotion-prefix)
|
||||
|
||||
" <Leader>f{char} to move to {char}
|
||||
map <Leader>f <Plug>(easymotion-bd-f)
|
||||
nmap <Leader>f <Plug>(easymotion-overwin-f)
|
||||
|
||||
" s{char}{char} to move to {char}{char}
|
||||
nmap s <Plug>(easymotion-overwin-f2)
|
||||
|
||||
" Move to line
|
||||
map <Leader>L <Plug>(easymotion-bd-jk)
|
||||
nmap <Leader>L <Plug>(easymotion-overwin-line)
|
||||
|
||||
" Move to word
|
||||
map <Leader>w <Plug>(easymotion-bd-w)
|
||||
nmap <Leader>w <Plug>(easymotion-overwin-w)
|
||||
|
||||
" Gif config
|
||||
nmap s <Plug>(easymotion-s2)
|
||||
nmap t <Plug>(easymotion-t2)
|
||||
map / <Plug>(easymotion-sn)
|
||||
omap / <Plug>(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 <Plug>(easymotion-next)
|
||||
map N <Plug>(easymotion-prev)
|
||||
|
||||
" Gif config
|
||||
map <Leader>l <Plug>(easymotion-lineforward)
|
||||
map <Leader>j <Plug>(easymotion-j)
|
||||
map <Leader>k <Plug>(easymotion-k)
|
||||
map <Leader>h <Plug>(easymotion-linebackward)
|
||||
|
||||
let g:EasyMotion_startofline = 0 " keep cursor column when JK motion
|
||||
let g:Easymotion_smartcase = 1
|
||||
" Easymotion }}}
|
||||
|
||||
" ale
|
||||
" packadd! ale
|
||||
" ale
|
||||
|
||||
" NerdTree {{{
|
||||
packadd! nerdtree
|
||||
nnoremap <leader>n :NERDTreeFocus<CR>
|
||||
" }}}
|
||||
|
||||
filetype plugin indent on " Load plugins according to detected filetype.
|
||||
syntax on " Enable syntax highlighting.
|
||||
|
||||
@ -124,18 +66,22 @@ 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 backup
|
||||
set backupext =-vimbackup
|
||||
set backupskip =
|
||||
set updatecount =100
|
||||
set undofile
|
||||
|
||||
if exists('g:CONFIGPATH')
|
||||
execute 'set undodir=' . escape(g:CONFIGPATH, ' \') . '/undo/'
|
||||
execute 'set directory=' . escape(g:CONFIGPATH, ' \') . '/swap/'
|
||||
execute 'set backupdir=' . escape(g:CONFIGPATH, ' \') . '/backup/'
|
||||
endif
|
||||
|
||||
" set textwidth =80
|
||||
|
||||
set updatetime =300
|
||||
set signcolumn =yes
|
||||
set smartcase
|
||||
|
||||
set foldmethod =manual
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user