Dotfiles for my tiling window manager + terminal workflow.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 lines
2.5 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. " set x=y {{{ "
  2. set relativenumber
  3. set background=dark
  4. " set background=light
  5. " set t_Co=256
  6. filetype plugin on
  7. syntax on
  8. set tabstop=4
  9. set tw=80
  10. set colorcolumn=80
  11. set shiftwidth=4
  12. set autoindent
  13. set mouse=c
  14. set clipboard=unnamedplus
  15. set foldmethod=marker
  16. " }}} set x=y "
  17. autocmd VimResized * wincmd =
  18. autocmd BufNewFile,BufRead .*_aliases set syntax=sh
  19. " vim-plug {{{ "
  20. " plug auto-install
  21. if empty(glob('~/.vim/autoload/plug.vim'))
  22. silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
  23. \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  24. autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
  25. endif
  26. call plug#begin('~/.vim/plugged')
  27. Plug 'vim-scripts/L9'
  28. " Plug 'vim-scripts/FuzzyFinder'
  29. Plug 'whatyouhide/vim-gotham'
  30. Plug 'nathanaelkane/vim-indent-guides'
  31. Plug 'flazz/vim-colorschemes'
  32. Plug '907th/vim-auto-save'
  33. let g:auto_save = 1
  34. Plug 'xuhdev/vim-latex-live-preview', { 'for': 'tex' }
  35. Plug 'lervag/vimtex'
  36. Plug 'Valloric/YouCompleteMe'
  37. Plug 'Kevin-Mok/vim-snippets'
  38. Plug 'SirVer/ultisnips'
  39. Plug 'ervandew/supertab'
  40. Plug 'scrooloose/nerdcommenter'
  41. let g:NERDTrimTrailingWhitespace = 1
  42. let g:NERDSpaceDelims = 1
  43. Plug 'xolox/vim-misc'
  44. Plug 'xolox/vim-colorscheme-switcher'
  45. " }}} vim-plug "
  46. " YCM/UltiSnips {{{ "
  47. " make YCM compatible with UltiSnips (using supertab)
  48. let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
  49. let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>']
  50. let g:SuperTabDefaultCompletionType = '<C-n>'
  51. " better key bindings for UltiSnipsExpandTrigger
  52. let g:UltiSnipsExpandTrigger = "<tab>"
  53. let g:UltiSnipsJumpForwardTrigger = "<tab>"
  54. let g:UltiSnipsJumpBackwardTrigger = "<C-tab>"
  55. " }}} YCM/UltiSnips "
  56. call plug#end()
  57. colorscheme gotham256
  58. " Mappings {{{ "
  59. map <F3> :wa<CR>
  60. map <F4> :wqa<CR>
  61. map <F5> :qa!<CR>
  62. map <F7> :AutoSaveToggle<CR>
  63. set pastetoggle=<F9>
  64. map <S-Enter> O<ESC>
  65. let mapleader="\<Space>"
  66. nnoremap <leader>e o<ESC>
  67. nnoremap <leader>f za
  68. nnoremap <leader>ff :set foldmethod=marker<CR> zM
  69. nnoremap <leader>m :call cursor(0, len(getline('.'))/2)<CR>
  70. nnoremap <leader>p :LLPStartPreview<CR>
  71. nnoremap <leader>pli :PlugInstall<CR>
  72. nnoremap <leader>plc :PlugClean<CR>
  73. nnoremap <leader>plu :PlugUpdate<CR>
  74. nnoremap <leader>r :.,.+s///g<left><left><left><left><left>
  75. nnoremap <leader>s :set syn=sh<CR>
  76. " }}} Mappings "
  77. " Local Mappings {{{ "
  78. let maplocalleader="-"
  79. autocmd Filetype c inoremap <localleader>s struct pixel
  80. autocmd Filetype tex inoremap <localleader>t $T$
  81. autocmd Filetype tex inoremap <localleader>x $x$-axis
  82. autocmd Filetype tex inoremap <localleader>y $y$-axis
  83. " }}} Local Mappings "