My configuration files for Debian/Ubuntu applications
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 
 
 

185 行
5.2 KiB

  1. syntax on
  2. filetype plugin indent on
  3. set ai
  4. set number
  5. set mouse=a
  6. "set breakindent
  7. set encoding=utf-8 "Added this for vim-hug
  8. set nu rnu
  9. set hidden
  10. set tabstop=4
  11. set shiftwidth=4
  12. runtime ftplugin/man.vim
  13. set keywordprg=:Man
  14. let mapleader = "s"
  15. set is
  16. "Colour settings
  17. set t_Co=256 "Use 256 colours (Use this setting only if your terminal supports 256 colours)
  18. set tgc "More terminal colours
  19. let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
  20. let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
  21. let base16colorspace=256
  22. colorscheme base16-ocean
  23. "colorscheme Tomorrow-Night
  24. "Pymode stuff
  25. let g:pymode_folding = 0
  26. "Easymotion prefix
  27. map <Leader> <Plug>(easymotion-prefix)
  28. " turn hybrid line numbers off
  29. ":set nonumber norelativenumber
  30. ":set nonu nornu
  31. " toggle hybrid line numbers
  32. ":set number! relativenumber!
  33. ":set nu! rnu!
  34. "Triggers for number toggling
  35. :augroup numbertoggle
  36. : autocmd!
  37. : autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
  38. : autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber
  39. :augroup END
  40. "CtrlP bindings
  41. nmap <leader>d :CtrlPBuffer<cr>
  42. nmap <leader>a :CtrlPMRU<cr>
  43. nmap <leader>l :CtrlPLine<cr>
  44. "NERDTree bingings
  45. nnoremap <F1> :NERDTreeToggle<cr>
  46. nnoremap <leader>t :NERDTreeToggle<cr>
  47. nnoremap <F2> :NERDTreeFocus<cr>
  48. "autocmd vimenter * NERDTree
  49. "Buffergator bindings
  50. nmap <leader>[ :BuffergatorMruCyclePrev<cr>
  51. nmap <leader>] :BuffergatorMruCycleNext<cr>
  52. nmap <leader>f :BuffergatorOpen<cr>
  53. let g:buffergator_autoexpand_on_split=0
  54. "Stuff for faster movement and aesthetics
  55. :set cursorline
  56. nnoremap <F3> :tabprevious<cr>
  57. nnoremap <F4> :tabnext<cr>
  58. nnoremap <F5> :buffers<CR>:buffer<Space>
  59. noremap <BS> <PageUp>
  60. noremap <Space> <PageDown>
  61. noremap <leader>o o<Esc>k
  62. nmap <leader>p <C-w><C-r>
  63. noremap <leader>y <C-W>w
  64. noremap <C-h> <C-W>h
  65. noremap <C-l> <C-W>l
  66. noremap <C-j> <C-W>j
  67. noremap <C-k> <C-W>k
  68. nnoremap <leader>z :wa<cr>
  69. nnoremap - :w<cr>
  70. set so=10
  71. "Copy and pasting
  72. vmap <C-c> "+y
  73. nmap <S-y> "+p
  74. set guioptions-=m "menu bar
  75. set guioptions-=T "toolbar
  76. set guicursor+=a:blinkon0 "Remove weird blinking cursor
  77. "set guioptions-=r "scrollbar
  78. nmap <leader>T :vsplit <BAR> :wincmd l <BAR> :enew <cr>
  79. "nmap <leader>bq :bp <BAR> bd #<cr>
  80. nmap <leader>:ob :OpenBookmark<cr>
  81. let g:deoplete#enable_at_startup = 1 "Enables deoplete
  82. autocmd FileType python setlocal completeopt-=preview "Romoves docwindow for Jedi-vim
  83. "Omnisharp taken from the ReadMe I think
  84. let g:OmniSharp_timeout = 5
  85. set completeopt=longest,menuone,preview
  86. set previewheight=5
  87. let g:ale_linters = { 'cs': ['OmniSharp'] }
  88. let g:OmniSharp_highlight_types = 1
  89. augroup omnisharp_commands autocmd!
  90. " air-line
  91. let g:airline_theme='tomorrow'
  92. let g:airline#extensions#tabline#enabled = 1
  93. let g:airline#extensions#tabline#tab_nr_type = 1
  94. let g:airline#extensions#tabline#show_tab_nr = 1
  95. let g:airline#extensions#tabline#buffer_nr_show = 1
  96. let g:airline#extensions#tabline#formatter = 'default'
  97. let g:airline#extensions#tabline#buffer_nr_show = 1
  98. let g:airline#extensions#tabline#fnametruncate = 16
  99. let g:airline#extensions#tabline#fnamecollapse = 2
  100. "let mapleader=","
  101. let g:airline#extensions#tabline#buffer_idx_mode = 1
  102. nmap ,1 <Plug>AirlineSelectTab1
  103. nmap ,2 <Plug>AirlineSelectTab2
  104. nmap ,3 <Plug>AirlineSelectTab3
  105. nmap ,4 <Plug>AirlineSelectTab4
  106. nmap ,5 <Plug>AirlineSelectTab5
  107. nmap ,6 <Plug>AirlineSelectTab6
  108. nmap ,7 <Plug>AirlineSelectTab7
  109. nmap ,8 <Plug>AirlineSelectTab8
  110. nmap ,9 <Plug>AirlineSelectTab9
  111. let g:airline_powerline_fonts = 1
  112. if !exists('g:airline_symbols')
  113. let g:airline_symbols = {}
  114. endif
  115. " unicode symbols
  116. let g:airline_left_sep = '»'
  117. let g:airline_left_sep = '▶'
  118. let g:airline_right_sep = '«'
  119. let g:airline_right_sep = '◀'
  120. let g:airline_symbols.linenr = '␊'
  121. let g:airline_symbols.linenr = '␤'
  122. let g:airline_symbols.linenr = '¶'
  123. let g:airline_symbols.branch = '⎇'
  124. let g:airline_symbols.paste = 'ρ'
  125. let g:airline_symbols.paste = 'Þ'
  126. let g:airline_symbols.paste = '∥'
  127. let g:airline_symbols.whitespace = 'Ξ'
  128. " airline symbols
  129. let g:airline_left_sep = ''
  130. let g:airline_left_alt_sep = ''
  131. let g:airline_right_sep = ''
  132. let g:airline_right_alt_sep = ''
  133. let g:airline_symbols.branch = ''
  134. let g:airline_symbols.readonly = ''
  135. let g:airline_symbols.linenr = ''
  136. "Folding
  137. nnoremap <leader>6 :setlocal fdm=indent<cr>
  138. nnoremap <leader>7 :setlocal fdm=marker<cr>
  139. nnoremap <leader>8 :setlocal fdm=expr<cr>:set foldexpr=getline(v:lnum)=~'^\\s*$'&&getline(v:lnum+1)=~'\\S'?'<1':1<cr>
  140. set foldmethod=indent
  141. set foldlevelstart=1
  142. autocmd FileType vim setlocal foldmethod=marker
  143. autocmd FileType '' setlocal fdm=expr foldexpr=getline(v:lnum)=~'^\\s*$'&&getline(v:lnum+1)=~'\\S'?'<1':1
  144. let javaScript_fold=1 " JavaScript
  145. let perl_fold=1 " Perl
  146. let php_folding=1 " PHP
  147. let r_syntax_folding=1 " R
  148. let ruby_fold=1 " Ruby
  149. let sh_fold_enabled=1 " sh
  150. let vimsyn_folding='af' " Vim script
  151. let xml_syntax_folding=1 " XML
  152. "ctrlp and buffgator custom stuff
  153. let g:ctrlp_custom_ignore = {
  154. \ 'dir': '\v[\/](\.(git|hg|svn)|\_site)$',
  155. \ 'file': '\v\.(exe|so|dll|class|png|jpg|jpeg)$',
  156. \}
  157. let g:ctrlp_working_path_mode = 'r' " Use the nearest .git directory as the cwd
  158. let g:buffergator_viewport_split_policy = 'R' " Use the right side of the screen
  159. let g:buffergator_suppress_keymaps = 1 " I want my own keymappings...