My configuration files for Debian/Ubuntu applications
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  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. set tw=80
  17. set so=10
  18. "Colour settings
  19. set t_Co=256 "Use 256 colours (Use this setting only if your terminal supports 256 colours)
  20. set tgc "More terminal colours
  21. let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
  22. let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
  23. let base16colorspace=256
  24. colorscheme base16-mocha
  25. "Pymode stuff
  26. let g:pymode_folding = 0
  27. " turn hybrid line numbers off
  28. ":set nonumber norelativenumber
  29. ":set nonu nornu
  30. " toggle hybrid line numbers
  31. ":set number! relativenumber!
  32. ":set nu! rnu!
  33. "Triggers for number toggling
  34. :augroup numbertoggle
  35. : autocmd!
  36. : autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
  37. : autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber
  38. :augroup END
  39. "CtrlP bindings
  40. nmap <leader>d :CtrlPBuffer<cr>
  41. nmap <leader>m :CtrlPMRU<cr>
  42. nmap <leader>L :CtrlPLine<cr>
  43. "NERDTree bingings
  44. nnoremap <F1> :NERDTreeToggle<cr>
  45. nnoremap <leader>t :NERDTreeFind<cr>
  46. "autocmd vimenter * NERDTree
  47. "Buffergator bindings
  48. nmap gb :BuffergatorMruCyclePrev<cr>
  49. nmap gn :BuffergatorMruCycleNext<cr>
  50. nmap gto :BuffergatorTabsOpen<cr>
  51. nmap gtc :BuffergatorTabsOpen<cr>
  52. nmap gfo :BuffergatorOpen<cr>
  53. nmap gfc :BuffergatorClose<cr>
  54. let g:buffergator_autoexpand_on_split=0
  55. "Stuff for faster movement and aesthetics
  56. :set cursorline
  57. nnoremap <leader>cd :cd %:p:h<cr>
  58. nnoremap <F3> :tabprevious<cr>
  59. nnoremap <F4> :tabnext<cr>
  60. nnoremap <F5> :buffers<CR>:buffer<Space>
  61. noremap <BS> <PageUp>
  62. noremap <Space> <PageDown>
  63. noremap <C-h> <C-W>h
  64. noremap <C-l> <C-W>l
  65. noremap <C-j> <C-W>j
  66. noremap <C-k> <C-W>k
  67. nnoremap <leader>z :w<cr>
  68. nnoremap <leader>c :CtrlPChange<cr>
  69. nnoremap <leader>C :CtrlPChangeAll<cr>
  70. nnoremap <leader><cr> :center<cr>
  71. inoremap jj <esc>
  72. "Easymotion
  73. map <Leader> <Plug>(easymotion-prefix)
  74. map / <Plug>(easymotion-sn)
  75. omap / <Plug>(easymotion-tn)
  76. map n <Plug>(easymotion-next)
  77. map N <Plug>(easymotion-prev)
  78. map <leader>ls <Plug>(easymotion-sl)
  79. map <leader>lf <Plug>(easymotion-bd-fl)
  80. map <leader>lw <Plug>(easymotion-bd-wl)
  81. map <leader>ol <Plug>(easymotion-overwin-line)
  82. map <leader>ow <Plug>(easymotion-overwin-w)
  83. nmap <leader>of <Plug>(easymotion-overwin-f2)
  84. nmap <leader>aw <Plug>(easymotion-bd-w)
  85. nmap <leader>al <Plug>(easymotion-bd-jk)
  86. let g:EasyMotion_smartcase = 1 " Infer search casing
  87. let g:EasyMotion_startofline = 0 " keep cursor column when JK motion
  88. "Copy and pasting
  89. vmap <C-c> "+y
  90. nmap <S-y> "+p
  91. set guioptions-=m "menu bar
  92. set guioptions-=T "toolbar
  93. set guicursor+=a:blinkon0 "Remove weird blinking cursor
  94. "set guioptions-=r "scrollbar
  95. nmap <leader>T :vsplit <BAR> :wincmd l <BAR> :enew <cr>
  96. "nmap <leader>bq :bp <BAR> bd #<cr>
  97. nmap <leader>:ob :OpenBookmark<cr>
  98. let g:deoplete#enable_at_startup = 1 "Enables deoplete
  99. autocmd FileType python setlocal completeopt-=preview "Romoves docwindow for Jedi-vim
  100. "Omnisharp taken from the ReadMe I think
  101. let g:OmniSharp_timeout = 5
  102. set completeopt=longest,menuone,preview
  103. set previewheight=5
  104. let g:ale_linters = { 'cs': ['OmniSharp'] }
  105. let g:OmniSharp_highlight_types = 1
  106. augroup omnisharp_commands autocmd!
  107. " air-line
  108. let g:airline_theme='tomorrow'
  109. let g:airline#extensions#tabline#enabled = 1
  110. let g:airline#extensions#tabline#tab_nr_type = 1
  111. let g:airline#extensions#tabline#show_tab_nr = 1
  112. let g:airline#extensions#tabline#buffer_nr_show = 1
  113. let g:airline#extensions#tabline#formatter = 'default'
  114. let g:airline#extensions#tabline#buffer_nr_show = 1
  115. let g:airline#extensions#tabline#fnametruncate = 16
  116. let g:airline#extensions#tabline#fnamecollapse = 2
  117. "let mapleader=","
  118. let g:airline#extensions#tabline#buffer_idx_mode = 1
  119. nmap g1 <Plug>AirlineSelectTab1
  120. nmap g2 <Plug>AirlineSelectTab2
  121. nmap g3 <Plug>AirlineSelectTab3
  122. nmap g4 <Plug>AirlineSelectTab4
  123. nmap g5 <Plug>AirlineSelectTab5
  124. nmap g6 <Plug>AirlineSelectTab6
  125. nmap g7 <Plug>AirlineSelectTab7
  126. nmap g8 <Plug>AirlineSelectTab8
  127. nmap g9 <Plug>AirlineSelectTab9
  128. let g:airline_powerline_fonts = 1
  129. if !exists('g:airline_symbols')
  130. let g:airline_symbols = {}
  131. endif
  132. " unicode symbols
  133. let g:airline_left_sep = '»'
  134. let g:airline_left_sep = '▶'
  135. let g:airline_right_sep = '«'
  136. let g:airline_right_sep = '◀'
  137. let g:airline_symbols.linenr = '␊'
  138. let g:airline_symbols.linenr = '␤'
  139. let g:airline_symbols.linenr = '¶'
  140. let g:airline_symbols.branch = '⎇'
  141. let g:airline_symbols.paste = 'ρ'
  142. let g:airline_symbols.paste = 'Þ'
  143. let g:airline_symbols.paste = '∥'
  144. let g:airline_symbols.whitespace = 'Ξ'
  145. " airline symbols
  146. let g:airline_left_sep = ''
  147. let g:airline_left_alt_sep = ''
  148. let g:airline_right_sep = ''
  149. let g:airline_right_alt_sep = ''
  150. let g:airline_symbols.branch = ''
  151. let g:airline_symbols.readonly = ''
  152. let g:airline_symbols.linenr = ''
  153. "Folding
  154. nnoremap <leader>6 :setlocal fdm=indent<cr>
  155. nnoremap <leader>7 :setlocal fdm=marker<cr>
  156. nnoremap <leader>8 :setlocal fdm=expr<cr>:set foldexpr=getline(v:lnum)=~'^\\s*$'&&getline(v:lnum+1)=~'\\S'?'<1':1<cr>
  157. set foldmethod=indent
  158. set foldlevelstart=1
  159. autocmd FileType vim setlocal foldmethod=marker
  160. autocmd FileType '' setlocal fdm=expr foldexpr=getline(v:lnum)=~'^\\s*$'&&getline(v:lnum+1)=~'\\S'?'<1':1
  161. let javaScript_fold=1 " JavaScript
  162. let perl_fold=1 " Perl
  163. let php_folding=1 " PHP
  164. let r_syntax_folding=1 " R
  165. let ruby_fold=1 " Ruby
  166. let sh_fold_enabled=1 " sh
  167. let vimsyn_folding='af' " Vim script
  168. let xml_syntax_folding=1 " XML
  169. "ctrlp and buffgator custom stuff
  170. let g:ctrlp_switch_buffer = 'E'
  171. let g:ctrlp_custom_ignore = {
  172. \ 'dir': '\v[\/](\.(git|hg|svn)|\_site|node_modules)$',
  173. \ 'file': '\v\.(exe|so|dll|class|png|jpg|jpeg)$',
  174. \}
  175. let g:ctrlp_working_path_mode = 'r' " Use the nearest .git directory as the cwd
  176. let g:buffergator_viewport_split_policy = 'R' " Use the right side of the screen
  177. let g:buffergator_suppress_keymaps = 1 " I want my own keymappings...
  178. "Programming specific
  179. "let g:auto_save_postsave_hook = 'silent !npx browser-sync reload &'
  180. " let g:go_def_mode='gopls'
  181. " let g:go_info_mode='gopls'
  182. "NNN
  183. "let g:nnn#layout = { 'left': '~20%' } " or right, up, down
  184. let g:nnn#layout = { 'window': { 'width': 0.9, 'height': 0.6, 'highlight': 'Debug' } }
  185. let g:nnn#action = {
  186. \ '<c-t>': 'tab split',
  187. \ '<c-x>': 'split',
  188. \ '<c-v>': 'vsplit' }
  189. let $NNN_BMS='h:~/;c:~/.config;n:~/Notes;'
  190. let $NNN_PLUG='p:preview-tui;c:x2sel;i:imgview;s:tmspawn'
  191. "let $NNN_FIFO=/tmp/nnn.fifo
  192. " Prettier settings
  193. " let g:prettier#config#config_precedence = 'file-override'
  194. let g:prettier#autoformat = 1
  195. let g:prettier#autoformat_require_pragma = 0
  196. let g:prettier#config#tab_width = 4
  197. " let g:prettier#config#use_tabs = 'false'