My configuration files for Debian/Ubuntu applications
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 
 

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