-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
125 lines (104 loc) · 2.69 KB
/
.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
scriptencoding utf-8
" Encoding
set encoding=utf-8
set fileencoding=utf-8
set fileencodings=utf-8,cp932,euc-jp,sjis,iso-2022-jp
au BufReadPost * if search('\S', 'w') == 0 |
\ set fileencoding=utf-8 | endif
" Basic
set runtimepath+=~/.vim/
set helplang=ja
set laststatus=2
set cmdheight=2
set showmatch
set autoread
set hidden
set scrolloff=3
set hidden
set backspace=indent,eol,start
set showcmd
set ruler
set formatoptions=q
set tw=0
set t_vb=
set novisualbell
set ambiwidth=single
set clipboard+=unnamed
set history=4000
set cmdheight=2
set tabstop=4
set shiftwidth=4
set autoindent
set smartindent
set expandtab
set softtabstop=4
set noequalalways
syntax enable
" Complete
set wildmenu
set wildmode=list,full
set completeopt=menu,preview
" Search
set wrapscan
set incsearch
" Unvisible string
set list
set listchars=tab:^^,extends:>,precedes:<,nbsp:%
" Status
set laststatus=2
set statusline=%F%m%r%h%w\%=
\[TYPE=%Y]\[FORMAT=%{&ff}]\[ENC=%{&fileencoding}]\[LOW=%l/%L]
nnoremap ZZ <Nop>
nnoremap ZQ <Nop>
" Backup/Swap/Undo
" **Attension! You make directory with your hand.**
set directory=~/.vim/var/swap
set backupdir=~/.vim/var/backup
set undodir=~/.vim/var/undo
" Hilight current line
augroup cch
autocmd! cch
autocmd CursorMoved,CursorMovedI,WinLeave * setlocal nocursorline
autocmd CursorHold,CursorHoldI * setlocal cursorline
augroup END
" Double Space highlight
augroup highlightDoubleByteSpace
autocmd! highlightDoubleByteSpace
autocmd VimEnter,Colorscheme * highlight DoubleByteSpace cterm=underline
\ ctermfg=Green gui=reverse guifg=Green
autocmd VimEnter,WinEnter * match DoubleByteSpace / /
augroup END
" Seach option
xnoremap * :<C-u>call <SID>VSetSearch()<CR>/<C-R>=@/<CR><CR>
xnoremap # :<C-u>call <SID>VSetSearch()<CR>?<C-R>=@/<CR><CR>
function! s:VSetSearch()
let l:temp = @s
norm! gv"sy
let @/ = '\V' . substitute(escape(@s, '/\'), '\n', '\\n', 'g')
let @s = l:temp
endfunction
" mouse scrolling
set mouse=a
set ttymouse=xterm2
" minpac
if &compatible
set nocompatible
endif
packadd minpac
call minpac#init()
" minpac must have {'type': 'opt'} so that it can be loaded with `packadd`.
call minpac#add('k-takata/minpac', {'type': 'opt'})
" Add other plugins here. call minpac#update()
call minpac#add('gryf/wombat256grf')
call minpac#add('tpope/vim-fugitive')
call minpac#add('airblade/vim-gitgutter')
call minpac#add('prabirshrestha/vim-lsp')
call minpac#add('mattn/vim-lsp-settings')
call minpac#add('posva/vim-vue')
call minpac#add('ctrlpvim/ctrlp.vim')
call minpac#add('lambdalisue/fern.vim')
call minpac#add('lambdalisue/fern-git-status.vim')
call minpac#add('wakatime/vim-wakatime')
let g:gitgutter_highlight_lines = 1
" Color Scheme
colorscheme wombat256grf