.vimrc 22 KB

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