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.

109 lines
3.4 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 linespace=5
  17. " }}} set x=y "
  18. autocmd VimResized * wincmd =
  19. autocmd BufNewFile,BufRead .*_aliases set syntax=sh
  20. " vim-plug {{{ "
  21. " plug auto-install
  22. if empty(glob('~/.vim/autoload/plug.vim'))
  23. silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
  24. \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
  25. autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
  26. endif
  27. call plug#begin('~/.vim/plugged')
  28. Plug 'vim-scripts/L9'
  29. " Plug 'vim-scripts/FuzzyFinder'
  30. Plug 'whatyouhide/vim-gotham'
  31. Plug 'nathanaelkane/vim-indent-guides'
  32. Plug 'flazz/vim-colorschemes'
  33. Plug '907th/vim-auto-save'
  34. let g:auto_save = 1
  35. Plug 'xuhdev/vim-latex-live-preview', { 'for': 'tex' }
  36. Plug 'lervag/vimtex'
  37. Plug 'Valloric/YouCompleteMe'
  38. Plug 'Kevin-Mok/vim-snippets'
  39. Plug 'SirVer/ultisnips'
  40. Plug 'ervandew/supertab'
  41. Plug 'scrooloose/nerdcommenter'
  42. let g:NERDTrimTrailingWhitespace = 1
  43. let g:NERDSpaceDelims = 1
  44. Plug 'xolox/vim-misc'
  45. Plug 'xolox/vim-colorscheme-switcher'
  46. " }}} vim-plug "
  47. " YCM/UltiSnips {{{ "
  48. " make YCM compatible with UltiSnips (using supertab)
  49. let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
  50. let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>']
  51. let g:SuperTabDefaultCompletionType = '<C-n>'
  52. " better key bindings for UltiSnipsExpandTrigger
  53. let g:UltiSnipsExpandTrigger = "<tab>"
  54. let g:UltiSnipsJumpForwardTrigger = "<tab>"
  55. let g:UltiSnipsJumpBackwardTrigger = "<C-tab>"
  56. " }}} YCM/UltiSnips "
  57. call plug#end()
  58. colorscheme gotham256
  59. " Mappings {{{ "
  60. map <F3> :wa<CR>
  61. map <F4> :wqa<CR>
  62. map <F5> :qa!<CR>
  63. map <F7> :AutoSaveToggle<CR>
  64. set pastetoggle=<F9>
  65. map <S-Enter> O<ESC>
  66. let mapleader="\<Space>"
  67. nnoremap <leader>e o<ESC>
  68. nnoremap <leader>f za
  69. nnoremap <leader>ff :set foldmethod=marker<CR> zM
  70. nnoremap <leader>h :set hlsearch! hlsearch?<CR>
  71. nnoremap <leader>m :call cursor(0, len(getline('.'))/2)<CR>
  72. nnoremap <leader>p :LLPStartPreview<CR>
  73. nnoremap <leader>pli :PlugInstall<CR>
  74. nnoremap <leader>plc :PlugClean<CR>
  75. nnoremap <leader>plu :PlugUpdate<CR>
  76. nnoremap <leader>r :.,.+s///g<left><left><left><left><left>
  77. nnoremap <leader>R :%s///g<left><left><left>
  78. nnoremap <leader>s :set syn=sh<CR>
  79. " }}} Mappings "
  80. " Local Mappings {{{ "
  81. let maplocalleader="-"
  82. autocmd Filetype c inoremap <localleader>s struct pixel
  83. autocmd Filetype tex inoremap <localleader>e \exists
  84. autocmd Filetype tex inoremap <localleader>fa \forall
  85. autocmd Filetype tex inoremap <localleader>g \geq
  86. autocmd Filetype tex inoremap <localleader>i \in
  87. autocmd Filetype tex inoremap <localleader>l \leq
  88. autocmd Filetype tex inoremap <localleader>lr \Leftrightarrow
  89. autocmd Filetype tex inoremap <localleader>n \neg
  90. autocmd Filetype tex inoremap <localleader>N \mathbb{N}
  91. autocmd Filetype tex inoremap <localleader>R \Rightarrow
  92. autocmd Filetype tex inoremap <localleader>st such that
  93. autocmd Filetype tex inoremap <localleader>t \times
  94. autocmd Filetype tex inoremap <localleader>T $T$
  95. autocmd Filetype tex inoremap <localleader>v \vee
  96. autocmd Filetype tex inoremap <localleader>w \wedge
  97. autocmd Filetype tex inoremap <localleader>x $x$-axis
  98. autocmd Filetype tex inoremap <localleader>y $y$-axis
  99. autocmd Filetype tex inoremap <localleader>Z \mathbb{Z}
  100. " }}} Local Mappings "