-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.vimrc
130 lines (126 loc) · 5.4 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
"""""""""""""""""""--------------------
"""""""""""""""""""" 基本的な設定
"""""""""""""""""""--------------------
""""""""""""""""""""新しい行のインデントを現在行と同じにする
""""""""""""""""""set autoindent
""""""""""""""""""
"""""""""""""""""""バックアップファイルのディレクトリを指定する
""""""""""""""""""set backupdir=$HOME/vimbackup
""""""""""""""""""
"""""""""""""""""""クリップボードをWindowsと連携する
""""""""""""""""""set clipboard=unnamed
""""""""""""""""""
"""""""""""""""""""vi互換をオフする
""""""""""""""""""set nocompatible
""""""""""""""""""
"""""""""""""""""""スワップファイル用のディレクトリを指定する
""""""""""""""""""set directory=$HOME/vimbackup
""""""""""""""""""
"""""""""""""""""""タブの代わりに空白文字を指定する
"""""""""""""""""""set expandtab
""""""""""""""""""
"""""""""""""""""""タブ幅の設定
""""""""""""""""""set tabstop=4
""""""""""""""""""
"""""""""""""""""""変更中のファイルでも、保存しないで他のファイルを表示する
""""""""""""""""""set hidden
""""""""""""""""""
"""""""""""""""""""インクリメンタルサーチを行う
""""""""""""""""""set incsearch
""""""""""""""""""
"""""""""""""""""""行番号を表示する
""""""""""""""""""set number
""""""""""""""""""
"""""""""""""""""""閉括弧が入力された時、対応する括弧を強調する
""""""""""""""""""set showmatch
""""""""""""""""""
"""""""""""""""""""新しい行を作った時に高度な自動インデントを行う
""""""""""""""""""set smarttab
""""""""""""""""""
"""""""""""""""""""新しい行を作った時に高度な自動インデントを行う
""""""""""""""""""set smarttab
""""""""""""""""""
""""""""""""""""""" grep検索を設定する
""""""""""""""""""set grepformat=%f:%l:%m,%f:%l%m,%f\ \ %l%m,%f
""""""""""""""""""set grepprg=grep\ -nh
""""""""""""""""""
""""""""""""""""""" 検索結果のハイライトをEsc連打でクリアする
""""""""""""""""""nnoremap <ESC><ESC> :nohlsearch<CR>
""""""""""""""""""
""""""""""""""""""" vimgrepやgrep した際に、cwindowしてしまう
""""""""""""""""""autocmd QuickFixCmdPost *grep* cwindow
""""""""""""""""""
""""""""""""""""""" エスケープシーケンスの表示 tab eol
""""""""""""""""""set list
""""""""""""""""""set listchars=tab:▸\ ,eol:¬
""""""""""""""""""
""""""""""""""""""" 全角スペースの表示
""""""""""""""""""function! ZenkakuSpace()
"""""""""""""""""" highlight ZenkakuSpace cterm=reverse ctermfg=DarkGray gui=reverse guifg=DarkGray
""""""""""""""""""endfunction
""""""""""""""""""if has('syntax')
"""""""""""""""""" augroup ZenkakuSpace
"""""""""""""""""" autocmd!
"""""""""""""""""" "ZenkakuSpace をカラーファイルで設定するなら、
"""""""""""""""""" "次の行をコメントアウト
"""""""""""""""""" autocmd ColorScheme * call ZenkakuSpace()
"""""""""""""""""" autocmd VimEnter,WinEnter * match ZenkakuSpace / /
"""""""""""""""""" augroup END
"""""""""""""""""" call ZenkakuSpace()
""""""""""""""""""endif
""""""""""""""""""
""""""""""""""""""
"""""""""""""""""""
""""""""""""""""""" NeoBundle
"""""""""""""""""""
"""""""""""""""""""
""""""""""""""""""" NeoBundle がインストールされていない時、
""""""""""""""""""" もしくは、プラグインの初期化に失敗した時の処理
""""""""""""""""""function! s:WithoutBundles()
"""""""""""""""""" colorscheme desert
"""""""""""""""""" " その他の処理
""""""""""""""""""endfunction
""""""""""""""""""
""""""""""""""""""" NeoBundle よるプラグインのロードと各プラグインの初期化
""""""""""""""""""function! s:LoadBundles()
"""""""""""""""""" " 読み込むプラグインの指定
"""""""""""""""""" NeoBundle 'Shougo/neobundle.vim'
"""""""""""""""""" "NeoBundle 'tpope/vim-surround'
"""""""""""""""""" NeoBundle 'Shougo/unite.vim'
"""""""""""""""""" NeoBundle 'Shougo/vimfiler.vim'
"""""""""""""""""" " ...
"""""""""""""""""" " 読み込んだプラグインの設定
"""""""""""""""""" " ...
""""""""""""""""""endfunction
""""""""""""""""""
""""""""""""""""""" NeoBundle がインストールされているなら LoadBundles() を呼び出す
""""""""""""""""""" そうでないなら WithoutBundles() を呼び出す
""""""""""""""""""function! s:InitNeoBundle()
"""""""""""""""""" if isdirectory(expand("~/.vim/bundle/neobundle.vim/"))
"""""""""""""""""" filetype plugin indent off
"""""""""""""""""" if has('vim_starting')
"""""""""""""""""" set runtimepath+=~/.vim/bundle/neobundle.vim/
"""""""""""""""""" endif
"""""""""""""""""" try
"""""""""""""""""" call neobundle#rc(expand('~/.vim/bundle/'))
"""""""""""""""""" call s:LoadBundles()
"""""""""""""""""" catch
"""""""""""""""""" call s:WithoutBundles()
"""""""""""""""""" endtry
"""""""""""""""""" else
"""""""""""""""""" call s:WithoutBundles()
"""""""""""""""""" endif
""""""""""""""""""
"""""""""""""""""" filetype indent plugin on
"""""""""""""""""" syntax on
""""""""""""""""""endfunction
""""""""""""""""""
""""""""""""""""""call s:InitNeoBundle()
syntax on
set noexpandtab smartindent sw=4 ts=4
set smartcase incsearch nohls
noremap <Left> :!afplay ~/Documents/.push.mp3 &<CR>:smile<CR>
noremap <Right> :!afplay ~/Documents/.push.mp3 &<CR>:smile<CR>
noremap <Up> :!afplay ~/Documents/.push.mp3 &<CR>:smile<CR>
noremap <Down> :!afplay ~/Documents/.push.mp3 &<CR>:smile<CR>
smile