123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. filetype off
  2. set rtp+=~/.vim/bundle/Vundle.vim
  3. call vundle#begin()
  4. Bundle 'VundleVim/Vundle.vim'
  5. " standard vim
  6. Bundle 'itchyny/lightline.vim'
  7. Bundle 'scrooloose/nerdtree'
  8. Bundle 'junegunn/seoul256.vim'
  9. Bundle 'jistr/vim-nerdtree-tabs'
  10. Bundle 'jiangmiao/auto-pairs'
  11. Bundle 'tpope/vim-markdown'
  12. Bundle 'suan/vim-instant-markdown'
  13. Bundle 'sheerun/vim-polyglot'
  14. " lint engine
  15. Bundle 'w0rp/ale'
  16. " web-dev
  17. Bundle 'tpope/vim-commentary'
  18. Bundle 'tpope/vim-surround'
  19. Bundle 'alvan/vim-closetag'
  20. " html
  21. " Bundle 'gregsexton/MatchTag'
  22. Bundle 'mattn/emmet-vim'
  23. call vundle#end() " required
  24. filetype plugin indent on " required
  25. set list lcs=tab:\▏\
  26. autocmd BufRead,BufNewFile *.vue setlocal filetype=vue.html.javascript.css
  27. autocmd BufEnter *.vue :syntax sync fromstart
  28. set ttyfast
  29. set lazyredraw
  30. syntax enable
  31. set number
  32. set showcmd
  33. set shiftwidth=2
  34. set tabstop=2
  35. set laststatus=2
  36. set iskeyword+=-
  37. set backspace=indent,eol,start
  38. set nobackup
  39. set nowritebackup
  40. set noswapfile
  41. set hidden
  42. set autoread
  43. " search settings
  44. set ignorecase
  45. set smartcase
  46. set incsearch
  47. set showmatch
  48. set hlsearch
  49. set gdefault
  50. set virtualedit+=block
  51. set splitbelow
  52. set splitright
  53. set pastetoggle=<leader>m
  54. set showmode
  55. setlocal indentkeys+=0
  56. let g:seoul256_background = 235
  57. colo seoul256
  58. nnoremap / /\v
  59. vnoremap / /\v
  60. let mapleader = ","
  61. map <leader>\ :NERDTreeToggle<CR>
  62. map <leader>y :%y+<CR>
  63. " toggle linenumbers
  64. map <leader>n :exec &nu==&rnu? "se nu!" : "se rnu!"<CR>
  65. " spellcheck
  66. map <leader>t :set spell!<CR>
  67. " toggle ale linter
  68. map <leader>q :ALEToggle<cr>
  69. " delete resulting tag side-effect
  70. imap <leader>z <ESC>ldf>a
  71. " set cc + toggle colorcolumn
  72. set cc=80
  73. nnoremap <leader>w :let &cc = &cc == '' ? '81' : ''<CR>
  74. " create new vsplit, and switch to it.
  75. noremap <leader>v <C-w>v
  76. " for easy split nav
  77. nnoremap <C-h> <C-w>h
  78. nnoremap <C-j> <C-w>j
  79. nnoremap <C-k> <C-w>k
  80. nnoremap <C-l> <C-w>l
  81. " clear match highlighting
  82. noremap <leader><space> :noh<cr>:call clearmatches()<cr>
  83. " last buffer switch
  84. nnoremap <leader><leader> <c-^>
  85. noremap j gj
  86. noremap k gk
  87. " paste settings
  88. nnoremap <leader>m :set invpaste paste?<CR>
  89. let g:lightline = {
  90. \ 'colorscheme': 'seoul256',
  91. \ }
  92. let g:ale_lint_delay = 100
  93. let g:ale_sign_column_always = 1
  94. let g:vue_disable_pre_processors=1
  95. let g:AutoPairsMultilineClose = 0
  96. let g:markdown_syntax_conceal = 0
  97. let g:vim_json_syntax_conceal = 0
  98. let g:closetag_filenames = '*.html,*.xhtml,*.phtml, *.vue'
  99. let NERDTreeShowHidden=1