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.

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