This commit is contained in:
ManjaroOne666 2018-12-02 21:31:01 +00:00
commit 21b3126ad4
5 changed files with 142 additions and 112 deletions

246
vimrc
View file

@ -1,5 +1,6 @@
" #plugins {{{
"
" #plugins {{{
if empty(glob('~/.vim/autoload/plug.vim'))"{{{
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
@ -12,6 +13,133 @@ if !has('nvim')
Plug '~/.config/vim/vim/bundle/vim-learnxiny'
" #Ctrlp {{{
Plug 'ctrlpvim/ctrlp.vim'
" :h ctrlp-commands
" :h ctrlp-extensions
let g:ctrlp_extensions = ['tag', 'buffertag', 'quickfix', 'undo']
if executable('ag')
" 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
" Use ag over grep
if executable('ag')
set grepprg=ag\ --nogroup\ --nocolor\ --ignore\ node_modules
endif
"}}}
" #Netrw {{{
let g:netrw_liststyle=3
let g:netrw_list_hide='^\..*'
let g:netrw_preview = 0
"}}}
" #MatchTagAlways{{{
" https://github.com/Valloric/MatchTagAlways
Plug 'Valloric/MatchTagAlways'
let g:mta_filetypes = {
\ 'jinja' : 1,
\ 'html' : 1,
\ 'vue' : 1,
\ 'xhtml' : 1,
\ 'xml' : 1,
\}
"}}}
" #Obsession{{{
Plug 'tpope/vim-obsession'
"}}}
" #switch {{{
"https://github.com/AndrewRadev/switch.vim
Plug 'AndrewRadev/switch.vim'
let g:switch_mapping = '<space>-'
let g:switch_custom_definitions = [
\ ['0', '1'],
\ ['ease-in', 'ease-out', 'ease-in-out', 'linear'],
\ ['auto', 'none'],
\ ['left', 'right'],
\ ['top', 'bottom'],
\ ['row', 'column'],
\ ['relative', 'absolute', 'fixed']
\ ]
"}}}
" #switch {{{
"https://github.com/AndrewRadev/switch.vim
Plug 'AndrewRadev/switch.vim'
let g:switch_mapping = '<space>-'
let g:switch_custom_definitions = [
\ ['0', '1'],
\ ['ease-in', 'ease-out', 'ease-in-out', 'linear'],
\ ['auto', 'none'],
\ ['left', 'right'],
\ ['top', 'bottom'],
\ ['row', 'column'],
\ ['relative', 'absolute', 'fixed']
\ ]
"}}}
" #undotree {{{
Plug 'mbbill/undotree'
nnoremap <space>ut :UndotreeToggle<cr>
"}}}
" #tcomment_vim{{{
" https://github.com/tomtom/tcomment_vim
Plug 'tomtom/tcomment_vim'
"}}}
" #vim-easy-align {{{
" https://github.com/junegunn/vim-easy-align
Plug 'junegunn/vim-easy-align'
xmap ga <Plug>(EasyAlign)
nmap ga <Plug>(EasyAlign)
"}}}
" #vim-qlist {{{
" Original: https://github.com/romainl/vim-qlist
Plug 'studio-vx/vim-qlist'
"}}}
" #vim-repeat{{{
" https://github.com/tpope/vim-repeat
Plug 'tpope/vim-repeat'
"}}}
" #vim-rsi{{{
"https://github.com/tpope/vim-rsi
Plug 'tpope/vim-rsi'
"}}}
" #vim-surround{{{
Plug 'tpope/vim-surround'
"}}}
" #vim-fugitive{{{
" https://github.com/tpope/vim-fugitive/blob/master/README.markdown
Plug 'tpope/vim-fugitive'
nnoremap <silent> <space>gs :Gstatus<CR>
nnoremap <silent> <space>gd :tabedit %<CR>:Gdiff<CR>
nnoremap <silent> <space>gc :Gcommit<CR>
nnoremap <silent> <space>gl :Glog<CR>
nnoremap <silent> <space>gp :Gpush<CR>:copen<CR>
"}}}
" #wakatime{{{
" https://wakatime.com/vim
Plug 'wakatime/vim-wakatime'
"}}}
if filereadable(expand('.is-dev'))
" #ALE {{{
" https://github.com/w0rp/ale
Plug 'w0rp/ale'
@ -92,25 +220,6 @@ if !has('nvim')
" #css3-syntax{{{
Plug 'hail2u/vim-css3-syntax'
"}}}
" #Ctrlp {{{
Plug 'ctrlpvim/ctrlp.vim'
" :h ctrlp-commands
" :h ctrlp-extensions
let g:ctrlp_extensions = ['tag', 'buffertag', 'quickfix', 'undo']
if executable('ag')
" 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
" Use ag over grep
if executable('ag')
set grepprg=ag\ --nogroup\ --nocolor\ --ignore\ node_modules
endif
"}}}
" #emmet-vim {{{
" https://github.com/mattn/emmet-vim
@ -167,28 +276,6 @@ if !has('nvim')
nnoremap <space>ie :InlineEdit<cr>
"}}}
" #MatchTagAlways{{{
" https://github.com/Valloric/MatchTagAlways
Plug 'Valloric/MatchTagAlways'
let g:mta_filetypes = {
\ 'jinja' : 1,
\ 'html' : 1,
\ 'vue' : 1,
\ 'xhtml' : 1,
\ 'xml' : 1,
\}
"}}}
" #Netrw {{{
let g:netrw_liststyle=3
let g:netrw_list_hide='^\..*'
let g:netrw_preview = 0
"}}}
" #Obsession{{{
Plug 'tpope/vim-obsession'
"}}}
" #php.vim{{{
" https://github.com/StanAngeloff/php.vim
@ -211,22 +298,6 @@ let g:mta_filetypes = {
" #scss-syntax{{{
Plug 'cakebaker/scss-syntax.vim'
"}}}
" #switch {{{
"https://github.com/AndrewRadev/switch.vim
Plug 'AndrewRadev/switch.vim'
let g:switch_mapping = '<space>-'
let g:switch_custom_definitions = [
\ ['0', '1'],
\ ['ease-in', 'ease-out', 'ease-in-out', 'linear'],
\ ['auto', 'none'],
\ ['left', 'right'],
\ ['top', 'bottom'],
\ ['row', 'column'],
\ ['relative', 'absolute', 'fixed']
\ ]
"}}}
" #tagbar {{{
Plug 'majutsushi/tagbar'
@ -329,28 +400,10 @@ let g:mta_filetypes = {
set completefunc=CompleteSnippets
"}}}
" #undotree {{{
Plug 'mbbill/undotree'
nnoremap <space>ut :UndotreeToggle<cr>
"}}}
" #tcomment_vim{{{
" https://github.com/tomtom/tcomment_vim
Plug 'tomtom/tcomment_vim'
"}}}
" #vim-dispatch{{{
" https://github.com/tpope/vim-dispatch
Plug 'tpope/vim-dispatch'
"}}}
" #vim-easy-align {{{
" https://github.com/junegunn/vim-easy-align
Plug 'junegunn/vim-easy-align'
xmap ga <Plug>(EasyAlign)
nmap ga <Plug>(EasyAlign)
"}}}
" #vim-gutentags {{{
" https://github.com/ludovicchabant/vim-gutentags
@ -426,20 +479,6 @@ let g:mta_filetypes = {
" augroup END
""}}}
" #vim-repeat{{{
" https://github.com/tpope/vim-repeat
Plug 'tpope/vim-repeat'
"}}}
" #vim-rsi{{{
"https://github.com/tpope/vim-rsi
Plug 'tpope/vim-rsi'
"}}}
" #vim-surround{{{
Plug 'tpope/vim-surround'
"}}}
" #vim-SyntaxRange{{{
" https://github.com/inkarkat/vim-SyntaxRange
" Plug 'inkarkat/vim-SyntaxRange'
@ -483,27 +522,13 @@ let g:mta_filetypes = {
" Using studio-vx fork
Plug 'studio-vx/wordpress.vim', { 'branch': 'universal-ctags' }
"}}}
" #vim-fugitive{{{
" https://github.com/tpope/vim-fugitive/blob/master/README.markdown
Plug 'tpope/vim-fugitive'
nnoremap <silent> <space>gs :Gstatus<CR>
nnoremap <silent> <space>gd :tabedit %<CR>:Gdiff<CR>
nnoremap <silent> <space>gc :Gcommit<CR>
nnoremap <silent> <space>gl :Glog<CR>
nnoremap <silent> <space>gp :Gpush<CR>:copen<CR>
"}}}
" #vim-git{{{
" https://github.com/tpope/vim-git
Plug 'tpope/vim-git'
"}}}
" #wakatime{{{
" https://wakatime.com/vim
Plug 'wakatime/vim-wakatime'
"}}}
endif
call plug#end()
endif
@ -969,7 +994,8 @@ set lazyredraw
set backupdir=~/.vimtmp
set directory=~/.vimtmp
set tags+=./.tags,.tags;/home/ray/
" the ;/home/ray tells vim to stop searching at /home/ray
set tags+=./.tags,.tags,./tags-py,.tags-py;/home/ray/
" persisitent undo file
set undodir=/home/ray/.vim/undodir
@ -997,7 +1023,7 @@ set hlsearch
" set previewheight=24
" set splitbelow
set completeopt=longest,menuone,preview
set completeopt=longest,menuone
set nospell
set spelllang=en_gb
@ -1110,7 +1136,7 @@ nnoremap <PageUp> :bprevious<CR>
nnoremap <PageDown> :bnext<CR>
" alias for :tjump <cword>
nnoremap <space>tj g<C-]>
" alias for @ptjump <cword>
" alias for :ptjump <cword>
nnoremap <space>tp <C-w>g}
"}}}
@ -1450,7 +1476,9 @@ function! GetStatus(isactive) abort "{{{
let l:statusline .= ' ' . l:separator
let l:statusline .= '%#StatusLineWarning#%{gutentags#statusline("", "", "☢")}'
if exists('gutentags#statusline')
let l:statusline .= '%#StatusLineWarning#%{gutentags#statusline("", "", "☢")}'
endif
return l:statusline