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.

122 lines
3.7 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. Plug 'tpope/vim-surround'
  47. Plug 'easymotion/vim-easymotion'
  48. Plug 'vim-airline/vim-airline'
  49. Plug 'vim-airline/vim-airline-themes'
  50. " }}} vim-plug "
  51. " YCM/UltiSnips {{{ "
  52. " make YCM compatible with UltiSnips (using supertab)
  53. let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
  54. let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>']
  55. let g:SuperTabDefaultCompletionType = '<C-n>'
  56. " better key bindings for UltiSnipsExpandTrigger
  57. let g:UltiSnipsExpandTrigger = "<tab>"
  58. let g:UltiSnipsJumpForwardTrigger = "<tab>"
  59. let g:UltiSnipsJumpBackwardTrigger = "<C-tab>"
  60. " }}} YCM/UltiSnips "
  61. call plug#end()
  62. colorscheme gotham256
  63. " Mappings {{{ "
  64. map <F3> :wa<CR>
  65. map <F4> :wqa<CR>
  66. map <F5> :qa!<CR>
  67. map <F7> :AutoSaveToggle<CR>
  68. map <F9> :LLPStartPreview<CR>
  69. set pastetoggle=<F9>
  70. map <S-Enter> O<ESC>
  71. " For splits.
  72. nnoremap <C-Down> <C-W><C-J>
  73. nnoremap <C-Up> <C-W><C-K>
  74. nnoremap <C-Right> <C-W><C-L>
  75. nnoremap <C-Left> <C-W><C-H>
  76. " Maximize height/width.
  77. nnoremap <C-g> <C-W>_
  78. nnoremap <C-w> <C-W>|
  79. let mapleader="\<Space>"
  80. nnoremap <leader>e o<ESC>
  81. nnoremap <leader>f za
  82. nnoremap <leader>ff :set foldmethod=marker<CR> zM
  83. nnoremap <leader>h :set hlsearch! hlsearch?<CR>
  84. nnoremap <leader>m :call cursor(0, len(getline('.'))/2)<CR>
  85. nnoremap <leader>pli :PlugInstall<CR>
  86. nnoremap <leader>plc :PlugClean<CR>
  87. nnoremap <leader>plu :PlugUpdate<CR>
  88. nnoremap <leader>r :.,.+s///g<left><left><left><left><left>
  89. nnoremap <leader>R :%s///g<left><left><left>
  90. nnoremap <leader>s :set syn=sh<CR>
  91. " }}} Mappings "
  92. " Local Mappings {{{ "
  93. let maplocalleader="-"
  94. autocmd Filetype c inoremap <localleader>s struct pixel
  95. autocmd Filetype tex inoremap <localleader>e \exists
  96. autocmd Filetype tex inoremap <localleader>fa \forall
  97. autocmd Filetype tex inoremap <localleader>g \geq
  98. autocmd Filetype tex inoremap <localleader>i \in
  99. autocmd Filetype tex inoremap <localleader>l \leq
  100. autocmd Filetype tex inoremap <localleader>lr \Leftrightarrow
  101. autocmd Filetype tex inoremap <localleader>n \neg
  102. autocmd Filetype tex inoremap <localleader>N \mathbb{N}
  103. autocmd Filetype tex inoremap <localleader>R \Rightarrow
  104. autocmd Filetype tex inoremap <localleader>st such that
  105. autocmd Filetype tex inoremap <localleader>t \times
  106. autocmd Filetype tex inoremap <localleader>T $T$
  107. autocmd Filetype tex inoremap <localleader>v \vee
  108. autocmd Filetype tex inoremap <localleader>w \wedge
  109. autocmd Filetype tex inoremap <localleader>x $x$-axis
  110. autocmd Filetype tex inoremap <localleader>y $y$-axis
  111. autocmd Filetype tex inoremap <localleader>Z \mathbb{Z}
  112. " }}} Local Mappings "