.vimrc 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684
  1. " coding:utf-8
  2. " ζ*'ヮ')ζ ζ(*'ヮ'リ+
  3. "
  4. set ignorecase
  5. set smartcase
  6. set tabstop=2
  7. set expandtab
  8. set autoindent
  9. set backspace=2
  10. set wrapscan
  11. set showmatch
  12. set wildmenu
  13. set formatoptions+=mM
  14. set softtabstop=2
  15. set shiftwidth=4
  16. set fileencodings=utf-8,sjis,cp932,euc-jp,default,latin
  17. set number
  18. set ruler
  19. set nolist
  20. set wrap
  21. set laststatus=2
  22. set cmdheight=2
  23. set showcmd
  24. set title
  25. set hlsearch
  26. set nrformats+=alpha
  27. colorscheme elflord
  28. syntax on
  29. set enc=utf8
  30. set updatetime=200
  31. " ファイル名に大文字小文字の区別がないシステム用の設定:
  32. " (例: DOS/Windows/MacOS)
  33. "
  34. if filereadable($VIM . '/vimrc') && filereadable($VIM . '/ViMrC')
  35. " tagsファイルの重複防止
  36. set tags=./tags,tags
  37. endif
  38. " コンソールでのカラー表示のための設定(暫定的にUNIX専用)
  39. if has('unix') && !has('gui_running')
  40. let uname = system('uname')
  41. if uname =~? "linux"
  42. set term=builtin_linux
  43. elseif uname =~? "freebsd"
  44. set term=builtin_cons25
  45. elseif uname =~? "Darwin"
  46. set term=beos-ansi
  47. else
  48. set term=builtin_xterm
  49. endif
  50. unlet uname
  51. endif
  52. " コンソール版で環境変数$DISPLAYが設定されていると起動が遅くなる件へ対応
  53. if !has('gui_running') && has('xterm_clipboard')
  54. set clipboard=exclude:cons\\\|linux\\\|cygwin\\\|rxvt\\\|screen
  55. endif
  56. " タブページの切り替えをWindowsのように
  57. " CTRL+Tab SHIFT+Tabで行うように.
  58. if v:version >= 700
  59. nnoremap <C-Tab> gt
  60. nnoremap <C-S-Tab> gT
  61. endif
  62. if has('+regexpengine')
  63. set re=0
  64. endif
  65. filetype off
  66. if has('vim_starting')
  67. set runtimepath+=~/.vim/neobundle.vim.git
  68. endif
  69. call neobundle#rc(expand('~/.bundle'))
  70. let g:neobundle_default_git_protocol='https'
  71. NeoBundleFetch 'Shougo/neobundle.vim'
  72. NeoBundle 'Shougo/echodoc'
  73. call neobundle#config('echodoc', {
  74. \ 'lazy' : 1,
  75. \ 'autoload' : {
  76. \ 'insert' : 1,
  77. \ }})
  78. if has('lua')
  79. NeoBundle 'Shougo/neocomplete.vim'
  80. else
  81. NeoBundle 'Shougo/neocomplcache'
  82. endif
  83. NeoBundle 'Shougo/neomru.vim'
  84. NeoBundle 'Shougo/neosnippet'
  85. call neobundle#config('neosnippet', {
  86. \ 'lazy' : 1,
  87. \ 'autoload' : {
  88. \ 'insert' : 1,
  89. \ 'filetypes' : 'snippet',
  90. \ 'unite_sources' : ['snippet', 'neosnippet/user', 'neosnippet/runtime'],
  91. \ }})
  92. NeoBundle 'Shougo/neosnippet-snippets'
  93. call neobundle#config('neosnippet-snippets', {
  94. \ 'depends' : 'Shougo/neosnippet'
  95. \ })
  96. NeoBundle 'Shougo/unite-ssh'
  97. call neobundle#config('unite-ssh', {
  98. \ 'lazy' : 1,
  99. \ 'depends' : 'Shougo/unite.vim',
  100. \ 'autoload' : { 'unite_sources' : 'ssh' }
  101. \ })
  102. NeoBundle 'Shougo/unite.vim'
  103. call neobundle#config('unite.vim',{
  104. \ 'lazy' : 1,
  105. \ 'autoload' : {
  106. \ 'commands' : [{ 'name' : 'Unite',
  107. \ 'complete' : 'customlist,unite#complete_source'},
  108. \ 'UniteWithCursorWord', 'UniteWithInput']
  109. \ }})
  110. NeoBundle 'Shougo/vimfiler'
  111. call neobundle#config('vimfiler', {
  112. \ 'lazy' : 1,
  113. \ 'depends' : 'Shougo/unite.vim',
  114. \ 'autoload' : {
  115. \ 'commands' : [
  116. \ { 'name' : 'VimFiler',
  117. \ 'complete' : 'customlist,vimfiler#complete' },
  118. \ { 'name' : 'VimFilerExplorer',
  119. \ 'complete' : 'customlist,vimfiler#complete' },
  120. \ { 'name' : 'Edit',
  121. \ 'complete' : 'customlist,vimfiler#complete' },
  122. \ { 'name' : 'Write',
  123. \ 'complete' : 'customlist,vimfiler#complete' },
  124. \ 'Read', 'Source'],
  125. \ 'mappings' : ['<Plug>(vimfiler_switch)'],
  126. \ 'explorer' : 1,
  127. \ }
  128. \ })
  129. if has('win32') || has('win64')
  130. NeoBundleFetch 'jnwhiteh/vim-golang'
  131. call neobundle#config('vim-golang', {
  132. \ 'type' : 'nosync',
  133. \ 'lazy' : 1,
  134. \ 'autoload' : { 'filetypes' : 'go'}
  135. \ })
  136. else
  137. NeoBundle 'Shougo/vimproc.vim'
  138. call neobundle#config('vimproc.vim', {
  139. \ 'build' : {
  140. \ 'windows' : 'make -f make_mingw64.mak',
  141. \ 'cygwin' : 'make -f make_cygwin.mak',
  142. \ 'mac' : 'make -f make_mac.mak',
  143. \ 'unix' : 'make -f make_unix.mak',
  144. \ },
  145. \ })
  146. NeoBundle 'jnwhiteh/vim-golang'
  147. call neobundle#config('vim-golang', {
  148. \ 'lazy' : 1,
  149. \ 'autoload' : { 'filetypes' : 'go'}
  150. \ })
  151. NeoBundle 'vim-jp/vimdoc-ja'
  152. endif
  153. NeoBundle 'Shougo/vimshell'
  154. call neobundle#config('vimshell', {
  155. \ 'lazy' : 1,
  156. \ 'autoload' : {
  157. \ 'commands' : [{ 'name' : 'VimShell',
  158. \ 'complete' : 'customlist,vimshell#complete'},
  159. \ 'VimShellExecute', 'VimShellInteractive',
  160. \ 'VimShellTerminal', 'VimShellPop'],
  161. \ 'mappings' : ['<Plug>(vimshell_switch)']
  162. \ }})
  163. NeoBundle 'basyura/J6uil.vim'
  164. call neobundle#config('J6uil.vim', {
  165. \ 'lazy' : 1,
  166. \ 'autoload' : { 'commands' : 'J6uil' },
  167. \ 'depends' : 'mattn/webapi-vim',
  168. \ })
  169. NeoBundle 'dag/vim2hs'
  170. call neobundle#config ('vim2hs', {
  171. \ 'lazy' : 1,
  172. \ 'autoload' : { 'filetypes' : 'haskell' }
  173. \})
  174. NeoBundle 'eagletmt/ghcmod-vim'
  175. call neobundle#config('ghcmod-vim', {
  176. \ 'lazy' : 1,
  177. \ 'autoload' : { 'filetypes' : 'haskell' }
  178. \ })
  179. NeoBundle 'fuenor/qfixhowm'
  180. NeoBundle 'itchyny/calendar.vim'
  181. NeoBundle 'itchyny/lightline.vim'
  182. NeoBundle 'jceb/vim-orgmode'
  183. call neobundle#config('vim-orgmode', {
  184. \ 'lazy' : 1,
  185. \ 'autoload' : { 'filetypes' : 'org' }
  186. \ })
  187. NeoBundle 'jdonaldson/vaxe'
  188. call neobundle#config('vaxe', {
  189. \ 'lazy': 1,
  190. \ 'autoload' : {'filetypes': 'haxe'}
  191. \})
  192. NeoBundle 'kamichidu/unite-javaimport'
  193. call neobundle#config('unite-javaimport', {
  194. \ 'lazy' : 1,
  195. \ 'depends' : [
  196. \ 'kamichidu/vim-javalang', 'kamichidu/vim-javaclasspath',
  197. \ 'Shougo/unite.vim', 'yuratomo/w3m.vim'],
  198. \ 'autoload' : { 'filetypes' : ['java', 'scala', 'clojure']}
  199. \})
  200. NeoBundle 'kamichidu/vim-vdbc'
  201. call neobundle#config('vim-vdbc', {
  202. \ 'depends' : ['Shougo/vimproc.vim'] ,
  203. \ 'build': {
  204. \ 'unix' : 'make -f Makefile',
  205. \ 'windows' : 'make -f Makefile.w64'
  206. \ }
  207. \})
  208. NeoBundle 'mattn/benchvimrc-vim'
  209. call neobundle#config('benchvimrc-vim', {
  210. \ 'lazy' : 1,
  211. \ 'autoload' : { 'commands' : 'BenchVimrc' }
  212. \ })
  213. NeoBundle 'mattn/flappyvird-vim'
  214. call neobundle#config('flappyvird-vim', {
  215. \ 'lazy' : 1,
  216. \ 'autoload' : { 'commands' : 'FlappyVird' }
  217. \ })
  218. NeoBundle 'mattn/gist-vim'
  219. call neobundle#config('gist-vim', {
  220. \ 'lazy' : 1,
  221. \ 'autoload' : { 'commands' : 'Gist' }
  222. \ })
  223. NeoBundle 'mattn/libcallex-vim'
  224. NeoBundle 'mattn/sonictemplate-vim'
  225. call neobundle#config('sonictemplate-vim', {
  226. \ 'lazy' : 1,
  227. \ 'autoload' : { 'commands' : 'Template' }
  228. \ })
  229. NeoBundle 'mattn/unite-rhythmbox'
  230. call neobundle#config('unite-rhythmbox', {
  231. \ 'lazy' : 1,
  232. \ 'autoload' : { 'unite_sources' : 'rhythmbox' },
  233. \ 'depends' : 'Shougo/unite.vim'
  234. \ })
  235. NeoBundle 'mattn/webapi-vim'
  236. NeoBundle 'osyo-manga/quickrun-hook-u-nya-'
  237. call neobundle#config('quickrun-hook-u-nya-', {
  238. \ 'depends' : 'thinca/vim-quickrun'
  239. \ })
  240. NeoBundle 'osyo-manga/unite-qfixhowm'
  241. call neobundle#config('unite-qfixhowm', {
  242. \ 'lazy' : 1,
  243. \ 'autoload' : { 'unite_sources' : ['qfixhowm', 'qfixhowm/new']},
  244. \ 'depends' : ['Shougo/unite.vim', 'fuenor/qfixhowm']
  245. \ })
  246. NeoBundle 'osyo-manga/unite-quickfix'
  247. call neobundle#config('unite-quickfix', {
  248. \ 'lazy' : 1,
  249. \ 'autoload' : { 'unite_sources' : ['quickfix', 'location_list']},
  250. \ 'depends' : 'Shougo/unite.vim'
  251. \ })
  252. NeoBundle 'osyo-manga/vim-marching'
  253. call neobundle#config('vim-marching', {
  254. \ 'depends' : ['Shougo/vimproc.vim', 'osyo-manga/vim-reunions']
  255. \ })
  256. NeoBundle 'osyo-manga/vim-reunions'
  257. NeoBundle 'osyo-manga/vim-snowdrop'
  258. call neobundle#config('vim-snowdrop', {
  259. \ 'lazy' : 1,
  260. \ 'autoload' : { 'filetypes' : 'cpp' }
  261. \ })
  262. NeoBundle 'raa0121/vim-ulilith'
  263. NeoBundle 'rbtnn/vimconsole.vim'
  264. call neobundle#config('vimconsole.vim', {
  265. \ 'lazy' : 1,
  266. \ 'depends' : 'thinca/vim-prettyprint',
  267. \ 'autoload' : { 'commands' : 'VimConsoleOpen' }
  268. \ })
  269. NeoBundle 'ryutorion/vim-itunes'
  270. NeoBundle 'sudo.vim'
  271. NeoBundle 'thinca/vim-ft-clojure'
  272. call neobundle#config('vim-ft-clojure', {
  273. \ 'lazy' : 1,
  274. \ 'autoload' : { 'filetypes' : 'clojure' }
  275. \ })
  276. NeoBundle 'thinca/vim-github'
  277. call neobundle#config('vim-github', {
  278. \ 'lazy' : 1,
  279. \ 'autoload' : { 'commands' : 'Github' }
  280. \ })
  281. NeoBundle 'thinca/vim-prettyprint'
  282. call neobundle#config('vim-prettyprint', {
  283. \ 'lazy' : 1,
  284. \ 'autoload' : { 'commands' : ['PP', 'PrettyPrint']}
  285. \ })
  286. NeoBundle 'thinca/vim-quickrun'
  287. call neobundle#config('vim-quickrun', {
  288. \ 'lazy' : 1,
  289. \ 'autoload' : {
  290. \ 'mappings' : [
  291. \ ['nxo', '<Plug>(quickrun)']],
  292. \ 'commands' : 'QuickRun',
  293. \ },
  294. \ })
  295. NeoBundle 'thinca/vim-ref'
  296. call neobundle#config('vim-ref', {
  297. \ 'lazy' : 1,
  298. \ 'autoload' : { 'commands' : ['Ref', 'RefHistory'],
  299. \ 'unite_sources' : ['ref/erlang', 'ref/man',
  300. \ 'ref/pydoc', 'ref/redis',
  301. \ 'ref/refe', 'ref/webdict']}
  302. \ })
  303. NeoBundle 'thinca/vim-singleton'
  304. NeoBundle 'thinca/vim-splash'
  305. NeoBundle 'thinca/vim-threes'
  306. call neobundle#config('vim-threes', {
  307. \ 'lazy' : 1,
  308. \ 'autoload' : { 'commands' : 'ThreesStart' }
  309. \ })
  310. NeoBundle 'tsukkee/lingr-vim'
  311. call neobundle#config('lingr-vim', {
  312. \ 'lazy' : 1,
  313. \ 'autoload' : { 'commands' : 'LingrLaunch' }
  314. \ })
  315. NeoBundle 'tyru/kirikiri.vim'
  316. call neobundle#config('lingr-vim', {
  317. \ 'lazy' : 1,
  318. \ 'autoload' : { 'filetypes' : 'kscript' }
  319. \ })
  320. NeoBundle 'tyru/open-browser.vim'
  321. call neobundle#config('open-browser.vim',{
  322. \ 'lazy' : 1,
  323. \ 'autoload' : {
  324. \ 'mappings' : '<Plug>(open-browser-wwwsearch)',
  325. \ }
  326. \ })
  327. NeoBundle 'ujihisa/neco-ghc'
  328. call neobundle#config('neco-ghc', {
  329. \ 'lazy' : 1,
  330. \ 'autoload' : { 'filetypes' : 'haskell' }
  331. \ })
  332. NeoBundle 'ujihisa/neco-look'
  333. NeoBundle 'ujihisa/neoclojure.vim'
  334. call neobundle#config('neco-ghc', {
  335. \ 'lazy' : 1,
  336. \ 'autoload' : { 'filetypes' : 'clojure' }
  337. \ })
  338. NeoBundle 'ujihisa/vimshell-ssh'
  339. call neobundle#config('vimshell-ssh',{
  340. \ 'lazy' : 1,
  341. \ 'depends' : 'Shougo/vimshell',
  342. \ 'autoload' : { 'filetypes' : 'vimshell'}
  343. \ })
  344. NeoBundle 'vim-jp/vital.vim'
  345. call neobundle#config('vital.vim', {
  346. \ 'lazy' : 1,
  347. \ 'autoload' : {
  348. \ 'commands' : ['Vitalize'],
  349. \ 'functions' : ['vital#of', 'vital']
  350. \ }
  351. \ })
  352. NeoBundle 'yoppi/fluentd.vim'
  353. call neobundle#config('fluentd.vim',{
  354. \ 'lazy' : 1,
  355. \ 'autoload' : { 'filetypes' : 'fluentd'}
  356. \ })
  357. filetype plugin indent on
  358. if has('clientserver')
  359. call singleton#enable()
  360. end
  361. set ww+=h,l,>,<,[,]
  362. set mouse=a
  363. set ttymouse=xterm2
  364. set clipboard=unnamedplus
  365. " ,is: シェルを起動
  366. nnoremap <silent> ,is :VimShell<CR>
  367. " ,ipy: pythonを非同期で起動
  368. nnoremap <silent> ,ipy :VimShellInteractive python<CR>
  369. " ,irb: irbを非同期で起動
  370. nnoremap <silent> ,irb :VimShellInteractive irb<CR>
  371. " ,ss: 非同期で開いたインタプリタに現在の行を評価させる
  372. vmap <silent> ,ss :VimShellSendString<CR>
  373. " 選択中に,ss: 非同期で開いたインタプリタに選択行を評価させる
  374. nnoremap <silent> ,ss <S-v>:VimShellSendString<CR>
  375. " ,vs: vimshell
  376. nnoremap <silent> ,vs :tabnew +VimShell<CR>
  377. " ,vr: .vimrc
  378. nnoremap <silent> ,vr :tabnew ~/.vimrc<CR>:lcd<CR>
  379. nnoremap <silent> ,so :so ~/.vimrc<CR>
  380. nnoremap <silent> ,nu :tabnew +Unite\ neobundle/update<CR>
  381. nnoremap <silent> ,ll :tabnew +LingrLaunch<CR>
  382. nnoremap <Esc><Esc> :nohlsearch<CR><ESC>
  383. nnoremap <silent> ,ts :<C-u>tab stj <C-R>=expand('<cword>')<CR><CR>
  384. if neobundle#is_installed('neocomplcache')
  385. let g:neocomplcache_enable_at_startup = 1
  386. let g:neocomplcache_enable_smart_case = 1
  387. let g:neocomplcache_enable_camel_case_completion = 1
  388. let g:neocomplcache_enable_underbar_completion = 1
  389. let g:neocomplcache_min_syntax_length = 3
  390. let g:neocomplcache_lock_buffer_name_pattern = '\*ku\*'
  391. if !exists('g:neocomplcache_keyword_patterns')
  392. let g:neocomplcache_keyword_patterns = {}
  393. endif
  394. let g:neocomplcache_keyword_patterns['default'] = '\h\w*'
  395. endif
  396. if neobundle#is_installed('neocomplete.vim')
  397. let g:neocomplete#enable_at_startup = 1
  398. let g:neocomplete#enable_smart_case = 1
  399. let g:neocomplete#enable_camel_case_completion = 1
  400. let g:neocomplete#enable_underbar_completion = 1
  401. let g:neocomplete#min_syntax_length = 3
  402. let g:neocomplete#lock_buffer_name_pattern = '\*ku\*'
  403. if !exists('g:neocomplete#keyword_patterns')
  404. let g:neocomplete#keyword_patterns = {}
  405. endif
  406. let g:neocomplete#keyword_patterns['default'] = '\h\w*'
  407. if !exists('g:neocomplete#force_omni_input_patterns')
  408. let g:neocomplete#force_omni_input_patterns = {}
  409. endif
  410. if !exists('g:neocomplete#sources#omni#input_patterns')
  411. let g:neocomplete#sources#omni#input_patterns = {}
  412. endif
  413. endif
  414. let g:vimfiler_as_default_explorer = 1
  415. "let g:neocomplcache#sources#rsense#home_directory = '/opt/rsense-0.3/'
  416. let g:neocomplcache_text_mode_filetypes = {
  417. \ 'tex': 1,
  418. \ 'plaintex': 1,
  419. \}
  420. let g:neocomplete#text_mode_filetypes = {
  421. \ 'tex': 1,
  422. \ 'plaintex': 1,
  423. \}
  424. let g:neocomplete#force_omni_input_patterns.cpp =
  425. \ '[^.[:digit:] *\t]\%(\.\|->\)\w*\|\h\w*::\w*'
  426. let g:neocomplete#sources#omni#input_patterns.haxe =
  427. \ '\v([\]''"\)]|\w|(^\s*))(\.|\()'
  428. let g:neosnippet#snippets_directory = '~/.vim/snippet'
  429. "tabで補完候補の選択を行う
  430. imap <expr><TAB> neosnippet#expandable_or_jumpable() ? "\<Plug>(neosnippet_expand_or_jump)" : pumvisible() ? "\<C-n>" : "\<TAB>"
  431. imap <expr><S-TAB> neosnippet#expandable_or_jumpable() ? "\<Plug>(neosnippet_expand_or_jump)" : pumvisible() ? "\<C-u>" : "\<S-TAB>"
  432. smap <expr><TAB> neosnippet#expandable_or_jumpable() ?
  433. \ "\<Plug>(neosnippet_expand_or_jump)"
  434. \: "\<TAB>"
  435. augroup vimrc
  436. autocmd!
  437. augroup END
  438. autocmd vimrc FileType css setlocal omnifunc=csscomplete#CompleteCSS
  439. autocmd vimrc FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
  440. autocmd vimrc FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
  441. autocmd vimrc FileType python setlocal omnifunc=pythoncomplete#Complete
  442. autocmd vimrc FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
  443. autocmd vimrc FileType clojure setlocal omnifunc=neoclojure#complete
  444. autocmd vimrc BufNewFile,BufRead *.{md,mdwn,mkd,mkdn,mark*} setlocal filetype=markdown
  445. autocmd vimrc FileType haxe setl autowrite
  446. autocmd vimrc FileType hxml setl autowrite
  447. autocmd vimrc FileType nmml.xml setl autowrite
  448. autocmd vimrc BufNewFile,BufRead *.rb set tags+=$HOME/ctags/ruby.tags
  449. let g:vaxe_haxe_version = 3
  450. function! s:init_vaxe_keymap()
  451. " .hxmlファイルを開いてくれるやつ
  452. nnoremap <buffer> ,vo :<C-u>call vaxe#OpenHxml()<CR>
  453. " タグファイル作ってくれるやつ(別途、.ctagsの定義をしませう)
  454. nnoremap <buffer> ,vc :<C-u>call vaxe#Ctags()<CR>
  455. " 自動インポートな
  456. nnoremap <buffer> ,vi :<C-u>call vaxe#ImportClass()<CR>
  457. endfunction
  458. autocmd vimrc FileType haxe call s:init_vaxe_keymap()
  459. autocmd vimrc FileType hxml call s:init_vaxe_keymap()
  460. autocmd vimrc FileType nmml.xml call s:init_vaxe_keymap()
  461. let g:netrw_nogx = 1
  462. nmap gx <Plug>(openbrowser-smart-search)
  463. vmap gx <Plug>(openbrowser-smart-search)
  464. let g:quickrun_config = {}
  465. let g:quickrun_config['markdown'] = {
  466. \ 'outputter': 'browser'
  467. \ }
  468. let g:quickrun_config.ruby = {
  469. \ 'command': 'ruby',
  470. \ 'exec': '/usr/bin/env ruby %s',
  471. \ 'tempfile': '{tempname()}.rb'
  472. \ }
  473. let g:quickrun_config = {
  474. \ 'cpp': {
  475. \ 'cmdopt': '-std=c++11 -Wall'
  476. \ }
  477. \ }
  478. let g:quickrun_config = {
  479. \ '_' : {
  480. \ 'hook/close_unite_quickfix/enable_hook_loaded' : 1,
  481. \ 'hook/unite_quickfix/enable_failure' : 1,
  482. \ 'hook/close_quickfix/enable_exit' : 1,
  483. \ 'hook/close_buffer/enable_failure' : 1,
  484. \ 'hook/close_buffer/enable_empty_data' : 1,
  485. \ 'outputter' : 'multi:buffer:quickfix',
  486. \ 'hook/u_nya_/enable' : 1,
  487. \ 'hook/sweep/enable' : 0,
  488. \ 'outputter/buffer/split' : ':botright 15sp',
  489. \ 'outputter/buffer/running_mark' : 'バン(∩`・ω・)バンバンバンバン゙ン',
  490. \ 'runner' : 'vimproc',
  491. \ 'runner/vimproc/updatetime' : 40,
  492. \ 'runner/vimproc/sleep' : 0,
  493. \ }
  494. \ }
  495. let g:lingr_vim_user = 'raa0121'
  496. let g:J6uil_display_offline = 0
  497. let g:J6uil_display_online = 0
  498. let g:J6uil_echo_presence = 1
  499. let g:J6uil_display_icon = 0
  500. let g:J6uil_display_interval = 0
  501. let g:J6uil_updatetime = 1000
  502. let QFixHowm_Key = 'g'
  503. let howm_dir = '~/howm'
  504. let howm_filename = '%Y/%m/%Y-%m-%d-%H%M%S.txt'
  505. let howm_fileencoding = 'utf-8'
  506. let howm_fileformat = 'unix'
  507. let g:qfixmemo_calendar = 0
  508. let g:calendar_howm_syntax = 0
  509. let mygrepprg = 'grep'
  510. if has('win32unix')
  511. let MyGrep_cygwin17 = 1
  512. endif
  513. let g:calendar_google_calendar = 1
  514. let g:calendar_google_task = 1
  515. let g:marching_clang_command = '/usr/bin/clang'
  516. let g:marching_clang_command_option="-std=c++1y"
  517. let g:marching_enable_neocomplete = 1
  518. let g:marching_include_paths = ['/usr/include/c++/4.8.2/']
  519. let g:snowdrop#libclang_path='/usr/lib'
  520. call unite#filters#matcher_default#use(['matcher_fuzzy'])
  521. let g:unite_enable_start_insert = 1
  522. let g:unite_source_directory_mru_long_limit = 3000
  523. let g:unite_source_file_mru_filename_format = ''
  524. let g:unite_source_file_mru_long_limit = 3000
  525. let g:unite_source_history_yank_enable = 1
  526. let g:unite_split_rule = 'botright'
  527. let g:unite_winheight = 15
  528. augroup plugin-lingr-vim
  529. autocmd!
  530. autocmd FileType lingr-messages nmap <silent> <buffer> t <Plug>(lingr-messages-show-say-buffer)
  531. autocmd FileType lingr-say let &syntax='clojure'
  532. augroup END
  533. function! s:SID_PREFIX()
  534. return matchstr(expand('<sfile>'), '<SNR>\d\+_')
  535. endfunction
  536. set titlelen=100
  537. set guioptions-=e
  538. autocmd vimrc BufEnter * let &titlestring = '%{' . s:SID_PREFIX() . 'titlestring()}'
  539. autocmd vimrc User plugin-lingr-unread let &titlestring = '%{' . s:SID_PREFIX() . 'titlestring()}'
  540. if !has('gui_running')
  541. set t_Co=256
  542. endif
  543. if exists('$TMUX') || exists('$WINDOW')
  544. set t_ts=k
  545. set t_fs=\
  546. endif
  547. function! s:titlestring()
  548. if &filetype =~ '^lingr'
  549. let &titlestring = 'lingr: ' . lingr#unread_count()
  550. else
  551. let &titlestring = bufname('')
  552. endif
  553. endfunction
  554. " tabline
  555. set showtabline=2 " always show tabline
  556. let g:lightline = {
  557. \ 'colorscheme': 'wombat',
  558. \ 'component': {
  559. \ 'readonly': '%{&readonly?"":""}',
  560. \ },
  561. \ 'separator': { 'left': "\ue0b0", 'right': "\ue0b2" },
  562. \ 'subseparator': { 'left': "\ue0b1", 'right': "\ue0b3" }
  563. \ }
  564. let &tabline = '%!' . s:SID_PREFIX() . 'tabline()'
  565. function! s:tabline()
  566. " show each tab
  567. let s = ''
  568. for i in range(1, tabpagenr('$'))
  569. let list = tabpagebuflist(i)
  570. let nr = tabpagewinnr(i)
  571. let current_tabnr = tabpagenr()
  572. "let title = bufname('')
  573. if i == current_tabnr
  574. let title = fnamemodify(getcwd(), ':t') . '/'
  575. "let title = bufname('')
  576. else
  577. let title = fnamemodify(gettabvar(i, 'cwd'), ':t') . '/'
  578. endif
  579. let title = empty(title) ? '[No Name]' : title
  580. let s .= i == current_tabnr ? '%#TabLineSel#' : '%#TabLine#'
  581. let s .= '%' . i . 'T[' . i . '] ' . title
  582. let s .= ' '
  583. endfor
  584. " show lingr unread count
  585. let lingr_unread = ""
  586. if exists('*lingr#unread_count')
  587. let lingr_unread_count = lingr#unread_count()
  588. if lingr_unread_count > 0
  589. let lingr_unread = "%#ErrorMsg#(" . lingr_unread_count . ")"
  590. elseif lingr_unread_count == 0
  591. let lingr_unread = "()"
  592. endif
  593. endif
  594. " build tabline
  595. let s .= '%#TabLineFill#%T%=%<[' . getcwd() . ']' . lingr_unread
  596. return s
  597. endfunction
  598. augroup vimrc-scratch-buffer
  599. autocmd!
  600. " Make a scratch buffer when unnamed buffer.
  601. autocmd BufEnter * call s:scratch_buffer()
  602. autocmd FileType qfreplace autocmd! vimrc-scratch * <buffer>
  603. function! s:scratch_buffer()
  604. if exists('b:scratch_buffer') || bufname('%') !=# '' || &l:buftype !=# ''
  605. return
  606. endif
  607. let b:scratch_buffer = 1
  608. setlocal buftype=nofile nobuflisted noswapfile bufhidden=hide
  609. augroup vimrc-scratch
  610. autocmd! * <buffer>
  611. autocmd BufWriteCmd <buffer> call s:scratch_on_BufWriteCmd()
  612. augroup END
  613. endfunction
  614. function! s:scratch_on_BufWriteCmd()
  615. silent! setl buftype< buflisted< swapfile< bufhidden< nomodified
  616. autocmd! vimrc-scratch * <buffer>
  617. if bufname('%') ==# '' && exists('b:scratch_buffer')
  618. execute 'saveas' . (v:cmdbang ? '!' : '') ' <afile>'
  619. filetype detect
  620. endif
  621. unlet! b:scratch_buffer
  622. endfunction
  623. augroup END
  624. command! -nargs=? ExtractMatches let s:pat = empty(<q-args>) ? @/ : <q-args> | let s:result = filter(getline(1, '$'), 'v:val =~# s:pat') | new | put =s:result
  625. let g:github_user = 'raa0121'
  626. let g:github#user = 'raa0121'