My configuration files for Debian/Ubuntu applications
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 
 

217 wiersze
6.3 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. " hi Normal guibg=NONE ctermbg=NONE
  17. "Colour settings
  18. set t_Co=256 "Use 256 colours (Use this setting only if your terminal supports 256 colours)
  19. set tgc "More terminal colours
  20. let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
  21. let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
  22. let base16colorspace=256
  23. colorscheme base16-atelier-savanna-light
  24. "colorscheme Tomorrow-Night
  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. nnoremap <F2> :NERDTreeFocus<cr>
  47. "autocmd vimenter * NERDTree
  48. "Buffergator bindings
  49. nmap gb :BuffergatorMruCyclePrev<cr>
  50. nmap gn :BuffergatorMruCycleNext<cr>
  51. nmap gto :BuffergatorTabsOpen<cr>
  52. nmap gtc :BuffergatorTabsOpen<cr>
  53. nmap gfo :BuffergatorOpen<cr>
  54. nmap gfc :BuffergatorClose<cr>
  55. let g:buffergator_autoexpand_on_split=0
  56. "Stuff for faster movement and aesthetics
  57. :set cursorline
  58. nnoremap <leader>cd :cd %:p:h<cr>
  59. nnoremap <F3> :tabprevious<cr>
  60. nnoremap <F4> :tabnext<cr>
  61. nnoremap <F5> :buffers<CR>:buffer<Space>
  62. noremap <BS> <PageUp>
  63. noremap <Space> <PageDown>
  64. nmap <leader>p <C-w><C-r>
  65. noremap <leader>y <C-W>w
  66. noremap <C-h> <C-W>h
  67. noremap <C-l> <C-W>l
  68. noremap <C-j> <C-W>j
  69. noremap <C-k> <C-W>k
  70. nnoremap <leader>z :wa<cr>
  71. set so=10
  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. "Copy and pasting
  87. vmap <C-c> "+y
  88. nmap <S-y> "+p
  89. set guioptions-=m "menu bar
  90. set guioptions-=T "toolbar
  91. set guicursor+=a:blinkon0 "Remove weird blinking cursor
  92. "set guioptions-=r "scrollbar
  93. nmap <leader>T :vsplit <BAR> :wincmd l <BAR> :enew <cr>
  94. "nmap <leader>bq :bp <BAR> bd #<cr>
  95. nmap <leader>:ob :OpenBookmark<cr>
  96. let g:deoplete#enable_at_startup = 1 "Enables deoplete
  97. autocmd FileType python setlocal completeopt-=preview "Romoves docwindow for Jedi-vim
  98. "Omnisharp taken from the ReadMe I think
  99. let g:OmniSharp_timeout = 5
  100. set completeopt=longest,menuone,preview
  101. set previewheight=5
  102. let g:ale_linters = { 'cs': ['OmniSharp'] }
  103. let g:OmniSharp_highlight_types = 1
  104. augroup omnisharp_commands autocmd!
  105. " air-line
  106. let g:airline_theme='tomorrow'
  107. let g:airline#extensions#tabline#enabled = 1
  108. let g:airline#extensions#tabline#tab_nr_type = 1
  109. let g:airline#extensions#tabline#show_tab_nr = 1
  110. let g:airline#extensions#tabline#buffer_nr_show = 1
  111. let g:airline#extensions#tabline#formatter = 'default'
  112. let g:airline#extensions#tabline#buffer_nr_show = 1
  113. let g:airline#extensions#tabline#fnametruncate = 16
  114. let g:airline#extensions#tabline#fnamecollapse = 2
  115. "let mapleader=","
  116. let g:airline#extensions#tabline#buffer_idx_mode = 1
  117. nmap g1 <Plug>AirlineSelectTab1
  118. nmap g2 <Plug>AirlineSelectTab2
  119. nmap g3 <Plug>AirlineSelectTab3
  120. nmap g4 <Plug>AirlineSelectTab4
  121. nmap g5 <Plug>AirlineSelectTab5
  122. nmap g6 <Plug>AirlineSelectTab6
  123. nmap g7 <Plug>AirlineSelectTab7
  124. nmap g8 <Plug>AirlineSelectTab8
  125. nmap g9 <Plug>AirlineSelectTab9
  126. let g:airline_powerline_fonts = 1
  127. if !exists('g:airline_symbols')
  128. let g:airline_symbols = {}
  129. endif
  130. " unicode symbols
  131. let g:airline_left_sep = '»'
  132. let g:airline_left_sep = '▶'
  133. let g:airline_right_sep = '«'
  134. let g:airline_right_sep = '◀'
  135. let g:airline_symbols.linenr = '␊'
  136. let g:airline_symbols.linenr = '␤'
  137. let g:airline_symbols.linenr = '¶'
  138. let g:airline_symbols.branch = '⎇'
  139. let g:airline_symbols.paste = 'ρ'
  140. let g:airline_symbols.paste = 'Þ'
  141. let g:airline_symbols.paste = '∥'
  142. let g:airline_symbols.whitespace = 'Ξ'
  143. " airline symbols
  144. let g:airline_left_sep = ''
  145. let g:airline_left_alt_sep = ''
  146. let g:airline_right_sep = ''
  147. let g:airline_right_alt_sep = ''
  148. let g:airline_symbols.branch = ''
  149. let g:airline_symbols.readonly = ''
  150. let g:airline_symbols.linenr = ''
  151. "Folding
  152. nnoremap <leader>6 :setlocal fdm=indent<cr>
  153. nnoremap <leader>7 :setlocal fdm=marker<cr>
  154. nnoremap <leader>8 :setlocal fdm=expr<cr>:set foldexpr=getline(v:lnum)=~'^\\s*$'&&getline(v:lnum+1)=~'\\S'?'<1':1<cr>
  155. set foldmethod=indent
  156. set foldlevelstart=1
  157. autocmd FileType vim setlocal foldmethod=marker
  158. autocmd FileType '' setlocal fdm=expr foldexpr=getline(v:lnum)=~'^\\s*$'&&getline(v:lnum+1)=~'\\S'?'<1':1
  159. let javaScript_fold=1 " JavaScript
  160. let perl_fold=1 " Perl
  161. let php_folding=1 " PHP
  162. let r_syntax_folding=1 " R
  163. let ruby_fold=1 " Ruby
  164. let sh_fold_enabled=1 " sh
  165. let vimsyn_folding='af' " Vim script
  166. let xml_syntax_folding=1 " XML
  167. "ctrlp and buffgator custom stuff
  168. let g:ctrlp_switch_buffer = 'E'
  169. let g:ctrlp_custom_ignore = {
  170. \ 'dir': '\v[\/](\.(git|hg|svn)|\_site|node_modules)$',
  171. \ 'file': '\v\.(exe|so|dll|class|png|jpg|jpeg)$',
  172. \}
  173. let g:ctrlp_working_path_mode = 'r' " Use the nearest .git directory as the cwd
  174. let g:buffergator_viewport_split_policy = 'R' " Use the right side of the screen
  175. let g:buffergator_suppress_keymaps = 1 " I want my own keymappings...
  176. "Programming specific
  177. "let g:auto_save_postsave_hook = 'silent !npx browser-sync reload &'
  178. " let g:go_def_mode='gopls'
  179. " let g:go_info_mode='gopls'
  180. "NNN
  181. "let g:nnn#layout = { 'left': '~20%' } " or right, up, down
  182. let g:nnn#layout = { 'window': { 'width': 0.9, 'height': 0.6, 'highlight': 'Debug' } }
  183. let g:nnn#action = {
  184. \ '<c-t>': 'tab split',
  185. \ '<c-x>': 'split',
  186. \ '<c-v>': 'vsplit' }
  187. let $NNN_BMS='h:~/;c:~/.config;n:~/Notes;'
  188. let $NNN_PLUG='p:preview-tui;c:x2sel;i:imgview;s:tmspawn'
  189. "let $NNN_FIFO=/tmp/nnn.fifo