-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
161 lines (134 loc) · 4.31 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
"dein Scripts-----------------------------
if &compatible
set nocompatible " Be iMproved
endif
" Required:
set runtimepath+=~/.cache/dein/repos/github.com/Shougo/dein.vim
" Required:
call dein#begin('~/.cache/dein')
" Let dein manage dein
" Required:
call dein#add('~/.cache/dein/repos/github.com/Shougo/dein.vim')
" Add or remove your plugins here like this:
"call dein#add('Shougo/neosnippet.vim')
"call dein#add('Shougo/neosnippet-snippets')
" requirements: `pip3 install neovim`
"call dein#add('Shougo/deoplete.nvim')
"call dein#add('Shougo/deoppet.nvim')
"call dein#add('Shougo/denite.nvim')
"if !has('nvim')
" call dein#add('roxma/nvim-yarp')
" call dein#add('roxma/vim-hug-neovim-rpc')
"endif
call dein#add('altercation/vim-colors-solarized')
call dein#add('fatih/vim-go')
call dein#add('hashivim/vim-terraform')
call dein#add('pearofducks/ansible-vim')
" Required:
call dein#end()
" Required:
filetype plugin indent on
syntax enable
" If you want to install not installed plugins on startup.
if dein#check_install()
call dein#install()
endif
"End dein Scripts-------------------------
set backspace=2
set autoindent
set nosmartindent
set nocindent
set nobackup
set backupdir=~/tmp
set history=3284
set incsearch
set expandtab
set tabstop=4
set shiftwidth=4
set softtabstop=4
set shortmess+=I
set list
set listchars=tab:>-,extends:>,precedes:<,trail:-
set modeline
set number
set showcmd
set showmatch
set showmode
set ruler
set whichwrap=b,s,h,l,<,>,[,]
set ignorecase
set smartcase
set wrapscan
set hlsearch
set laststatus=2
set statusline=%<%f\ %m%r%h%w%{'['.(&fenc!=''?&fenc:&enc).']['.&ft.']['.&ff.']'}%=%l,%c%V%8P
set hidden
set autoread
set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc
set formatoptions+=rm
set noswapfile
set foldmethod=marker
nnoremap j gj
onoremap j gj
xnoremap j gj
nnoremap k gk
onoremap k gk
xnoremap k gk
map <C-L> <C-W>W
map <C-H> <C-W>w
highlight WideSpace ctermbg=blue guibg=blue
highlight EOLSpace ctermbg=red guibg=red
set fileformats=unix,dos,mac " trying EOL formats
set termencoding=utf-8 " Encoding used for the terminal.
set encoding=utf-8 " character encoding used inside Vim.
"set fileencodings=utf-8,cp932,euc-jp,iso-2022-jp " list of character encodings considered when starting to edit an existing file.
set fileencodings=utf-8
set ambiwidth=double " Use twice the width of ASCII characters.
if &term =~ "xterm-256color"
"colorscheme desert256
"colorscheme molokai
set background=dark
colorscheme solarized
endif
"行頭のスペースの連続をハイライトさせる
"Tab文字も区別されずにハイライトされるので、区別したいときはTab文字の表示を別に
"設定する必要がある。
function! SOLSpaceHilight()
syntax match SOLSpace "^\t\+" display containedin=ALL
"highlight SOLSpace cterm=underline ctermfg=DarkGray
endf
"全角スペースをハイライトさせる。
function! JISX0208SpaceHilight()
syntax match JISX0208Space " " display containedin=ALL
highlight JISX0208Space cterm=underline ctermfg=LightCyan
endf
"highlight IdeographicSpace term=underline ctermbg=LightCyan guibg=LightCyan
"autocmd VimEnter,WinEnter * match IdeographicSpace / /
"syntaxの有無をチェックし、新規バッファと新規読み込み時にハイライトさせる
if has("syntax")
syntax on
augroup invisible
autocmd! invisible
autocmd BufNew,BufRead * call SOLSpaceHilight()
autocmd BufNew,BufRead * call JISX0208SpaceHilight()
augroup END
endif
augroup vimrc
autocmd FileType css set softtabstop=2 shiftwidth=2
autocmd FileType go set noexpandtab
autocmd FileType javascript set softtabstop=2 shiftwidth=2
autocmd FileType json set softtabstop=2 shiftwidth=2
autocmd FileType html set softtabstop=2 shiftwidth=2
autocmd FileType html.twig set softtabstop=2 shiftwidth=2
autocmd FileType scss set softtabstop=2 shiftwidth=2
autocmd FileType yaml set softtabstop=2 shiftwidth=2
autocmd BufNewFile,BufRead .php_cs setfiletype php
augroup END
let mapleader = ","
" deoplete
"let g:deoplete#enable_at_startup = 1
" vim-go
let g:go_play_open_browser = 0
let g:go_fmt_command = "gofmt"
let g:go_fmt_fail_silently = 1
let g:go_snippet_engine = "deoppet"