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.

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