-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgvimrc
285 lines (253 loc) · 11.6 KB
/
gvimrc
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
scriptencoding utf-8
" vim:set ts=8 sts=2 sw=2 tw=0: (この行に関しては:help modelineを参照)
"
" An example for a Japanese version gvimrc file.
" 日本語版のデフォルトGUI設定ファイル(gvimrc) - Vim7用試作
"
" Last Change: 07-May-2013.
" Maintainer: MURAOKA Taro <[email protected]>
"
" 解説:
" このファイルにはVimの起動時に必ず設定される、GUI関連の設定が書かれていま
" す。編集時の挙動に関する設定はvimrcに書かかれています。
"
" 個人用設定は_gvimrcというファイルを作成しそこで行ないます。_gvimrcはこの
" ファイルの後に読込まれるため、ここに書かれた内容を上書きして設定することが
" 出来ます。_gvimrcは$HOMEまたは$VIMに置いておく必要があります。$HOMEは$VIM
" よりも優先され、$HOMEでみつかった場合$VIMは読込まれません。
"
" 管理者向けに本設定ファイルを直接書き換えずに済ませることを目的として、サイ
" トローカルな設定を別ファイルで行なえるように配慮してあります。Vim起動時に
" サイトローカルな設定ファイル($VIM/gvimrc_local.vim)が存在するならば、本設
" 定ファイルの主要部分が読み込まれる前に自動的に読み込みます。
"
" 読み込み後、変数g:gvimrc_local_finishが非0の値に設定されていた場合には本設
" 定ファイルに書かれた内容は一切実行されません。デフォルト動作を全て差し替え
" たい場合に利用して下さい。
"
" 参考:
" :help gvimrc
" :echo $HOME
" :echo $VIM
" :version
"---------------------------------------------------------------------------
" サイトローカルな設定($VIM/gvimrc_local.vim)があれば読み込む。読み込んだ後
" に変数g:gvimrc_local_finishに非0な値が設定されていた場合には、それ以上の設
" 定ファイルの読込を中止する。
if 1 && filereadable($VIM . '/gvimrc_local.vim')
source $VIM/gvimrc_local.vim
if exists('g:gvimrc_local_finish') && g:gvimrc_local_finish != 0
finish
endif
endif
"---------------------------------------------------------------------------
" ユーザ優先設定($HOME/.gvimrc_first.vim)があれば読み込む。読み込んだ後に変
" 数g:gvimrc_first_finishに非0な値が設定されていた場合には、それ以上の設定
" ファイルの読込を中止する。
if 0 && exists('$HOME') && filereadable($HOME . '/.gvimrc_first.vim')
unlet! g:gvimrc_first_finish
source $HOME/.gvimrc_first.vim
if exists('g:gvimrc_first_finish') && g:gvimrc_first_finish != 0
finish
endif
endif
"---------------------------------------------------------------------------
" Bram氏の提供する設定例をインクルード (別ファイル:vimrc_example.vim)。これ
" 以前にg:no_gvimrc_exampleに非0な値を設定しておけばインクルードしない。
if 1 && (!exists('g:no_gvimrc_example') || g:no_gvimrc_example == 0)
source $VIMRUNTIME/gvimrc_example.vim
endif
"---------------------------------------------------------------------------
" カラー設定:
colorscheme morning
"---------------------------------------------------------------------------
" フォント設定:
"
if has('win32')
" Windows用
set guifont=MS_Gothic:h12:cSHIFTJIS
"set guifont=MS_Mincho:h12:cSHIFTJIS
" 行間隔の設定
set linespace=1
" 一部のUCS文字の幅を自動計測して決める
if has('kaoriya')
set ambiwidth=auto
endif
elseif has('mac')
set guifont=Osaka-等幅:h14
elseif has('xfontset')
" UNIX用 (xfontsetを使用)
set guifontset=a14,r14,k14
endif
"---------------------------------------------------------------------------
" ウインドウに関する設定:
"
" ウインドウの幅
"set columns=80
set columns=200
" ウインドウの高さ
"set lines=25
set lines=65
" コマンドラインの高さ(GUI使用時)
set cmdheight=2
" 画面を黒地に白にする (次行の先頭の " を削除すれば有効になる)
"colorscheme evening " (GUI使用時)
"---------------------------------------------------------------------------
" 日本語入力に関する設定:
"
if has('multi_byte_ime') || has('xim')
" IME ON時のカーソルの色を設定(設定例:紫)
highlight CursorIM guibg=Purple guifg=NONE
" 挿入モード・検索モードでのデフォルトのIME状態設定
set iminsert=0 imsearch=0
if has('xim') && has('GUI_GTK')
" XIMの入力開始キーを設定:
" 下記の s-space はShift+Spaceの意味でkinput2+canna用設定
"set imactivatekey=s-space
endif
" 挿入モードでのIME状態を記憶させない場合、次行のコメントを解除
"inoremap <silent> <ESC> <ESC>:set iminsert=0<CR>
endif
"---------------------------------------------------------------------------
" マウスに関する設定:
"
" 解説:
" mousefocusは幾つか問題(一例:ウィンドウを分割しているラインにカーソルがあっ
" ている時の挙動)があるのでデフォルトでは設定しない。Windowsではmousehide
" が、マウスカーソルをVimのタイトルバーに置き日本語を入力するとチラチラする
" という問題を引き起す。
"
" どのモードでもマウスを使えるようにする
set mouse=a
" マウスの移動でフォーカスを自動的に切替えない (mousefocus:切替る)
set nomousefocus
" 入力時にマウスポインタを隠す (nomousehide:隠さない)
set mousehide
" ビジュアル選択(D&D他)を自動的にクリップボードへ (:help guioptions_a)
"set guioptions+=a
"---------------------------------------------------------------------------
" メニューに関する設定:
"
" 解説:
" "M"オプションが指定されたときはメニュー("m")・ツールバー("T")供に登録され
" ないので、自動的にそれらの領域を削除するようにした。よって、デフォルトのそ
" れらを無視してユーザが独自の一式を登録した場合には、それらが表示されないと
" いう問題が生じ得る。しかしあまりにレアなケースであると考えられるので無視す
" る。
"
if &guioptions =~# 'M'
let &guioptions = substitute(&guioptions, '[mT]', '', 'g')
endif
"---------------------------------------------------------------------------
" その他、見栄えに関する設定:
"
" 検索文字列をハイライトしない(_vimrcではなく_gvimrcで設定する必要がある)
"set nohlsearch
"---------------------------------------------------------------------------
" 印刷に関する設定:
"
" 注釈:
" 印刷はGUIでなくてもできるのでvimrcで設定したほうが良いかもしれない。この辺
" りはWindowsではかなり曖昧。一般的に印刷には明朝、と言われることがあるらし
" いのでデフォルトフォントは明朝にしておく。ゴシックを使いたい場合はコメント
" アウトしてあるprintfontを参考に。
"
" 参考:
" :hardcopy
" :help 'printfont'
" :help printing
"
" 印刷用フォント
if has('printer')
if has('win32')
set printfont=MS_Mincho:h12:cSHIFTJIS
"set printfont=MS_Gothic:h12:cSHIFTJIS
endif
endif
" Copyright (C) 2009-2013 KaoriYa/MURAOKA Taro
" Vim colorscheme file
" Maintainer: Adrian Nagle <[email protected]>
" Last Change: 2001-09-25 07:48:15 Mountain Daylight Time
" URL: http://www.naglenet.org/vim/syntax/adrian.vim
" MAIN URL: http://www.naglenet.org/vim
" This is my custom syntax file to override the defaults provided with Vim.
" This file should be located in $HOME/vimfiles/colors.
" This file should automatically be sourced by $RUNTIMEPATH.
" NOTE(S):
" *(1)
" The color definitions assumes and is intended for a black or dark
" background.
" *(2)
" This file is specifically in Unix style EOL format so that I can simply
" copy this file between Windows and Unix systems. VIM can source files in
" with the UNIX EOL format (only <NL> instead of <CR><NR> for DOS) in any
" operating system if the 'fileformats' is not empty and there is no <CR>
" just before the <NL> on the first line. See ':help :source_crnl' and
" ':help fileformats'.
"
" *(3)
" Move this file to adrian.vim for vim6.0aw.
"
hi clear
set background=dark
if exists("syntax_on")
syntax reset
endif
let g:colors_name = "adrian"
" Normal is for the normal (unhighlighted) text and background.
" NonText is below the last line (~ lines).
highlight Normal guibg=Black guifg=Green
highlight Cursor guibg=Grey70 guifg=White
highlight NonText guibg=Grey80
highlight StatusLine gui=bold guibg=DarkGrey guifg=Orange
highlight StatusLineNC guibg=DarkGrey guifg=Orange
highlight Comment term=bold ctermfg=LightGrey guifg=#d1ddff
highlight Constant term=underline ctermfg=White guifg=#ffa0a0
"highlight Number term=underline ctermfg=Yellow guifg=Yellow
highlight Identifier term=underline ctermfg=Cyan guifg=#40ffff
highlight Statement term=bold ctermfg=Yellow gui=bold guifg=#ffff60
highlight PreProc term=underline ctermfg=Blue guifg=#ff4500
highlight Type term=underline ctermfg=DarkGrey gui=bold guifg=#7d96ff
highlight Special term=bold ctermfg=Magenta guifg=Orange
highlight Ignore ctermfg=black guifg=bg
highlight Error ctermfg=White ctermbg=Red guifg=White guibg=Red
highlight Todo ctermfg=Blue ctermbg=Yellow guifg=Blue guibg=Yellow
" Change the highlight of search matches (for use with :set hls).
highlight Search ctermfg=Black ctermbg=Yellow guifg=Black guibg=Yellow
" Change the highlight of visual highlight.
highlight Visual cterm=NONE ctermfg=Black ctermbg=LightGrey gui=NONE guifg=Black guibg=Grey70
highlight Float ctermfg=Blue guifg=#88AAEE
highlight Exception ctermfg=Red ctermbg=White guifg=Red guibg=White
highlight Typedef ctermfg=White ctermbg=Blue gui=bold guifg=White guibg=Blue
highlight SpecialChar ctermfg=Black ctermbg=White guifg=Black guibg=White
highlight Delimiter ctermfg=White ctermbg=Black guifg=White guibg=Black
highlight SpecialComment ctermfg=Black ctermbg=Green guifg=Black guibg=Green
" Common groups that link to default highlighting.
" You can specify other highlighting easily.
highlight link String Constant
highlight link Character Constant
highlight link Number Constant
highlight link Boolean Statement
"highlight link Float Number
highlight link Function Identifier
highlight link Conditional Type
highlight link Repeat Type
highlight link Label Type
highlight link Operator Type
highlight link Keyword Type
"highlight link Exception Type
highlight link Include PreProc
highlight link Define PreProc
highlight link Macro PreProc
highlight link PreCondit PreProc
highlight link StorageClass Type
highlight link Structure Type
"highlight link Typedef Type
"highlight link SpecialChar Special
highlight link Tag Special
"highlight link Delimiter Special
"highlight link SpecialComment Special
highlight link Debug Special
set guifont=MS_Gothic:h10:cSHIFTJIS
set nobackup
set noundofile