2018-03-17 23:42:49 +00:00
|
|
|
" #plugins{{{
|
|
|
|
set runtimepath+=~/.vim/bundle/Vundle.vim
|
|
|
|
call vundle#begin()
|
|
|
|
|
|
|
|
Plugin 'VundleVim/Vundle.vim'
|
|
|
|
"css3-syntax
|
|
|
|
Plugin 'hail2u/vim-css3-syntax.git'
|
|
|
|
"scss-syntax
|
|
|
|
Plugin 'cakebaker/scss-syntax.vim'
|
|
|
|
"bufexplorer
|
|
|
|
Plugin 'jlanzarotta/bufexplorer'
|
|
|
|
"tagbar
|
|
|
|
Plugin 'majutsushi/tagbar'
|
|
|
|
"vim-surround
|
|
|
|
Plugin 'tpope/vim-surround'
|
|
|
|
"undotree
|
|
|
|
Plugin 'mbbill/undotree'
|
|
|
|
" Ctrlp
|
|
|
|
Plugin 'ctrlpvim/ctrlp.vim'
|
|
|
|
" Obsession
|
|
|
|
Plugin 'tpope/vim-obsession'
|
|
|
|
" vim-css-color
|
2018-04-04 17:49:09 +00:00
|
|
|
" Plugin 'ap/vim-css-color'
|
2018-03-17 23:42:49 +00:00
|
|
|
" vim-javascript
|
|
|
|
Plugin 'pangloss/vim-javascript'
|
|
|
|
" ultisnips
|
|
|
|
" https://github.com/sirver/UltiSnips
|
|
|
|
Plugin 'SirVer/ultisnips'
|
|
|
|
" and some snippets
|
|
|
|
" https://github.com/honza/vim-snippets
|
|
|
|
Plugin 'honza/vim-snippets'
|
|
|
|
" ALE
|
|
|
|
" https://github.com/w0rp/ale
|
|
|
|
Plugin 'w0rp/ale'
|
|
|
|
" MatchTag
|
|
|
|
" https://github.com/gregsexton/MatchTag
|
|
|
|
Plugin 'gregsexton/MatchTag'
|
|
|
|
" phpcomplete.vim
|
|
|
|
" https://github.com/shawncplus/phpcomplete.vim
|
|
|
|
Plugin 'shawncplus/phpcomplete.vim'
|
|
|
|
" https://github.com/dsawardekar/wordpress.vim
|
|
|
|
" For up to date Wordpress Files see:
|
|
|
|
" https://github.com/joseluis/wordpress.vim-generator
|
|
|
|
"Plugin 'dsawardekar/wordpress.vim'
|
|
|
|
" disabled - doesn't support universal ctags?
|
|
|
|
" vim-vue
|
|
|
|
" https://github.com/posva/vim-vue
|
|
|
|
Plugin 'posva/vim-vue'
|
|
|
|
" vim-commentary
|
|
|
|
" https://github.com/tpope/vim-commentary
|
|
|
|
Plugin 'tpope/vim-commentary'
|
|
|
|
" vim-repeat
|
|
|
|
" https://github.com/tpope/vim-repeat
|
|
|
|
Plugin 'tpope/vim-repeat'
|
|
|
|
" taboo.vim
|
|
|
|
" https://github.com/gcmt/taboo.vim
|
|
|
|
Plugin 'gcmt/taboo.vim'
|
|
|
|
" https://github.com/mattn/emmet-vim
|
|
|
|
Plugin 'mattn/emmet-vim'
|
|
|
|
" vimwiki
|
|
|
|
" https://github.com/vimwiki/vimwiki
|
|
|
|
Plugin 'vimwiki/vimwiki'
|
|
|
|
" youcompleteme
|
|
|
|
" https://github.com/Valloric/YouCompleteMe
|
|
|
|
Plugin 'Valloric/YouCompleteMe'
|
|
|
|
" gitgutter
|
|
|
|
" https://github.com/airblade/vim-gitgutter/blob/master/README.mkd
|
|
|
|
Plugin 'airblade/vim-gitgutter'
|
|
|
|
" vim-peekaboo
|
|
|
|
" https://github.com/junegunn/vim-peekaboo
|
|
|
|
Plugin 'junegunn/vim-peekaboo'
|
|
|
|
" vim-gutentags
|
|
|
|
" https://github.com/ludovicchabant/vim-gutentags
|
|
|
|
Plugin 'ludovicchabant/vim-gutentags'
|
2018-03-20 22:33:41 +00:00
|
|
|
" vim-qlist
|
|
|
|
" https://github.com/romainl/vim-qlist/
|
|
|
|
" Plugin 'romainl/vim-qlist'
|
2018-03-28 14:06:59 +00:00
|
|
|
" PLugin takac/vim-hardtime
|
|
|
|
" https://bluz71.github.io/2017/05/15/vim-tips-tricks.html
|
|
|
|
Plugin 'takac/vim-hardtime'
|
2018-03-28 18:40:46 +00:00
|
|
|
" fugitive-vim
|
|
|
|
" https://github.com/tpope/vim-fugitive/blob/master/README.markdown
|
|
|
|
Plugin 'tpope/vim-fugitive'
|
2018-03-28 22:12:45 +00:00
|
|
|
" vim-dispatch
|
|
|
|
" https://github.com/tpope/vim-dispatch
|
|
|
|
Plugin 'tpope/vim-dispatch'
|
2018-04-04 16:55:09 +00:00
|
|
|
" colorV
|
|
|
|
" https://github.com/gu-fan/colorv.vim
|
|
|
|
Plugin 'gu-fan/colorv.vim'
|
2018-04-07 15:13:06 +00:00
|
|
|
" vim switch
|
|
|
|
"https://github.com/AndrewRadev/switch.vim
|
|
|
|
Plugin 'AndrewRadev/switch.vim'
|
2018-03-17 23:42:49 +00:00
|
|
|
|
|
|
|
" All of your Plugins must be added before the following line
|
|
|
|
call vundle#end() " required
|
|
|
|
filetype plugin indent on " required
|
|
|
|
|
2018-03-28 19:07:40 +00:00
|
|
|
" just a test
|
2018-03-17 23:42:49 +00:00
|
|
|
"}}}
|
|
|
|
|
2018-03-27 19:17:56 +00:00
|
|
|
|
2018-03-17 23:42:49 +00:00
|
|
|
" #plugin settings{{{
|
|
|
|
|
2018-04-07 15:13:06 +00:00
|
|
|
" switch.vim
|
2018-04-07 18:20:03 +00:00
|
|
|
"{{{
|
2018-04-07 15:13:06 +00:00
|
|
|
let g:switch_mapping = '<space>-'
|
2018-04-07 18:11:45 +00:00
|
|
|
let g:switch_custom_definitions = [
|
|
|
|
\ ['0', '1'],
|
|
|
|
\ ['ease-in', 'ease-out'],
|
|
|
|
\ ['auto', 'none']
|
|
|
|
\ ]
|
2018-04-07 18:20:03 +00:00
|
|
|
"}}}
|
2018-04-07 15:13:06 +00:00
|
|
|
|
2018-03-28 14:06:59 +00:00
|
|
|
" vim-hardtime
|
2018-04-07 18:20:03 +00:00
|
|
|
"{{{
|
2018-03-28 14:06:59 +00:00
|
|
|
let g:hardtime_default_on = 1
|
|
|
|
let g:hardtime_showmsg = 1
|
2018-03-28 19:08:02 +00:00
|
|
|
let g:hardtime_ignore_quickfix = 1
|
2018-03-28 14:24:44 +00:00
|
|
|
let g:hardtime_allow_different_key = 0
|
|
|
|
let g:hardtime_maxcount = 3
|
2018-04-07 14:40:02 +00:00
|
|
|
let g:hardtime_ignore_buffer_patterns = ['BufExplorer', 'TagBar']
|
2018-04-07 18:20:03 +00:00
|
|
|
"}}}
|
2018-03-28 14:06:59 +00:00
|
|
|
|
2018-03-17 23:42:49 +00:00
|
|
|
" vim-peekaboo
|
2018-04-07 18:20:03 +00:00
|
|
|
"{{{
|
2018-03-17 23:42:49 +00:00
|
|
|
let g:peekaboo_window = 'vert to 30new'
|
2018-04-07 18:20:03 +00:00
|
|
|
"}}}
|
2018-03-17 23:42:49 +00:00
|
|
|
|
|
|
|
" gitgutter
|
2018-04-07 18:20:03 +00:00
|
|
|
"{{{
|
2018-03-17 23:42:49 +00:00
|
|
|
nmap ]h <Plug>GitGutterNextHunk
|
|
|
|
nmap [h <Plug>GitGutterPrevHunk
|
|
|
|
omap ih <Plug>GitGutterTextObjectInnerPending
|
|
|
|
omap ah <Plug>GitGutterTextObjectOuterPending
|
|
|
|
xmap ih <Plug>GitGutterTextObjectInnerVisual
|
|
|
|
xmap ah <Plug>GitGutterTextObjectOuterVisual
|
2018-04-07 18:20:03 +00:00
|
|
|
"}}}
|
2018-03-17 23:42:49 +00:00
|
|
|
|
|
|
|
" Use the silver searcher ag command instead of grep
|
2018-04-07 18:20:03 +00:00
|
|
|
"{{{
|
2018-03-17 23:42:49 +00:00
|
|
|
if executable('ag')
|
|
|
|
" Use ag over grep
|
|
|
|
set grepprg=ag\ --nogroup\ --nocolor
|
|
|
|
|
|
|
|
" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore
|
|
|
|
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
|
|
|
|
|
|
|
|
" ag is fast enough that CtrlP doesn't need to cache
|
|
|
|
let g:ctrlp_use_caching = 0
|
|
|
|
endif
|
|
|
|
|
|
|
|
"vim-wiki
|
|
|
|
let g:vimwiki_list = [{'path': '~/vimwiki/', 'path_html': '~/vimwiki_html/'}]
|
|
|
|
|
|
|
|
" youcompleteme
|
|
|
|
let g:ycm_collect_identifiers_from_tags_files = 1
|
|
|
|
|
|
|
|
" emmet
|
2018-03-27 20:39:33 +00:00
|
|
|
let g:user_emmet_leader_key=',,'
|
|
|
|
let g:user_emmet_settings = {
|
|
|
|
\ 'indentation': ' ',
|
|
|
|
\ 'html': {
|
|
|
|
\ 'indentation': ' ',
|
|
|
|
\ }
|
|
|
|
\}
|
2018-04-07 18:20:03 +00:00
|
|
|
"}}}
|
2018-03-17 23:42:49 +00:00
|
|
|
|
|
|
|
" taboo.vim
|
2018-04-07 18:20:03 +00:00
|
|
|
"{{{
|
2018-03-17 23:42:49 +00:00
|
|
|
set sessionoptions+=tabpages,globals
|
|
|
|
let g:taboo_tab_format = ' %f%m '
|
|
|
|
let g:taboo_renamed_tab_format = ' %l%m '
|
|
|
|
let g:taboo_modified_tab_flag = '+'
|
2018-04-07 18:20:03 +00:00
|
|
|
"}}}
|
2018-03-17 23:42:49 +00:00
|
|
|
|
|
|
|
" vue-vim
|
2018-04-07 18:20:03 +00:00
|
|
|
"{{{
|
2018-03-17 23:42:49 +00:00
|
|
|
" disable preprocessor checking for vue files - increases speed
|
2018-03-27 20:43:16 +00:00
|
|
|
let g:vue_disable_pre_processors=0
|
2018-03-17 23:42:49 +00:00
|
|
|
" set custom syntax highlighting
|
|
|
|
augroup fixhighlighting
|
2018-03-21 22:51:16 +00:00
|
|
|
autocmd!
|
2018-03-17 23:42:49 +00:00
|
|
|
autocmd BufNewFile,BufRead *.vue syntax sync fromstart
|
|
|
|
augroup END
|
2018-04-07 18:20:03 +00:00
|
|
|
"}}}
|
2018-03-17 23:42:49 +00:00
|
|
|
|
|
|
|
" ALE
|
2018-04-07 18:20:03 +00:00
|
|
|
"{{{
|
2018-03-17 23:50:54 +00:00
|
|
|
nnoremap <space>ne :lnext<cr>
|
|
|
|
nnoremap <space>pe :lprev<cr>
|
2018-03-17 23:42:49 +00:00
|
|
|
|
|
|
|
let g:ale_sign_error = '>>'
|
|
|
|
let g:ale_sign_warning = '--'
|
|
|
|
let g:ale_sign_column_always = 1
|
|
|
|
|
|
|
|
let g:ale_linters = {'scss': ['stylelint'], 'javascript': ['eslint'], 'php':['php'], 'html':['htmlhint']}
|
|
|
|
let g:ale_html_htmlhint_options = '-c ~/.htmlhintrc --format=unix'
|
|
|
|
let g:ale_fixers = {'javascript': ['eslint']}
|
2018-04-07 18:20:03 +00:00
|
|
|
"}}}
|
2018-03-17 23:42:49 +00:00
|
|
|
|
|
|
|
" ultisnips
|
2018-04-07 18:20:03 +00:00
|
|
|
"{{{
|
2018-03-20 22:33:41 +00:00
|
|
|
let g:UltiSnipsSnippetsDir='~/.vim/UltiSnips'
|
2018-03-17 23:42:49 +00:00
|
|
|
" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
|
|
|
|
let g:UltiSnipsExpandTrigger='<c-j>'
|
|
|
|
let g:UltiSnipsJumpForwardTrigger='<c-b>'
|
|
|
|
let g:UltiSnipsJumpBackwardTrigger='<c-z>'
|
|
|
|
let g:UltiSnipsEditSplit='horizontal'
|
2018-04-07 18:20:03 +00:00
|
|
|
"}}}
|
2018-03-17 23:42:49 +00:00
|
|
|
|
|
|
|
" Netrw
|
2018-04-07 18:20:03 +00:00
|
|
|
"{{{
|
2018-03-17 23:42:49 +00:00
|
|
|
let g:netrw_liststyle=3
|
|
|
|
let g:netrw_list_hide='^\..*'
|
2018-03-27 10:16:56 +00:00
|
|
|
let g:netrw_preview = 0
|
2018-04-07 18:20:03 +00:00
|
|
|
"}}}
|
2018-03-17 23:42:49 +00:00
|
|
|
|
|
|
|
" bufexploer
|
2018-04-07 18:20:03 +00:00
|
|
|
"{{{
|
2018-03-17 23:50:54 +00:00
|
|
|
nnoremap <space>o :BufExplorer<CR>
|
2018-04-07 18:20:03 +00:00
|
|
|
"}}}
|
2018-03-17 23:42:49 +00:00
|
|
|
|
|
|
|
" undotree
|
2018-04-07 18:20:03 +00:00
|
|
|
"{{{
|
2018-03-17 23:50:54 +00:00
|
|
|
nnoremap <space>ut :UndotreeToggle<cr>
|
2018-04-07 18:20:03 +00:00
|
|
|
"}}}
|
2018-03-17 23:42:49 +00:00
|
|
|
|
|
|
|
" TagBar
|
2018-04-07 18:20:03 +00:00
|
|
|
"{{{
|
2018-03-17 23:50:54 +00:00
|
|
|
nnoremap <space>tb :TagbarOpen fj<CR>
|
|
|
|
nnoremap <space>] :tag /[.#@]<c-r>=expand('<cword>')<cr><cr>
|
2018-03-17 23:42:49 +00:00
|
|
|
let g:tagbar_autoclose = 1
|
|
|
|
" let g:tagbar_autopreview = 1
|
|
|
|
" let g:tagbar_previewwin_pos = ''
|
|
|
|
|
|
|
|
let g:tagbar_type_css = {
|
|
|
|
\ 'ctagstype' : 'css',
|
|
|
|
\ 'kinds' : [
|
|
|
|
\ 'c:classes',
|
|
|
|
\ 'i:ids',
|
|
|
|
\ 't:tags',
|
|
|
|
\ 'm:medias'
|
|
|
|
\ ]
|
|
|
|
\}
|
|
|
|
|
|
|
|
let g:tagbar_type_scss = {
|
|
|
|
\ 'ctagstype' : 'scss',
|
|
|
|
\ 'kinds' : [
|
|
|
|
\ 'v:variables',
|
|
|
|
\ 'c:classes',
|
|
|
|
\ 'i:ids',
|
|
|
|
\ 't:tags',
|
|
|
|
\ 'd:medias',
|
|
|
|
\ 'm:mixins',
|
|
|
|
\ 'f:functions'
|
|
|
|
\ ]
|
|
|
|
\}
|
|
|
|
|
|
|
|
let g:tagbar_type_vue = {
|
|
|
|
\ 'ctagstype' : 'vue',
|
|
|
|
\ 'kinds' : [
|
|
|
|
\ 'o:objects',
|
|
|
|
\ 'f:functions',
|
|
|
|
\ 'a:array',
|
|
|
|
\ 's:string',
|
|
|
|
\ 'b:boolean',
|
|
|
|
\ 'n:number',
|
|
|
|
\ 'v:variable'
|
|
|
|
\ ]
|
|
|
|
\ }
|
2018-04-07 18:20:03 +00:00
|
|
|
"}}}
|
2018-03-17 23:42:49 +00:00
|
|
|
|
|
|
|
" gutentags
|
2018-04-07 18:20:03 +00:00
|
|
|
"{{{
|
2018-03-17 23:42:49 +00:00
|
|
|
let g:gutentags_ctags_tagfile = '.tags'
|
2018-04-04 21:28:27 +00:00
|
|
|
let g:gutentags_ctags_exclude = ['package.json', 'Session.vim', 'package-lock.json', 'TODO.txt']
|
2018-03-17 23:42:49 +00:00
|
|
|
"}}}
|
|
|
|
|
2018-04-04 16:55:09 +00:00
|
|
|
" colorV
|
2018-04-07 18:20:03 +00:00
|
|
|
"{{{
|
2018-04-04 17:49:09 +00:00
|
|
|
let g:colorv_no_global_map = 1
|
2018-04-04 16:55:09 +00:00
|
|
|
let g:colorv_win_pos = 'top'
|
|
|
|
let g:colorv_preview_area = 0
|
2018-03-17 23:42:49 +00:00
|
|
|
|
2018-04-04 17:49:09 +00:00
|
|
|
nnoremap <space>cv :ColorV<CR>
|
|
|
|
nnoremap <space>ce :ColorVEdit<CR>
|
|
|
|
nnoremap <space>cc :call ToggleColorPreview()<CR>
|
|
|
|
nnoremap <space>ci :ColorVInsert<CR>
|
|
|
|
nnoremap <space>cp :ColorVPicker<CR>
|
|
|
|
|
|
|
|
let g:colorv_is_previewing = 0
|
2018-04-04 18:09:41 +00:00
|
|
|
function! ToggleColorPreview() abort
|
2018-04-04 17:49:09 +00:00
|
|
|
if g:colorv_is_previewing == 0
|
2018-04-07 18:20:03 +00:00
|
|
|
execute 'ColorVPreview'
|
2018-04-04 17:49:09 +00:00
|
|
|
let g:colorv_is_previewing = 1
|
|
|
|
else
|
2018-04-07 18:20:03 +00:00
|
|
|
execute 'ColorVClear'
|
2018-04-04 17:49:09 +00:00
|
|
|
let g:colorv_is_previewing = 0
|
|
|
|
endif
|
|
|
|
endfunction
|
2018-04-07 18:20:03 +00:00
|
|
|
"}}}
|
|
|
|
|
|
|
|
"}}}
|
2018-04-04 17:49:09 +00:00
|
|
|
|
2018-03-17 23:42:49 +00:00
|
|
|
" vim: foldmethod=marker
|