Advertisement
Guest User

Untitled

a guest
Dec 11th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 6.93 KB | None | 0 0
  1. "     __   _(_)_ __ ___  _ __ ___
  2. "      \ \ / / | '_ ` _ \| '__/ __|
  3. "       \ V /| | | | | | | | | (__
  4. "      (_)_/ |_|_| |_| |_|_|  \___|
  5. "
  6.  
  7. " Who cares about vi?
  8. set nocompatible
  9.  
  10. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  11. "                 GUI
  12. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  13.  
  14. if has('gui_running')
  15.     set guioptions-=m
  16.     set guioptions-=T
  17.     set guioptions-=r
  18.     set guioptions-=L
  19.     set guioptions+=c
  20.     set guifont=Consolas\ for\ Powerline\ 15
  21.  
  22.     set t_Co=256
  23. endif
  24.  
  25. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  26. "               General
  27. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  28.  
  29. set number
  30. set relativenumber
  31. set showcmd
  32. set autoread
  33. set autochdir
  34.  
  35. set nohidden
  36. set noswapfile
  37. set nobackup
  38. set nowritebackup
  39.  
  40. set wildignore+=.git,.hg,.svn,*.o,*.aux,*.png,*.jpg,*.pdf
  41.  
  42. set nofoldenable
  43. syntax on
  44.  
  45. " Make backspace work like other editors.
  46. set backspace=indent,eol,start
  47.  
  48. " Disable Ex mode.
  49. nnoremap Q <nop>
  50.  
  51. let g:tex_flavor="latex"
  52.  
  53. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  54. "               Bundles
  55. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  56.  
  57. if has('vim_starting')
  58.     set runtimepath+=~/.vim/bundle/neobundle.vim/
  59. endif
  60.  
  61. call neobundle#begin(expand('~/.vim/bundle/'))
  62.  
  63. NeoBundle 'Shougo/neobundle.vim'
  64.  
  65. " Interface.
  66. NeoBundle 'airblade/vim-gitgutter'
  67. NeoBundle 'vim-airline/vim-airline'
  68. NeoBundle 'vim-airline/vim-airline-themes'
  69. NeoBundle 'nanotech/jellybeans.vim'
  70. NeoBundle 'ctrlpvim/ctrlp.vim'
  71.  
  72. " Text.
  73. NeoBundle 'ciaranm/detectindent'
  74. "NeoBundle 'lyokha/vim-xkbswitch'
  75. NeoBundle 'scrooloose/nerdcommenter'
  76. NeoBundle 'terryma/vim-multiple-cursors'
  77. NeoBundle 'jiangmiao/auto-pairs'
  78. NeoBundle 'dyng/ctrlsf.vim'
  79.  
  80. " Integrations.
  81. NeoBundle 'dbext.vim'
  82. NeoBundle 'tpope/vim-fugitive'
  83. NeoBundle 'airblade/vim-rooter'
  84. NeoBundle 'metakirby5/codi.vim'
  85.  
  86. " Languages.
  87. NeoBundle 'lervag/vimtex'
  88. NeoBundle 'cespare/vim-toml'
  89. NeoBundle 'pangloss/vim-javascript'
  90. NeoBundle 'petRUShka/vim-opencl'
  91. NeoBundle 'rust-lang/rust.vim'
  92. NeoBundle 'tikhomirov/vim-glsl'
  93. NeoBundle 'maksimr/vim-yate'
  94. NeoBundle 'hynek/vim-python-pep8-indent'
  95. NeoBundle 'mustache/vim-mustache-handlebars'
  96.  
  97. call neobundle#end()
  98. NeoBundleCheck
  99.  
  100. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  101. "             Indentation
  102. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  103.  
  104. set smarttab
  105. set tabstop=4
  106. set shiftwidth=4
  107. set expandtab
  108.  
  109. " Auto indent pasted text.
  110. nnoremap p p=`]<C-o>
  111. nnoremap P P=`]<C-o>
  112.  
  113. filetype plugin indent on
  114.  
  115. " Display tabs and trailing spaces visually.
  116. set list listchars=tab:\ \ ,trail:·
  117.  
  118. set nowrap
  119. set linebreak
  120.  
  121. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  122. "              Scrolling
  123. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  124.  
  125. set scrolloff=8
  126. set sidescrolloff=5
  127. set sidescroll=1
  128.  
  129. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  130. "               Search
  131. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  132.  
  133. set incsearch
  134. set hlsearch
  135. set ignorecase
  136. set smartcase
  137.  
  138. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  139. "              Spelling
  140. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  141.  
  142. set nospell
  143. set spellfile=~/.vim/spell/shit.utf-8.add
  144. set spelllang=en,ru
  145.  
  146. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  147. "             Appearance
  148. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  149.  
  150. set background=dark
  151. colorscheme jellybeans
  152.  
  153. " Lines.
  154. set colorcolumn=100
  155. set cursorline
  156. set synmaxcol=900
  157.  
  158. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  159. "               Splits
  160. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  161.  
  162. set splitbelow
  163. set splitright
  164.  
  165. " Easy movement.
  166. nnoremap <C-j> <C-w>j
  167. nnoremap <C-k> <C-w>k
  168. nnoremap <C-l> <C-w>l
  169. nnoremap <C-h> <C-w>h
  170.  
  171. if has('nvim')
  172.     autocmd BufWinEnter,WinEnter term://* startinsert
  173.  
  174.     tnoremap <ESC> <C-\><C-n>
  175.     tnoremap <C-j> <C-\><C-n><C-w>j
  176.     tnoremap <C-k> <C-\><C-n><C-w>k
  177.     tnoremap <C-l> <C-\><C-n><C-w>l
  178.     tnoremap <C-h> <C-\><C-n><C-w>h
  179. endif
  180.  
  181. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  182. "         Move up/down lines
  183. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  184.  
  185. nnoremap <A-j> :m .+1<CR>==
  186. nnoremap <A-k> :m .-2<CR>==
  187. inoremap <A-j> <Esc>:m .+1<CR>==gi
  188. inoremap <A-k> <Esc>:m .-2<CR>==gi
  189. vnoremap <A-j> :m '>+1<CR>gv=gv
  190. vnoremap <A-k> :m '<-2<CR>gv=gv
  191.  
  192. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  193. "               airline
  194. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  195.  
  196. set laststatus=2
  197. set showtabline=2
  198. set noshowmode
  199.  
  200. let g:airline_theme='jellybeans'
  201. let g:airline_section_c='%t'
  202.  
  203. let g:airline#extensions#tabline#enabled=1
  204. let g:airline#extensions#tabline#show_buffers=0
  205. "TODO: show project name in tab
  206.  
  207. let g:airline_powerline_fonts=1
  208. let g:airline_left_sep='⮀'
  209. let g:airline_left_alt_sep='⮁'
  210. let g:airline_right_sep='⮂'
  211. let g:airline_right_alt_sep='⮃'
  212.  
  213. if !exists('g:airline_symbols')
  214.     let g:airline_symbols={}
  215. endif
  216.  
  217. let g:airline_symbols.branch='⭠'
  218. let g:airline_symbols.readonly='⭤'
  219. let g:airline_symbols.linenr='⭡'
  220.  
  221. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  222. "               javascript
  223. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  224.  
  225. let g:javascript_plugin_jsdoc=1
  226. let g:javascript_plugin_flow=1
  227.  
  228. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  229. "               xkbswitch
  230. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  231.  
  232. let g:XkbSwitchEnabled=1
  233. let g:XkbSwitchIMappings=['ru']
  234.  
  235. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  236. "                dbext
  237. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  238.  
  239. let g:dbext_default_window_use_horiz=0
  240. let g:dbext_default_window_width=60
  241. let g:dbext_default_window_increment=50
  242.  
  243. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  244. "                CtrlP
  245. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  246.  
  247. let g:ctrlp_user_command=['.git', 'cd %s && git ls-files -co --exclude-standard', 'cd %s && fd']
  248. let g:ctrlp_root_markers=['package.json', 'Cargo.toml']
  249. let g:ctrlp_working_path_mode='rc'
  250.  
  251. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  252. "                CtrlSF
  253. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  254.  
  255. let g:ctrlsf_winsize = '35%'
  256.  
  257. nmap     <C-F>f <Plug>CtrlSFPrompt
  258. vmap     <C-F>f <Plug>CtrlSFVwordPath
  259. vmap     <C-F>F <Plug>CtrlSFVwordExec
  260. nmap     <C-F>n <Plug>CtrlSFCwordPath
  261. nmap     <C-F>p <Plug>CtrlSFPwordPath
  262. nnoremap <C-F>o :CtrlSFOpen<CR>
  263. nnoremap <C-F>t :CtrlSFToggle<CR>
  264. inoremap <C-F>t <Esc>:CtrlSFToggle<CR>
  265.  
  266. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  267. "                Rooter
  268. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  269.  
  270. let g:rooter_silent_chdir=1
  271. let g:rooter_patterns=['.git/', 'package.json', 'Cargo.toml']
  272.  
  273. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  274. "                 Codi
  275. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  276.  
  277. "let g:codi#log='/tmp/codi_log'
  278.  
  279. let g:codi#interpreters = {
  280.     \ 'javascript': {
  281.         \ 'bin': ['/home/.nvm/versions/node/v6.9.2/bin/node', '-e', 'require("repl").start({ignoreUndefined: true, useGlobal: true})'],
  282.         \ 'prompt': '^\(>\|\.\.\.\+\) ',
  283.     \ },
  284. \ }
  285.  
  286. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  287. "               Projects
  288. "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  289.  
  290. augroup projects
  291.     au FileType tex,markdown setlocal wrap spell cc=0 nonu nornu
  292.     au FileType yate setlocal smartindent
  293. augroup END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement