.vimrc 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023
  1. " coding:utf-8
  2. set enc=utf8
  3. scriptencoding utf-8
  4. " ζ*'ヮ')ζ ζ(*'ヮ'リ+
  5. "
  6. set ignorecase
  7. set smartcase
  8. set tabstop=2
  9. set expandtab
  10. set autoindent
  11. set backspace=2
  12. set wrapscan
  13. set showmatch
  14. set wildmenu
  15. set formatoptions+=mM
  16. set softtabstop=2
  17. set shiftwidth=2
  18. set fileencodings=utf-8,sjis,cp932,euc-jp,default,latin
  19. set number
  20. set ruler
  21. set nolist
  22. set wrap
  23. set laststatus=2
  24. set cmdheight=2
  25. set showcmd
  26. set title
  27. set hlsearch
  28. set list
  29. set listchars=tab:>-
  30. set ambiwidth=double
  31. colorscheme elflord
  32. if has('gui_running')
  33. colorscheme evening
  34. endif
  35. syntax on
  36. set updatetime=200
  37. " ファイル名に大文字小文字の区別がないシステム用の設定:
  38. " (例: DOS/Windows/MacOS)
  39. "
  40. if filereadable($VIM . '/vimrc') && filereadable($VIM . '/ViMrC')
  41. " tagsファイルの重複防止
  42. set tags=./tags,tags
  43. endif
  44. " コンソールでのカラー表示のための設定(暫定的にUNIX専用)
  45. if has('unix') && !has('gui_running') && !has('nvim')
  46. let uname = system('uname')
  47. if uname =~? "linux"
  48. set term=builtin_linux
  49. elseif g:uname =~? 'freebsd'
  50. set term=builtin_cons25
  51. elseif g:uname =~? 'Darwin'
  52. set term=beos-ansi
  53. else
  54. set term=builtin_xterm
  55. endif
  56. endif
  57. " コンソール版で環境変数$DISPLAYが設定されていると起動が遅くなる件へ対応
  58. if !has('gui_running') && has('xterm_clipboard')
  59. set clipboard=exclude:cons\\\|linux\\\|cygwin\\\|rxvt\\\|screen
  60. endif
  61. " タブページの切り替えをWindowsのように
  62. " CTRL+Tab SHIFT+Tabで行うように.
  63. if v:version >= 700
  64. nnoremap <C-Tab> gt
  65. nnoremap <C-S-Tab> gT
  66. endif
  67. if has('+regexpengine')
  68. set re=0
  69. endif
  70. let g:vim_indent_cont = 2
  71. filetype off
  72. if has('vim_starting')
  73. set runtimepath+=~/.vim/neobundle.vim.git
  74. endif
  75. call neobundle#begin(expand('~/.bundle'))
  76. let g:neobundle_default_git_protocol='https'
  77. if has('python')
  78. NeoBundle 'OmniSharp/omnisharp-vim'
  79. call neobundle#config('omnisharp-vim', {
  80. \ 'lazy' : 1,
  81. \ 'autoload' : {'filetypes': ['cs'] }
  82. \ })
  83. endif
  84. NeoBundleFetch 'Shougo/neobundle.vim'
  85. NeoBundle 'Shougo/echodoc'
  86. call neobundle#config('echodoc', {
  87. \ 'lazy' : 1,
  88. \ 'autoload' : {
  89. \ 'insert' : 1,
  90. \ }})
  91. if has('lua')
  92. NeoBundle 'Shougo/neocomplete.vim'
  93. else
  94. NeoBundle 'Shougo/neocomplcache'
  95. endif
  96. NeoBundle 'Shougo/neomru.vim'
  97. NeoBundle 'Shougo/neosnippet'
  98. call neobundle#config('neosnippet', {
  99. \ 'lazy' : 1,
  100. \ 'autoload' : {
  101. \ 'insert' : 1,
  102. \ 'filetypes' : 'snippet',
  103. \ 'unite_sources' : ['snippet', 'neosnippet/user', 'neosnippet/runtime'],
  104. \ }})
  105. NeoBundle 'Shougo/neosnippet-snippets'
  106. call neobundle#config('neosnippet-snippets', {
  107. \ 'depends' : 'Shougo/neosnippet'
  108. \ })
  109. NeoBundle 'Shougo/unite-ssh'
  110. call neobundle#config('unite-ssh', {
  111. \ 'lazy' : 1,
  112. \ 'depends' : 'Shougo/unite.vim',
  113. \ 'autoload' : { 'unite_sources' : 'ssh' }
  114. \ })
  115. NeoBundle 'Shougo/unite.vim'
  116. call neobundle#config('unite.vim',{
  117. \ 'lazy' : 1,
  118. \ 'autoload' : {
  119. \ 'commands' : [{ 'name' : 'Unite',
  120. \ 'complete' : 'customlist,unite#complete_source'},
  121. \ 'UniteWithCursorWord', 'UniteWithInput']
  122. \ }})
  123. NeoBundle 'Shougo/unite-outline'
  124. NeoBundle 'Shougo/vimfiler'
  125. call neobundle#config('vimfiler', {
  126. \ 'lazy' : 1,
  127. \ 'depends' : 'Shougo/unite.vim',
  128. \ 'autoload' : {
  129. \ 'commands' : [
  130. \ { 'name' : 'VimFiler',
  131. \ 'complete' : 'customlist,vimfiler#complete' },
  132. \ { 'name' : 'VimFilerExplorer',
  133. \ 'complete' : 'customlist,vimfiler#complete' },
  134. \ { 'name' : 'VimFilerBufferDir',
  135. \ 'complete' : 'customlist,vimfiler#complete' },
  136. \ { 'name' : 'Edit',
  137. \ 'complete' : 'customlist,vimfiler#complete' },
  138. \ { 'name' : 'Write',
  139. \ 'complete' : 'customlist,vimfiler#complete' },
  140. \ 'Read', 'Source'],
  141. \ 'mappings' : ['<Plug>(vimfiler_switch)'],
  142. \ 'explorer' : 1,
  143. \ }
  144. \ })
  145. if has('win32') || has('win64')
  146. NeoBundleFetch 'jnwhiteh/vim-golang'
  147. call neobundle#config('vim-golang', {
  148. \ 'type' : 'nosync',
  149. \ 'lazy' : 1,
  150. \ 'autoload' : { 'filetypes' : 'go'}
  151. \ })
  152. else
  153. NeoBundle 'Shougo/vimproc.vim'
  154. call neobundle#config('vimproc.vim', {
  155. \ 'build' : {
  156. \ 'windows' : 'make -f make_mingw64.mak',
  157. \ 'cygwin' : 'make -f make_cygwin.mak',
  158. \ 'mac' : 'make -f make_mac.mak',
  159. \ 'unix' : 'make -f make_unix.mak',
  160. \ },
  161. \ })
  162. NeoBundle 'jnwhiteh/vim-golang'
  163. call neobundle#config('vim-golang', {
  164. \ 'lazy' : 1,
  165. \ 'autoload' : { 'filetypes' : 'go'}
  166. \ })
  167. endif
  168. NeoBundle 'Shougo/vimshell'
  169. call neobundle#config('vimshell', {
  170. \ 'lazy' : 1,
  171. \ 'autoload' : {
  172. \ 'commands' : [{ 'name' : 'VimShell',
  173. \ 'complete' : 'customlist,vimshell#complete'},
  174. \ 'VimShellExecute', 'VimShellInteractive',
  175. \ 'VimShellTerminal', 'VimShellPop'],
  176. \ 'mappings' : ['<Plug>(vimshell_switch)']
  177. \ }})
  178. NeoBundle 'basyura/J6uil.vim'
  179. call neobundle#config('J6uil.vim', {
  180. \ 'lazy' : 1,
  181. \ 'autoload' : { 'commands' : 'J6uil',
  182. \ 'unice_source' : ['J6uil/rooms', 'J6uil/members']},
  183. \ 'depends' : 'mattn/webapi-vim',
  184. \ })
  185. NeoBundle 'cespare/vim-toml'
  186. call neobundle#config ('vim-toml', {
  187. \ 'lazy' : 1,
  188. \ 'autoload' : { 'filetypes' : 'toml' }
  189. \ })
  190. NeoBundle 'cohama/agit.vim'
  191. NeoBundle 'dag/vim2hs'
  192. call neobundle#config ('vim2hs', {
  193. \ 'lazy' : 1,
  194. \ 'autoload' : { 'filetypes' : 'haskell' }
  195. \ })
  196. NeoBundle 'eagletmt/ghcmod-vim'
  197. call neobundle#config('ghcmod-vim', {
  198. \ 'lazy' : 1,
  199. \ 'autoload' : { 'filetypes' : 'haskell' }
  200. \ })
  201. if has('python')
  202. NeoBundle 'editorconfig/editorconfig-vim'
  203. endif
  204. NeoBundle 'groenewege/vim-less'
  205. call neobundle#config('vim-less', {
  206. \ 'lazy' : 1,
  207. \ 'autoload' : { 'filetypes' : 'less' }
  208. \ })
  209. NeoBundle 'haya14busa/incsearch.vim'
  210. NeoBundle 'honza/vim-snippets'
  211. NeoBundle 'itchyny/calendar.vim'
  212. NeoBundle 'itchyny/lightline.vim'
  213. NeoBundle 'jceb/vim-orgmode'
  214. call neobundle#config('vim-orgmode', {
  215. \ 'lazy' : 1,
  216. \ 'autoload' : { 'filetypes' : 'org' }
  217. \ })
  218. NeoBundle 'justinmk/vim-dirvish'
  219. if has('python')
  220. NeoBundle 'kakkyz81/evervim'
  221. endif
  222. NeoBundle 'kamichidu/unite-javaimport', ''
  223. call neobundle#config('unite-javaimport', {
  224. \ 'lazy' : 1,
  225. \ 'depends' : [
  226. \ 'kamichidu/vim-javalang', 'kamichidu/vim-javaclasspath',
  227. \ 'Shougo/unite.vim'],
  228. \ 'autoload' : { 'filetypes' : ['java', 'scala', 'clojure']}
  229. \ })
  230. NeoBundle 'kamichidu/vim-milqi', 'dev'
  231. NeoBundle 'kamichidu/vim-ref-java'
  232. call neobundle#config('vim-ref-java', {
  233. \ 'depends' : [ 'mattn/wwwrenderer-vim' ],
  234. \ })
  235. NeoBundle 'kamichidu/vim-vdbc'
  236. call neobundle#config('vim-vdbc', {
  237. \ 'depends' : ['Shougo/vimproc.vim'] ,
  238. \ 'build': {
  239. \ 'unix' : 'make -f Makefile',
  240. \ 'windows' : 'make -f Makefile.w64'
  241. \ }
  242. \ })
  243. NeoBundle 'kana/vim-smartinput'
  244. NeoBundle 'kana/vim-textobj-function'
  245. NeoBundle 'kana/vim-textobj-user'
  246. NeoBundle 'kchmck/vim-coffee-script'
  247. call neobundle#config('vim-coffee-script',{
  248. \ 'lazy' : 1,
  249. \ 'autoload' : { 'filetypes' : 'coffee' }
  250. \ })
  251. NeoBundle 'lambdalisue/vim-gita'
  252. call neobundle#config('vim-gita', {
  253. \ 'lazy': 1,
  254. \ 'autoload': { 'commands': ['Gita'] }
  255. \ })
  256. NeoBundle 'lambdalisue/vim-unified-diff'
  257. NeoBundle 'leafgarland/typescript-vim'
  258. call neobundle#config('typescript-vim', {
  259. \ 'lazy' : 1,
  260. \ 'autoload' : { 'filetypes' : 'typescript'}
  261. \ })
  262. NeoBundle 'machakann/vim-colorscheme-imas'
  263. NeoBundle 'mattn/benchvimrc-vim'
  264. call neobundle#config('benchvimrc-vim', {
  265. \ 'lazy' : 1,
  266. \ 'autoload' : { 'commands' : 'BenchVimrc' }
  267. \ })
  268. NeoBundle 'mattn/flappyvird-vim'
  269. call neobundle#config('flappyvird-vim', {
  270. \ 'lazy' : 1,
  271. \ 'autoload' : { 'commands' : 'FlappyVird' }
  272. \ })
  273. NeoBundle 'mattn/gist-vim'
  274. call neobundle#config('gist-vim', {
  275. \ 'lazy' : 1,
  276. \ 'autoload' : { 'commands' : 'Gist' }
  277. \ })
  278. NeoBundle 'mattn/libcallex-vim'
  279. NeoBundle 'mattn/sonictemplate-vim'
  280. call neobundle#config('sonictemplate-vim', {
  281. \ 'lazy' : 1,
  282. \ 'autoload' : { 'commands' : 'Template' }
  283. \ })
  284. NeoBundle 'mattn/unite-rhythmbox'
  285. call neobundle#config('unite-rhythmbox', {
  286. \ 'lazy' : 1,
  287. \ 'autoload' : { 'unite_sources' : 'rhythmbox' },
  288. \ 'depends' : 'Shougo/unite.vim'
  289. \ })
  290. NeoBundle 'mattn/webapi-vim'
  291. NeoBundle 'miyakogi/conoline.vim'
  292. NeoBundle 'osyo-manga/quickrun-hook-u-nya-'
  293. call neobundle#config('quickrun-hook-u-nya-', {
  294. \ 'depends' : 'thinca/vim-quickrun'
  295. \ })
  296. NeoBundle 'osyo-manga/quickrun-hook-vcvarsall'
  297. NeoBundle 'osyo-manga/shabadou.vim'
  298. NeoBundle 'osyo-manga/unite-filetype'
  299. call neobundle#config('unite-filetype', {
  300. \ 'lazy' : 1,
  301. \ 'autoload' : { 'unite_sources' : ['filetype', 'filetype/new']},
  302. \ 'depends' : ['Shougo/unite.vim']
  303. \ })
  304. NeoBundle 'osyo-manga/unite-highlight'
  305. call neobundle#config('unite-highlight', {
  306. \ 'lazy' : 1,
  307. \ 'autoload' : { 'unite_sources' : ['highlight']},
  308. \ 'depends' : ['Shougo/unite.vim']
  309. \ })
  310. NeoBundle 'osyo-manga/unite-quickfix'
  311. call neobundle#config('unite-quickfix', {
  312. \ 'lazy' : 1,
  313. \ 'autoload' : { 'unite_sources' : ['quickfix', 'location_list']},
  314. \ 'depends' : 'Shougo/unite.vim'
  315. \ })
  316. NeoBundle 'osyo-manga/vim-marching'
  317. call neobundle#config('vim-marching', {
  318. \ 'lazy' : 1,
  319. \ 'autoload' : { 'filetypes' : ['c', 'cpp'] },
  320. \ 'depends' : ['Shougo/vimproc.vim', 'osyo-manga/vim-reunions']
  321. \ })
  322. NeoBundle 'osyo-manga/vim-monster'
  323. call neobundle#config('vim-monster', {
  324. \ 'lazy' : 1,
  325. \ 'autoload' : { 'filetypes' : 'ruby' }
  326. \ })
  327. NeoBundle 'osyo-manga/vim-over'
  328. NeoBundle 'osyo-manga/vim-reunions'
  329. NeoBundle 'osyo-manga/vim-snowdrop'
  330. call neobundle#config('vim-snowdrop', {
  331. \ 'lazy' : 1,
  332. \ 'autoload' : { 'filetypes' : 'cpp' }
  333. \ })
  334. NeoBundle 'osyo-manga/vim-watchdogs'
  335. NeoBundle 'Quramy/tsuquyomi'
  336. call neobundle#config('tsuquyomi', {
  337. \ 'lazy' : 1,
  338. \ 'autoload' : { 'filetypes' : 'typescript'}
  339. \ })
  340. NeoBundle 'raa0121/vim-ulilith'
  341. NeoBundle 'rbtnn/colorscheme-gochiusa.vim'
  342. NeoBundle 'rbtnn/game_engine.vim'
  343. NeoBundle 'rbtnn/vimconsole.vim'
  344. call neobundle#config('vimconsole.vim', {
  345. \ 'lazy' : 1,
  346. \ 'depends' : 'thinca/vim-prettyprint',
  347. \ 'autoload' : { 'commands' : 'VimConsoleOpen' }
  348. \ })
  349. NeoBundle 'rhysd/vim-crystal'
  350. call neobundle#config('vim-crystal', {
  351. \ 'lazy' : 1,
  352. \ 'autoload' : { 'filetypes' : 'crystal' }
  353. \ })
  354. NeoBundle 'rust-lang/rust.vim'
  355. call neobundle#config('rust.vim', {
  356. \ 'lazy' : 1,
  357. \ 'autoload' : { 'filetypes' : 'rust' }
  358. \ })
  359. NeoBundle 'ryutorion/vim-itunes'
  360. NeoBundle 'slim-template/vim-slim'
  361. NeoBundle 'stephpy/vim-php-cs-fixer'
  362. call neobundle#config('vim-php-cs-fixer', {
  363. \ 'lazy' : 1,
  364. \ 'autoload' : { 'filetypes' : 'php' }
  365. \ })
  366. NeoBundle 'supermomonga/thingspast.vim'
  367. "call neobundle#config('thingspast.vim', {
  368. " \ 'build' : { 'unix' : 'bundle install' }
  369. " \ })
  370. NeoBundle 'thinca/vim-ft-clojure'
  371. call neobundle#config('vim-ft-clojure', {
  372. \ 'lazy' : 1,
  373. \ 'autoload' : { 'filetypes' : 'clojure' }
  374. \ })
  375. NeoBundle 'thinca/vim-github'
  376. call neobundle#config('vim-github', {
  377. \ 'lazy' : 1,
  378. \ 'autoload' : { 'commands' : 'Github' }
  379. \ })
  380. NeoBundle 'thinca/vim-prettyprint'
  381. call neobundle#config('vim-prettyprint', {
  382. \ 'lazy' : 1,
  383. \ 'autoload' : { 'commands' : ['PP', 'PrettyPrint']}
  384. \ })
  385. "NeoBundle 'thinca/vim-quickrun'
  386. NeoBundle 'ujihisa/vim-quickrun', 'concproc'
  387. call neobundle#config('vim-quickrun', {
  388. \ 'lazy' : 1,
  389. \ 'autoload' : {
  390. \ 'mappings' : [
  391. \ ['nxo', '<Plug>(quickrun)']],
  392. \ 'commands' : 'QuickRun',
  393. \ },
  394. \ })
  395. NeoBundle 'thinca/vim-ref'
  396. call neobundle#config('vim-ref', {
  397. \ 'lazy' : 1,
  398. \ 'autoload' : { 'commands' : ['Ref', 'RefHistory'],
  399. \ 'unite_sources' : ['ref/erlang', 'ref/man',
  400. \ 'ref/pydoc', 'ref/redis',
  401. \ 'ref/clojure',
  402. \ 'ref/refe', 'ref/webdict']}
  403. \ })
  404. NeoBundle 'thinca/vim-singleton'
  405. NeoBundle 'thinca/vim-splash'
  406. NeoBundle 'thinca/vim-textobj-function-javascript'
  407. call neobundle#config('vim-textobj-function-javascript', {
  408. \ 'depends' : ['kana/vim-textobj-function'],
  409. \ 'lazy' : 1,
  410. \ 'autoload' : { 'filetypes' : 'javascript' }
  411. \ })
  412. NeoBundle 'thinca/vim-threes'
  413. call neobundle#config('vim-threes', {
  414. \ 'lazy' : 1,
  415. \ 'autoload' : { 'commands' : 'ThreesStart' }
  416. \ })
  417. NeoBundle 'tpope/vim-cucumber'
  418. call neobundle#config('vim-cucumber', {
  419. \ 'lazy' : 1,
  420. \ 'autoload' : { 'filetypes' : 'cucumber' }
  421. \ })
  422. NeoBundle 'tsukkee/lingr-vim'
  423. call neobundle#config('lingr-vim', {
  424. \ 'lazy' : 1,
  425. \ 'autoload' : { 'commands' : 'LingrLaunch' }
  426. \ })
  427. NeoBundle 'tyru/kirikiri.vim'
  428. call neobundle#config('lingr-vim', {
  429. \ 'lazy' : 1,
  430. \ 'autoload' : { 'filetypes' : 'kscript' }
  431. \ })
  432. NeoBundle 'tyru/open-browser.vim'
  433. call neobundle#config('open-browser.vim',{
  434. \ 'lazy' : 1,
  435. \ 'autoload' : {
  436. \ 'mappings' : '<Plug>(open-browser-wwwsearch)',
  437. \ }
  438. \ })
  439. NeoBundle 'ujihisa/neco-ghc'
  440. call neobundle#config('neco-ghc', {
  441. \ 'lazy' : 1,
  442. \ 'autoload' : { 'filetypes' : 'haskell' }
  443. \ })
  444. if executable('look')
  445. NeoBundle 'ujihisa/neco-look'
  446. endif
  447. NeoBundle 'ujihisa/neoclojure.vim'
  448. call neobundle#config('neco-ghc', {
  449. \ 'lazy' : 1,
  450. \ 'autoload' : { 'filetypes' : 'clojure',
  451. \ 'unite_sources' : ['ref/neoclojure'] }
  452. \ })
  453. NeoBundle 'ujihisa/unite-colorscheme'
  454. call neobundle#config('unite-colorscheme', {
  455. \ 'lazy' : 1,
  456. \ 'autoload' : { 'unite_sources' : ['colorscheme'] }
  457. \ })
  458. NeoBundle 'ujihisa/vimshell-ssh'
  459. call neobundle#config('vimshell-ssh',{
  460. \ 'lazy' : 1,
  461. \ 'depends' : 'Shougo/vimshell',
  462. \ 'autoload' : { 'filetypes' : 'vimshell'}
  463. \ })
  464. NeoBundle 'vim-jp/cpp-vim', {
  465. \ 'lazy' : 1,
  466. \ 'autoload' : {'filetypes' : 'cpp'}
  467. \ }
  468. NeoBundle 'vim-jp/vimdoc-ja'
  469. NeoBundle 'vim-jp/vital.vim'
  470. call neobundle#config('vital.vim', {
  471. \ 'lazy' : 1,
  472. \ 'autoload' : {
  473. \ 'commands' : ['Vitalize'],
  474. \ 'functions' : ['vital#of', 'vital']
  475. \ }
  476. \ })
  477. NeoBundle 'vim-scripts/AnsiEsc.vim'
  478. NeoBundle 'vim-scripts/sudo.vim'
  479. NeoBundle 'yoppi/fluentd.vim'
  480. call neobundle#config('fluentd.vim',{
  481. \ 'lazy' : 1,
  482. \ 'autoload' : { 'filetypes' : 'fluentd'}
  483. \ })
  484. if executable('w3m')
  485. NeoBundle 'yuratomo/w3m.vim'
  486. call neobundle#config('w3m.vim',{
  487. \ 'lazy' : 1,
  488. \ 'autoload' : { 'commands' : ['W3m', 'W3mTab']}
  489. \ })
  490. endif
  491. call neobundle#end()
  492. filetype plugin indent on
  493. if has('clientserver')
  494. call singleton#enable()
  495. endif
  496. set ww+=h,l,>,<,[,]
  497. set mouse=a
  498. if !has('nvim')
  499. set ttymouse=xterm2
  500. set clipboard=unnamed
  501. endif
  502. " ,is: シェルを起動
  503. nnoremap <silent> ,is :VimShell<CR>
  504. " ,ipy: pythonを非同期で起動
  505. nnoremap <silent> ,ipy :VimShellInteractive python<CR>
  506. " ,irb: irbを非同期で起動
  507. nnoremap <silent> ,irb :VimShellInteractive irb<CR>
  508. " ,ss: 非同期で開いたインタプリタに現在の行を評価させる
  509. vmap <silent> ,ss :VimShellSendString<CR>
  510. " 選択中に,ss: 非同期で開いたインタプリタに選択行を評価させる
  511. nnoremap <silent> ,ss <S-v>:VimShellSendString<CR>
  512. " ,vs: vimshell
  513. nnoremap <silent> ,vs :tabnew +VimShell<CR>
  514. " ,vr: .vimrc
  515. nnoremap <silent> ,vr :tabnew ~/.vimrc<CR>:lcd<CR>
  516. nnoremap <silent> ,so :so ~/.vimrc<CR>
  517. nnoremap <silent> ,nu :tabnew +Unite\ neobundle/update<CR>
  518. nnoremap <silent> ,ll :tabnew +LingrLaunch<CR>
  519. nnoremap <silent> ,cw :cwindow<CR>
  520. nnoremap <Esc><Esc> :nohlsearch<CR><ESC>:HierStop<CR><ESC>
  521. nnoremap <silent> ,ts :<C-u>tab stj <C-R>=expand('<cword>')<CR><CR>
  522. map / <Plug>(incsearch-forward)
  523. map ? <Plug>(incsearch-backward)
  524. map g/ <Plug>(incsearch-stay)
  525. if neobundle#is_installed('neocomplcache')
  526. let g:neocomplcache_enable_at_startup = 1
  527. let g:neocomplcache_enable_smart_case = 1
  528. let g:neocomplcache_enable_camel_case_completion = 1
  529. let g:neocomplcache_enable_underbar_completion = 1
  530. let g:neocomplcache_min_syntax_length = 3
  531. let g:neocomplcache_lock_buffer_name_pattern = '\*ku\*'
  532. let g:neocomplcache_keyword_patterns = get(g:, 'neocomplecache_keyword_patterns', {})
  533. let g:neocomplcache_keyword_patterns['default'] = '\h\w*'
  534. endif
  535. if neobundle#is_installed('neocomplete.vim')
  536. let g:neocomplete#enable_at_startup = 1
  537. let g:neocomplete#enable_smart_case = 1
  538. let g:neocomplete#enable_camel_case_completion = 1
  539. let g:neocomplete#enable_underbar_completion = 1
  540. let g:neocomplete#min_syntax_length = 3
  541. let g:neocomplete#lock_buffer_name_pattern = '\*ku\*'
  542. let g:neocomplete#keyword_patterns = get(g:, 'neocomplete#keyword_patterns', {})
  543. let g:neocomplete#keyword_patterns['default'] = '\h\w*'
  544. let g:neocomplete#force_omni_input_patterns = get(g:, 'neocomplete#force_omni_input_patterns', {})
  545. let g:neocomplete#sources#omni#input_patterns = get(g:, 'neocomplete#sources#omni#input_patterns', {})
  546. let g:neocomplete#text_mode_filetypes = {'tex': 1, 'plaintex': 1}
  547. let g:neocomplete#force_omni_input_patterns.cpp =
  548. \ '[^.[:digit:] *\t]\%(\.\|->\)\w*\|\h\w*::\w*'
  549. let g:neocomplete#sources#omni#input_patterns.ruby = '[^. *\t]\.\|\h\w*::'
  550. let g:neocomplete#sources#omni#input_patterns.cs = '[^.]\.\%(\u\{2,}\)\?'
  551. let g:neocomplete#sources#omni#input_patterns.php = '[^. \t]->\h\w*\|\h\w*::'
  552. endif
  553. "let g:vimfiler_as_default_explorer = 1
  554. "let g:vimfiler_safe_mode_by_default = 0
  555. "let g:neocomplcache#sources#rsense#home_directory = '/opt/rsense-0.3/'
  556. let g:monster#completion#rcodetools#backend = 'async_rct_complete'
  557. let g:neosnippet#snippets_directory = '~/.vim/snippet,~/.bundle/vim-snippets/snippets'
  558. let g:pdv_template_dir = $HOME . "/.hariti/bundle/pdv/templates_snip"
  559. "tabで補完候補の選択を行う
  560. imap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
  561. imap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<S-TAB>"
  562. imap <expr><CR> neosnippet#expandable_or_jumpable() ? "\<Plug>(neosnippet_expand_or_jump)" : "\<CR>"
  563. smap <expr><TAB> neosnippet#expandable_or_jumpable() ?
  564. \ "\<Plug>(neosnippet_expand_or_jump)"
  565. \: "\<TAB>"
  566. inoremap <buffer> <C-P> <ESC>:call pdv#DocumentWithSnip()<CR>i
  567. nnoremap <buffer> <C-P> :call pdv#DocumentWithSnip()<CR>
  568. let g:OmniSharp_server_type = 'roslyn'
  569. augroup vimrc
  570. autocmd!
  571. autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
  572. autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
  573. autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
  574. autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
  575. autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
  576. autocmd FileType cs setlocal omnifunc=OmniSharp#Complete
  577. autocmd FileType clojure setlocal omnifunc=neoclojure#complete#omni
  578. autocmd FileType quickrun AnsiEsc
  579. autocmd BufNewFile,BufRead *.{md,mdwn,mkd,mkdn,mark*} setlocal filetype=markdown
  580. autocmd BufNewFile,BufRead *.gradle setlocal filetype=groovy
  581. autocmd BufNewFile,BufRead */Classes/*.{cpp,h,hpp} setlocal tags+=$HOME/ctags/cocos2dx.tags
  582. autocmd FileType php setlocal omnifunc=phpcomplete_extended#CompletePHP noexpandtab wrap tabstop=4 shiftwidth=4 tags+=$HOME/ctags/php.tags
  583. autocmd FileType smarty setlocal noexpandtab wrap tabstop=4 shiftwidth=4 softtabstop=4 tags+=$HOME/ctags/php.tags
  584. autocmd FileType java setlocal noexpandtab wrap tabstop=4 shiftwidth=4
  585. autocmd FileType ruby setlocal tags+=$HOME/ctags/ruby.tags
  586. autocmd FileType c setlocal tags+=$HOME/ctags/c.tags
  587. autocmd FileType cpp setlocal path=.,C:/msys64/mingw64/include,C:/cocos2d-x-3.6/cocos
  588. autocmd FileType diff setlocal ts=4
  589. autocmd BufNewFile Gemfile Template Gemfile
  590. autocmd User DirvishEnter let b:dirvish.showhidden = 1
  591. augroup END
  592. let g:netrw_nogx = 1
  593. nmap gx <Plug>(openbrowser-smart-search)
  594. vmap gx <Plug>(openbrowser-smart-search)
  595. let g:quickrun_config = {}
  596. let g:quickrun_config = {
  597. \ '_' : {
  598. \ 'hook/close_unite_quickfix/enable_hook_loaded' : 1,
  599. \ 'hook/unite_quickfix/enable_failure' : 1,
  600. \ 'hook/close_quickfix/enable_exit' : 1,
  601. \ 'hook/close_buffer/enable_failure' : 1,
  602. \ 'hook/close_buffer/enable_empty_data' : 1,
  603. \ 'outputter' : 'multi:buffer:quickfix',
  604. \ 'hook/u_nya_/enable' : 1,
  605. \ 'hook/sweep/enable' : 0,
  606. \ 'outputter/buffer/split' : ':botright 15sp',
  607. \ 'outputter/buffer/running_mark' : 'バン(∩`・ω・)バンバンバンバン゙ン',
  608. \ 'runner' : 'vimproc',
  609. \ 'runner/vimproc/updatetime' : 40,
  610. \ 'runner/vimproc/sleep' : 0,
  611. \ }
  612. \ }
  613. let g:quickrun_config['markdown'] = {
  614. \ 'outputter': 'browser'
  615. \}
  616. let g:quickrun_config['ruby'] = {
  617. \ 'command': 'ruby',
  618. \ 'exec': '/usr/bin/env ruby %s',
  619. \ 'tempfile': '{tempname()}.rb'
  620. \}
  621. let g:quickrun_config['clojure/neoclojure'] = {
  622. \ 'type' : 'clojure/neoclojure',
  623. \ 'runner' : 'neoclojure',
  624. \ 'command' : 'dummy',
  625. \ 'tempfile' : '%{tempname()}.clj'
  626. \}
  627. let g:quickrun_config['cpp/gcc']= {
  628. \ 'cmdopt': '-std=c++1y -Wall'
  629. \ }
  630. let g:quickrun_config['cpp/msvc2013'] = {
  631. \ 'command' : 'cl',
  632. \ 'exec': ["%c %o %s /nologo /link 'Siv3D.lib' 'kernel32.lib' " .
  633. \ "'user32.lib' 'gdi32.lib' 'winspool.lib' 'comdlg32.lib'" .
  634. \ "'advapi32.lib' 'shell32.lib' 'ole32.lib' 'oleaut32.lib'" .
  635. \ "'uuid.lib' 'odbc32.lib' 'odbccp32.lib'", '%s:p:r.exe %a'],
  636. \ 'cmdopt' : '/EHsc',
  637. \ 'hook/output_encode/encoding': 'sjis',
  638. \ 'hook/vcvarsall/enable' : 1,
  639. \ 'hook/vcvarsall/bat' : shellescape($VS120COMNTOOLS . 'vsvars32.bat')
  640. \ }
  641. let g:quickrun_config['php/watchdogs_checker'] = {
  642. \ 'type' : 'watchdogs_checker/phpcs'
  643. \ }
  644. let g:quickrun_config['vim/watchdogs_checker'] = {
  645. \ 'type' : 'watchdogs_checker/vint'
  646. \ }
  647. let g:quickrun_config['watchdogs_checker/_'] = {
  648. \ 'hook/close_quickfix/enable_exit': 1,
  649. \ 'hook/close_unite_quickfix/enable_exit' : 1,
  650. \ }
  651. let g:quickrun_config['watchdogs_checker/phpcs'] = {
  652. \ 'quickfix/errorformat': g:phpcs_errorformat,
  653. \ 'command' : g:Vimphpcs_Phpcscmd,
  654. \ 'cmdopt' : '--report=csv --standard=' . g:Vimphpcs_Standard,
  655. \ 'exec' : '%c %o %s:p',
  656. \ }
  657. let g:quickrun_config['watchdogs_checker/phpmd'] = {
  658. \ 'quickfix/errorformat': '%E%f:%l\s%#%m',
  659. \ 'command' : '$HOME/.composer/vendor/bin/phpmd',
  660. \ 'cmdopt' : 'text codesize,design,unusedcode,naming',
  661. \ 'exec' : '%c %s:p %o',
  662. \ }
  663. let g:quickrun_config['watchdogs_checker/vint'] = {
  664. \ 'command' : 'vint',
  665. \ 'exec' : '%c %o %s:p',
  666. \ }
  667. let g:watchdogs_check_BufWritePost_enable = 1
  668. let g:watchdogs_check_BufWritePost_enables = {
  669. \ 'cpp' : 0,
  670. \ 'php' : 1,
  671. \ }
  672. let g:watchdogs_check_CursorHold_enable = 1
  673. let g:watchdogs_check_CursorHold_enables = {
  674. \ 'cpp' : 0,
  675. \ 'php' : 1,
  676. \ }
  677. call watchdogs#setup(g:quickrun_config)
  678. let g:lingr_vim_user = 'raa0121'
  679. let g:J6uil_display_offline = 0
  680. let g:J6uil_display_online = 0
  681. let g:J6uil_echo_presence = 1
  682. let g:J6uil_display_icon = 0
  683. let g:J6uil_display_interval = 0
  684. let g:J6uil_updatetime = 1000
  685. let g:calendar_google_calendar = 1
  686. let g:calendar_google_task = 1
  687. let g:marching_clang_command_option='-std=c++1y'
  688. let g:marching_enable_neocomplete = 1
  689. if has('win32')
  690. let g:marching_clang_command = 'C:/msys64/mingw64/bin/clang'
  691. let g:marching_include_paths = ['C:/msys64/mingw64/include/c++/4.9.2/',
  692. \ 'C:/cocos2d-x-3.6/cocos/']
  693. let g:snowdrop#libclang_path = 'C:/msys64/mingw64/bin'
  694. else
  695. let g:marching_clang_command = '/usr/bin/clang'
  696. let g:marching_include_paths = ['/usr/include/c++/4.8.2/']
  697. let g:snowdrop#libclang_path='/usr/lib'
  698. end
  699. let g:conoline_auto_enable = 1
  700. call unite#filters#matcher_default#use(['matcher_fuzzy'])
  701. let g:unite_enable_start_insert = 0
  702. let g:unite_source_directory_mru_long_limit = 3000
  703. let g:unite_source_file_mru_filename_format = ''
  704. let g:unite_source_file_mru_long_limit = 3000
  705. let g:unite_source_history_yank_enable = 1
  706. let g:unite_split_rule = 'botright'
  707. let g:unite_winheight = 15
  708. if executable('ag')
  709. let g:unite_source_grep_command = 'ag'
  710. let g:unite_source_grep_default_opts = '--nogroup --nocolor --column'
  711. let g:unite_source_grep_recursive_opt = ''
  712. endif
  713. nnoremap <silent> ,g :<C-u>Unite grep:. -buffer-name=search-buffer<CR>
  714. nnoremap <silent> ,cg :<C-u>Unite grep:. -buffer-name=search-buffer<CR><C-R><C-W>
  715. nnoremap <silent> ,r :<C-u>UniteResume search-buffer<CR>
  716. call textobj#user#plugin('datetime', {
  717. \ 'date': {
  718. \ 'pattern': '\<\d\d\d\d-\d\d-\d\d\>',
  719. \ 'select': ['ad', 'id'],
  720. \ },
  721. \ 'time': {
  722. \ 'pattern': '\<\d\d:\d\d:\d\d\>',
  723. \ 'select': ['at', 'it'],
  724. \ },
  725. \ })
  726. set diffexpr=unified_diff#diffexpr()
  727. " configure with the followings (default values are shown below)
  728. let g:unified_diff#executable = 'git'
  729. let g:unified_diff#arguments = [
  730. \ 'diff', '--no-index', '--no-color', '--no-ext-diff', '--unified=0',
  731. \ ]
  732. let g:unified_diff#iwhite_arguments = [
  733. \ '--ignore--all-space',
  734. \ ]
  735. augroup plugin-lingr-vim
  736. autocmd!
  737. autocmd FileType lingr-messages nmap <silent> <buffer> t <Plug>(lingr-messages-show-say-buffer)
  738. autocmd FileType lingr-say let &syntax='clojure'
  739. augroup END
  740. function! s:SID_PREFIX()
  741. return matchstr(expand('<sfile>'), '<SNR>\d\+_')
  742. endfunction
  743. set titlelen=100
  744. set guioptions-=e
  745. autocmd vimrc BufEnter * let &titlestring = '%{' . s:SID_PREFIX() . 'titlestring()}'
  746. autocmd vimrc User plugin-lingr-unread let &titlestring = '%{' . s:SID_PREFIX() . 'titlestring()}'
  747. if !has('gui_running')
  748. set t_Co=256
  749. endif
  750. if exists('$TMUX') || exists('$WINDOW')
  751. set t_ts=k
  752. set t_fs=\
  753. endif
  754. function! s:titlestring()
  755. if &filetype =~? '^lingr'
  756. let &titlestring = 'lingr: ' . lingr#unread_count()
  757. else
  758. let &titlestring = bufname('')
  759. endif
  760. endfunction
  761. " tabline
  762. set showtabline=2 " always show tabline
  763. let g:lightline = {
  764. \ 'colorscheme': 'wombat',
  765. \ 'active': {
  766. \ 'left': [
  767. \ ['mode', 'paste'],
  768. \ ['fugitive', 'gitgutter', 'filename'],
  769. \ ],
  770. \ 'right': [
  771. \ ['lineinfo', 'syntastic'],
  772. \ ['percent'],
  773. \ ['charcode', 'fileformat', 'fileencoding', 'filetype'],
  774. \ ]
  775. \ },
  776. \ 'component_function': {
  777. \ 'modified': 'MyModified',
  778. \ 'readonly': 'MyReadonly',
  779. \ 'fugitive': 'MyFugitive',
  780. \ 'filename': 'MyFilename',
  781. \ 'fileformat': 'MyFileformat',
  782. \ 'filetype': 'MyFiletype',
  783. \ 'fileencoding': 'MyFileencoding',
  784. \ 'mode': 'MyMode',
  785. \ 'syntastic': 'SyntasticStatuslineFlag',
  786. \ 'charcode': 'MyCharCode',
  787. \ 'gitgutter': 'MyGitGutter',
  788. \ },
  789. \ 'separator': { 'left': "\u2b80", 'right': "\u2b82" },
  790. \ 'subseparator': { 'left': "\u2b81", 'right': "\u2b83" }
  791. \ }
  792. function! MyModified()
  793. return &ft =~? 'help\|vimfiler\|gundo' ? '' : &modified ? '+' : &modifiable ? '' : '-'
  794. endfunction
  795. function! MyReadonly()
  796. return &ft !~? 'help\|vimfiler\|gundo' && &ro ? '\u2b64' : ''
  797. endfunction
  798. function! MyFilename()
  799. return ('' !=? MyReadonly() ? MyReadonly() . ' ' : '') .
  800. \ (&ft ==? 'vimfiler' ? vimfiler#get_status_string() :
  801. \ &ft ==? 'unite' ? unite#get_status_string() :
  802. \ &ft ==? 'vimshell' ? substitute(b:vimshell.current_dir,expand('~'),'~','') :
  803. \ '' !=? expand('%:t') ? expand('%:t') : '[No Name]') .
  804. \ ('' !=? MyModified() ? ' ' . MyModified() : '')
  805. endfunction
  806. function! MyFugitive()
  807. try
  808. if &ft !~? 'vimfiler\|gundo' && exists('*fugitive#head')
  809. let l:_ = fugitive#head()
  810. return strlen(l:_) ? '⭠ '. l:_ : ''
  811. endif
  812. catch
  813. endtry
  814. return ''
  815. endfunction
  816. function! MyFileformat()
  817. return winwidth('.') > 70 ? &fileformat : ''
  818. endfunction
  819. function! MyFiletype()
  820. return winwidth('.') > 70 ? (strlen(&filetype) ? &filetype : 'no ft') : ''
  821. endfunction
  822. function! MyFileencoding()
  823. return winwidth('.') > 70 ? (strlen(&fenc) ? &fenc : &enc) : ''
  824. endfunction
  825. function! MyMode()
  826. return winwidth('.') > 60 ? lightline#mode() : ''
  827. endfunction
  828. function! MyGitGutter()
  829. if ! exists('*GitGutterGetHunkSummary')
  830. \ || ! get(g:, 'gitgutter_enabled', 0)
  831. \ || winwidth('.') <= 90
  832. return ''
  833. endif
  834. let l:symbols = [
  835. \ g:gitgutter_sign_added . ' ',
  836. \ g:gitgutter_sign_modified . ' ',
  837. \ g:gitgutter_sign_removed . ' '
  838. \ ]
  839. let l:hunks = GitGutterGetHunkSummary()
  840. let l:ret = []
  841. for l:i in [0, 1, 2]
  842. if l:hunks[l:i] > 0
  843. call add(l:ret, l:symbols[l:i] . l:hunks[l:i])
  844. endif
  845. endfor
  846. return join(l:ret, ' ')
  847. endfunction
  848. " https://github.com/Lokaltog/vim-powerline/blob/develop/autoload/Powerline/Functions.vim
  849. function! MyCharCode()
  850. if winwidth('.') <= 70
  851. return ''
  852. endif
  853. " Get the output of :ascii
  854. redir => ascii
  855. silent! ascii
  856. redir END
  857. if match(ascii, 'NUL') != -1
  858. return 'NUL'
  859. endif
  860. " Zero pad hex values
  861. let l:nrformat = '0x%02x'
  862. let l:encoding = (&fenc ==? '' ? &enc : &fenc)
  863. if l:encoding ==? 'utf-8'
  864. " Zero pad with 4 zeroes in unicode files
  865. let l:nrformat = '0x%04x'
  866. endif
  867. " Get the character and the numeric value from the return value of :ascii
  868. " This matches the two first pieces of the return value, e.g.
  869. " "<F> 70" => char: 'F', nr: '70'
  870. let [l:str, l:char, l:nr; l:rest] = matchlist(ascii, '\v\<(.{-1,})\>\s*([0-9]+)')
  871. " Format the numeric value
  872. let l:nr = printf(l:nrformat, l:nr)
  873. return "'". l:char ."' ". l:nr
  874. endfunction
  875. let &tabline = '%!' . s:SID_PREFIX() . 'tabline()'
  876. function! s:tabline()
  877. " show each tab
  878. let l:s = ''
  879. for l:i in range(1, tabpagenr('$'))
  880. let l:list = tabpagebuflist(l:i)
  881. let l:nr = tabpagewinnr(l:i)
  882. let l:current_tabnr = tabpagenr()
  883. "let title = bufname('')
  884. if l:i ==? l:current_tabnr
  885. let l:title = fnamemodify(getcwd(), ':t') . '/'
  886. "let title = bufname('')
  887. else
  888. let l:title = fnamemodify(gettabvar(l:i, 'cwd'), ':t') . '/'
  889. endif
  890. let l:title = empty(l:title) ? '[No Name]' : l:title
  891. let l:s .= l:i ==? l:current_tabnr ? '%#TabLineSel#' : '%#TabLine#'
  892. let l:s .= '%' . l:i . 'T[' . l:i . '] ' . l:title
  893. let l:s .= ' '
  894. endfor
  895. " show lingr unread count
  896. let l:lingr_unread = ''
  897. if exists('*lingr#unread_count')
  898. let l:lingr_unread_count = lingr#unread_count()
  899. if l:lingr_unread_count > 0
  900. let l:lingr_unread = '%#ErrorMsg#(' . l:lingr_unread_count . ')'
  901. elseif l:lingr_unread_count == 0
  902. let l:lingr_unread = '()'
  903. endif
  904. endif
  905. " build tabline
  906. let l:s .= '%#TabLineFill#%T%=%<[' . getcwd() . ']' . l:lingr_unread
  907. return l:s
  908. endfunction
  909. augroup vimrc-scratch-buffer
  910. autocmd!
  911. " Make a scratch buffer when unnamed buffer.
  912. autocmd BufEnter * call s:scratch_buffer()
  913. autocmd FileType qfreplace autocmd! vimrc-scratch * <buffer>
  914. function! s:scratch_buffer()
  915. if exists('b:scratch_buffer') || bufname('%') !=# '' || &l:buftype !=# ''
  916. return
  917. endif
  918. let b:scratch_buffer = 1
  919. setlocal buftype=nofile nobuflisted noswapfile bufhidden=hide
  920. augroup vimrc-scratch
  921. autocmd! * <buffer>
  922. autocmd BufWriteCmd <buffer> call s:scratch_on_BufWriteCmd()
  923. augroup END
  924. endfunction
  925. function! s:scratch_on_BufWriteCmd()
  926. silent! setl buftype< buflisted< swapfile< bufhidden< nomodified
  927. autocmd! vimrc-scratch * <buffer>
  928. if bufname('%') ==# '' && exists('b:scratch_buffer')
  929. execute 'saveas' . (v:cmdbang ? '!' : '') ' <afile>'
  930. filetype detect
  931. endif
  932. unlet! b:scratch_buffer
  933. endfunction
  934. augroup END
  935. 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
  936. let g:github_user = 'raa0121'
  937. let g:github#user = 'raa0121'