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.

84 lines
2.3 KiB

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