" ██ " ░░ " ██ ██ ██ ██████████ ██████ █████ " ░██ ░██░██░░██░░██░░██░░██░░█ ██░░░██ " ░░██ ░██ ░██ ░██ ░██ ░██ ░██ ░ ░██ ░░ " ░░████ ░██ ░██ ░██ ░██ ░██ ░██ ██ " ░░██ ░██ ███ ░██ ░██░███ ░░█████ " ░░ ░░ ░░░ ░░ ░░ ░░░ ░░░░░ " " ▓▓▓▓▓▓▓▓▓▓ " ░▓ author ▓ xero " ░▓ code ▓ http://code.xero.nu/dotfiles " ░▓ mirror ▓ http://git.io/.files " ░▓▓▓▓▓▓▓▓▓▓ " ░░░░░░░░░░ " " wizard colors https://git.io/vim.sourcerer "colorscheme sourcerer " dark wizard colors http://git.io/blaquemagick.vim colorscheme blaquemagick " use your shell colors "colorscheme noctu " omnifuncs augroup omnifuncs autocmd! autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS autocmd FileType python setlocal omnifunc=pythoncomplete#Complete autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags autocmd FileType php setlocal omnifunc=phpcomplete#CompletePHP augroup end " completions if has('nvim') let g:deoplete#enable_at_startup = 1 " let g:deoplete#disable_auto_complete = 1 let g:deoplete#enable_ignore_case = 1 if !exists('g:deoplete#omni#input_patterns') let g:deoplete#omni#input_patterns = {} endif autocmd InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif inoremap pumvisible() ? "\" : "\" endif let b:vcm_tab_complete = 'omni' set omnifunc=syntaxcomplete#Complete " select the completion with enter inoremap pumvisible() ? "\" : "\u\" " close preview on completion complete autocmd CompleteDone * pclose " set completeopt-=preview " linting let g:ale_completion_enabled = 1 let g:ale_sign_column_always = 1 let g:ale_sign_error = '× ' let g:ale_sign_warning = '> ' "let g:ale_open_list = 1 "let g:ale_lint_on_text_changed = 'never' highlight ALEErrorSign ctermbg=234 ctermfg=magenta " disable folding let g:vim_json_syntax_conceal = 0 " verticle diffs set diffopt+=vertical " speed optimizations let g:gitgutter_realtime = 1 let g:gitgutter_eager = 1 let g:gitgutter_max_signs = 1500 let g:gitgutter_diff_args = '-w' " custom symbols let g:gitgutter_sign_added = '+' let g:gitgutter_sign_modified = '~' let g:gitgutter_sign_removed = '-' let g:gitgutter_sign_removed_first_line = '^' let g:gitgutter_sign_modified_removed = ':' " color overrrides highlight clear SignColumn highlight GitGutterAdd ctermfg=green ctermbg=234 highlight GitGutterChange ctermfg=yellow ctermbg=234 highlight GitGutterDelete ctermfg=red ctermbg=234 highlight GitGutterChangeDelete ctermfg=red ctermbg=234 " use the silver searcher let g:agprg="ag -i --vimgrep" let g:ag_highlight=1 " map \ to the ag command for quick searching nnoremap \ :Ag " use ^{h,j} to move lines let g:move_key_modifier = 'A' " distraction free writing mode let g:limelight_conceal_ctermfg = 240 function! s:goyo_enter() Limelight silent !tmux set status off silent !tmux list-panes -F '\#F' | grep -q Z | tmux resize-pane -Z set noshowmode set noshowcmd set wrap set scrolloff=999 endfunction function! s:goyo_leave() Limelight! silent !tmux set status on silent !tmux list-panes -F '\#F' | grep -q Z && tmux resize-pane -Z set showmode set showcmd set nowrap set scrolloff=0 endfunction autocmd! User GoyoEnter nested call goyo_enter() autocmd! User GoyoLeave nested call goyo_leave() " dont start spell checking until i ask! autocmd FileType markdown setlocal nospell " ┏━┓╺┳╸┏━┓╺┳╸╻ ╻┏━┓╻ ╻┏┓╻┏━╸ " ┗━┓ ┃ ┣━┫ ┃ ┃ ┃┗━┓┃ ┃┃┗┫┣╸ " ┗━┛ ╹ ╹ ╹ ╹ ┗━┛┗━┛┗━╸╹╹ ╹┗━╸ " lightline http://git.io/lightline " █▓▒░ wizard status line let s:base03 = [ '#151513', 233 ] let s:base02 = [ '#222222', 0 ] let s:base01 = [ '#4e4e43', 239 ] let s:base00 = [ '#666656', 242 ] let s:base0 = [ '#808070', 244 ] let s:base1 = [ '#949484', 246 ] let s:base2 = [ '#a8a897', 248 ] let s:base3 = [ '#e8e8d3', 253 ] let s:yellow = [ '#7A7A57', 11 ] let s:orange = [ '#7A7A57', 3 ] let s:red = [ '#5F8787', 1 ] let s:magenta = [ '#8181A6', 13 ] let s:cyan = [ '#87ceeb', 12 ] let s:green = [ '#7A7A57', 3 ] let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}} let s:p.normal.left = [ [ s:base02, s:magenta ], [ s:base3, s:base01 ] ] let s:p.normal.right = [ [ s:base02, s:base1 ], [ s:base2, s:base01 ] ] let s:p.inactive.right = [ [ s:base02, s:base00 ], [ s:base0, s:base02 ] ] let s:p.inactive.left = [ [ s:base0, s:base02 ], [ s:base00, s:base02 ] ] let s:p.insert.left = [ [ s:base02, s:cyan ], [ s:base3, s:base01 ] ] let s:p.replace.left = [ [ s:base02, s:red ], [ s:base3, s:base01 ] ] let s:p.visual.left = [ [ s:base02, s:green ], [ s:base3, s:base01 ] ] let s:p.normal.middle = [ [ s:base0, s:base02 ] ] let s:p.inactive.middle = [ [ s:base00, s:base02 ] ] let s:p.tabline.left = [ [ s:base3, s:base00 ] ] let s:p.tabline.tabsel = [ [ s:base3, s:base02 ] ] let s:p.tabline.middle = [ [ s:base01, s:base1 ] ] let s:p.tabline.right = copy(s:p.normal.right) let s:p.normal.error = [ [ s:base02, s:yellow ] ] let s:p.normal.warning = [ [ s:yellow, s:base01 ] ] let g:lightline#colorscheme#sourcerer#palette = lightline#colorscheme#flatten(s:p) set laststatus=2 let g:lightline = { \ 'colorscheme': 'sourcerer', \ 'active': { \ 'left': [ [ 'filename' ], \ [ 'linter', 'gitbranch' ] ], \ 'right': [ [ 'percent', 'lineinfo' ], \ [ 'fileencoding', 'filetype' ] ] \ }, \ 'component_function': { \ 'modified': 'WizMod', \ 'readonly': 'WizRO', \ 'gitbranch': 'WizGit', \ 'filename': 'WizName', \ 'filetype': 'WizType', \ 'fileencoding': 'WizEncoding', \ 'mode': 'WizMode', \ }, \ 'component_expand': { \ 'linter': 'WizErrors', \ }, \ 'component_type': { \ 'readonly': 'error', \ 'linter': 'error' \ }, \ 'separator': { 'left': '▓▒░', 'right': '░▒▓' }, \ 'subseparator': { 'left': '▒', 'right': '░' } \ } " \ 'separator': { 'left': '▊▋▌▍▎', 'right': '▎▍▌▋▊' }, function! WizMod() return &ft =~ 'help\|vimfiler' ? '' : &modified ? '» ' : &modifiable ? '' : '' endfunction function! WizRO() return &ft !~? 'help\|vimfiler' && &readonly ? '× ' : '' endfunction function! WizGit() return exists('*fugitive#head') ? fugitive#head() : '' endfunction function! WizName() let l:name = expand('%:t') if l:name =~ 'NetrwTreeListing' return '' endif return ('' != WizRO() ? WizRO() : WizMod()) . \ ('' != expand('%:t') ? expand('%:t') : '[none]') endfunction function! WizType() return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype : '') : '' endfunction function! WizEncoding() return winwidth(0) > 70 ? (strlen(&fenc) ? &enc : &enc) : '' endfunction function! WizErrors() abort let l:counts = ale#statusline#Count(bufnr('')) return l:counts.total == 0 ? '' : printf('×%d', l:counts.total) endfunction autocmd User ALELint call lightline#update()