-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_vimrc.tmpl
113 lines (99 loc) · 2.32 KB
/
dot_vimrc.tmpl
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
if &compatible
set nocompatible
endif
set encoding=utf-8
set fileencoding=utf-8
set fileencodings=ucs-bom,utf-8,cp932,sjis,euc-jp,default,latin1
set fileformat=unix
set fileformats=unix,dos,mac
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set smarttab
set autoindent
set smartindent
set copyindent
set preserveindent
set shiftround
set cursorline
set listchars=tab:<->,space:-,multispace:---\|
set list
set number
set relativenumber
set showcmd
set signcolumn=yes
set laststatus=2
set nowrap
set hlsearch
set noincsearch
set belloff=all
set backspace=indent,eol,start
set virtualedit=block
set clipboard=unnamed,unnamedplus
set updatetime=300
set splitbelow
set splitright
{{- if eq .chezmoi.os "windows" }}
set shell=pwsh
{{- end }}
filetype plugin indent on
if has('packages')
packadd! emmet-vim
packadd! vim-gitgutter
packadd! vim-surround
packadd! vim-wakatime
endif
if has('packages') && has('python3')
let g:vimsence_small_text = 'Vim'
let g:vimsence_small_image = 'vim'
let g:vimsence_editing_details = 'Editing: {}'
let g:vimsence_editing_state = 'Working on: {}'
packadd! vimsence
endif
" onedark.vim
syntax enable
if has('packages')
let g:onedark_hide_endofbuffer=1
let g:onedark_termcolors=16
if (empty($TMUX))
if (has("nvim"))
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
endif
if (has("termguicolors"))
set termguicolors
endif
endif
packadd! onedark.vim
colorscheme onedark
else
colorscheme slate
endif
" lightline.vim
if has('packages')
set noshowmode
let g:lightline = {
\ 'colorscheme': 'onedark',
\ }
packadd! lightline.vim
else
set statusline=%F%m%h%w%=[%l:%02v][%Y][%{&fileformat}][%{&fileencoding}]
endif
" coc.nvim
if has('packages')
" <TAB>で補完選択
inoremap <silent><expr> <TAB>
\ coc#pum#visible() ? coc#pum#next(1) :
\ CheckBackspace() ? "\<Tab>" :
\ coc#refresh()
inoremap <expr> <S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"
function! CheckBackspace() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
" <CR>で補完確定
inoremap <silent><expr> <CR>
\ coc#pum#visible() ? coc#pum#confirm() :
\ "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
packadd! coc.nvim
endif