-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
172 lines (147 loc) · 5.6 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
162
163
164
165
166
167
168
169
170
171
172
"---------------------------------------------------------------------------
" 標準設定
"---------------------------------------------------------------------------
" autocmd 用Myグループの作成 (名前空間的な認識)
" 参考: https://github.com/vim-jp/reading-vimrc/wiki , :h autocmd
augroup MyAutoGrp
" 「全ての」MyAutoGrp の自動コマンドを削除する
autocmd!
augroup END
" *.md ファイル等は filetype=modula2 と判断してしまうので markdown に設定
autocmd MyAutoGrp BufNewFile,BufRead *.{md,mdwn,mkd,mkdn,mark*} :set filetype=markdown
" 文字コード・文字表示周り
set encoding=utf-8
" 2バイト半角対策 ■ 等で表示崩れ対策
set ambiwidth=double
"
set helplang=ja,en
set number
set history=200
set breakindent
" マウスを無効化
set mouse-=a
" vimからファイルを開くときにリスト表示
set wildmenu wildmode=list:full
" Insert時に、バックスペースを使用する
set backspace=indent,eol,start
" <C-a>, <C-x> の挙動設定
set nrformats=hex
" 検索
set ignorecase
set smartcase
set incsearch
set hlsearch
" ステータス行
" ファイルエンコーディング, 文字コードを表示
" https://sites.google.com/site/fudist/Home/vim-nihongo-ban/vim-japanese#TOC--6
set laststatus=2
set statusline=%<%f\ %m\ %r%h%w%{'['.(&fenc!=''?&fenc:&enc).']['.&ff.']'}%=\ (%v,%l)/%L%8P
" コーディング設定
set tabstop=4
set autoindent
set expandtab
set smartindent
set shiftwidth=4
" タブ, 行末スペースの可視化
set list listchars=tab:>.,trail:_
" 各機能の設定ファイル読み込み
source ~/.vim/abbreviate.vim
source ~/.vim/mappings.vim
"---------------------------------------------------------------------------
" Neovim 設定
"---------------------------------------------------------------------------
if has('nvim')
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
" dein.nvim 用 python3 へのパス追加
let g:python3_host_prog = expand('~/.pyenv/shims/python')
endif
"---------------------------------------------------------------------------
" NeoBundle 設定
"---------------------------------------------------------------------------
" Required: bundleで管理するディレクトリを指定
set runtimepath+=~/.vim/bundle/neobundle.vim/
" Required:
call neobundle#begin(expand('~/.vim/bundle/')) " {{{
" Required: NeoBundle に NeoBundle 自身の管理をさせる
NeoBundleFetch 'Shougo/neobundle.vim'
" 'denite.nvim' {{{
NeoBundle 'Shougo/neomru.vim'
NeoBundle 'Shougo/neoyank.vim'
NeoBundle 'Shougo/denite.nvim'
" 読み込み完了後に call する
let s:denite = neobundle#get("denite.nvim")
function! s:denite.hooks.on_source(denite)
" key mapping
nnoremap [denite] <Nop>
nmap <Space>u [denite]
nnoremap [denite]f :<C-u>Denite<Space>file_rec<CR>
nnoremap [denite]b :<C-u>Denite<Space>buffer<CR>
nnoremap [denite]m :<C-u>Denite<Space>file_mru<CR>
nnoremap [denite]p :<C-u>Denite<Space>neoyank<CR>
nnoremap [denite]g :<C-u>Denite<Space>grep<CR>
call denite#custom#map('insert', '<C-a>', '<Home>')
call denite#custom#map('insert', '<C-e>', '<End>')
call denite#custom#map('insert', '<C-f>', '<Right>')
call denite#custom#map('insert', '<C-b>', '<Left>')
call denite#custom#map('insert', '<C-j>', '<denite:move_to_next_line>', 'noremap')
call denite#custom#map('insert', '<C-k>', '<denite:move_to_previous_line>', 'noremap')
endfunction
" }}}
" カラースキーマ一覧
NeoBundle 'nanotech/jellybeans.vim'
NeoBundle 'tomasr/molokai' " 中々良い
NeoBundle 'croaker/mustang-vim'
NeoBundle 'mrkn/mrkn256.vim' " 良い
NeoBundle 'jpo/vim-railscasts-theme' " 中々良い
NeoBundle 'chriskempson/vim-tomorrow-theme'
NeoBundle 'sjl/badwolf'
NeoBundle 'itchyny/landscape.vim'
NeoBundle 'gosukiwi/vim-atom-dark'
" Window サイズ変更を便利に
NeoBundle 'kana/vim-submode' "{{{
" 読み込み完了後に call する
let s:bundle = neobundle#get("vim-submode")
function! s:bundle.hooks.on_source(bundle)
" s>>>, s<<<, s+++, s---, の様にして画面サイズ変更を可能に
call submode#enter_with('bufmove', 'n', '', 's>', '<C-w>>')
call submode#enter_with('bufmove', 'n', '', 's<', '<C-w><')
call submode#enter_with('bufmove', 'n', '', 's+', '<C-w>+')
call submode#enter_with('bufmove', 'n', '', 's-', '<C-w>-')
call submode#map('bufmove', 'n', '', '>', '<C-w>>')
call submode#map('bufmove', 'n', '', '<', '<C-w><')
call submode#map('bufmove', 'n', '', '+', '<C-w>+')
call submode#map('bufmove', 'n', '', '-', '<C-w>-')
endfunction
"}}}
NeoBundle 'rbgrouleff/bclose.vim'
NeoBundle 'vim-jp/vimdoc-ja'
NeoBundle 'scrooloose/syntastic'
NeoBundle 'tpope/vim-commentary'
NeoBundle 'PDV--phpDocumentor-for-Vim'
NeoBundle 'fatih/vim-go' "{{{
autocmd MyAutoGrp FileType go :highlight goErr cterm=bold ctermfg=214
autocmd MyAutoGrp FileType go :match goErr /\<err\>/
" }}}
" Markdown用
"NeoBundle 'plasticboy/vim-markdown'
NeoBundleFetch 'kurocode25/mdforvim'
"NeoBundle 'kannokanno/previm'
NeoBundle 'kazuph/previm', 'feature/add-plantuml-plugin'
NeoBundle 'tyru/open-browser.vim'
NeoBundle 'rcmdnk/vim-markdown'
" rcmdnk/vim-markdown {{{
let g:vim_markdown_folding_diabled = 1
"}}}
" Required:
call neobundle#end() " }}}
" Required:
filetype plugin indent on
" vim起動時に未インストールの bundle が無いかチェックし、
" 有る場合はインストールを促す。
NeoBundleCheck
"---------------------------------------------------------------------------
" 標準設定 (Plugin 読込み後)
"---------------------------------------------------------------------------
colorscheme mrkn256
syntax on
" vim: foldmethod=marker