this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Cleanup NeoVim configuration

+106 -137
+5 -15
Brewfile
··· 1 1 # vi: ft=ruby 2 2 3 + cask_args appdir: '~/Applications' 4 + 3 5 tap 'caskroom/cask' 4 6 tap 'homebrew/bundle' 5 7 tap 'homebrew/core' ··· 13 15 brew 'diff-so-fancy' 14 16 brew 'direnv' 15 17 brew 'git' 16 - brew 'docker' 17 18 brew 'jpeg' 18 19 brew 'elixir' 19 20 brew 'ffmpeg' 20 21 brew 'fish' 21 - brew 'fpp' 22 22 brew 'ghc' 23 23 brew 'git-lfs' 24 - brew 'gnupg' 25 24 brew 'graphviz' 26 25 brew 'htop' 27 26 brew 'httpie' ··· 30 29 brew 'jpegoptim' 31 30 brew 'jq' 32 31 brew 'lnav' 33 - brew 'luajit' 34 32 brew 'mobile-shell' 35 - brew 'mysql' 36 - brew 'nasm' 37 33 brew 'ncdu' 38 34 brew 'node' 39 35 brew 'optipng' 40 36 brew 'pandoc' 41 - brew 'phantomjs' 42 37 brew 'ruby-build' 43 38 brew 'rbenv' 44 39 brew 'rbenv-default-gems' 45 40 brew 'reattach-to-user-namespace' 46 41 brew 'redis' 47 42 brew 'shellcheck' 48 - brew 'sysdig' 49 - brew 'terminal-notifier' 50 43 brew 'the_silver_searcher' 51 44 brew 'tmux' 52 45 brew 'tree' 53 46 brew 'watchman' 54 47 brew 'wget' 55 48 brew 'wrk' 56 - brew 'xhyve' 57 49 brew 'youtube-dl' 58 50 brew 'neovim/neovim/neovim' 59 51 brew 'universal-ctags/universal-ctags/universal-ctags', args: ['HEAD'] ··· 62 54 cask 'battle-net' 63 55 cask 'caffeine' 64 56 cask 'dash' 65 - cask 'droplr' 66 57 cask 'flux' 67 58 cask 'gog-galaxy' 68 59 cask 'google-chrome' 69 - cask 'iterm2-nightly' 60 + cask 'gpgtools' 61 + cask 'iterm2' 62 + cask 'postgres' 70 63 cask 'qnapi' 71 64 cask 'slack' 72 65 cask 'steam' 73 66 cask 'transmission' 74 67 cask 'vlc' 75 68 cask 'zoomus' 76 - cask 'gpgtools' 77 - cask 'qnapi' 78 - cask 'postgres'
+2
git/config
··· 41 41 autostash = true 42 42 [credential] 43 43 helper = cache --timeout=3600 44 + [help] 45 + autocorrect = 1 44 46 45 47 # Automatically sign all tags and commits 46 48 [tag]
+2 -1
git/ignore
··· 57 57 # Other {{{ 58 58 .rake_tasks 59 59 .meteor/ 60 - .tags 60 + /tags 61 + /tags.* 61 62 .gdb_history 62 63 perf.data* 63 64 /oprofile_data
+86 -26
nvim/autoload/plug.vim
··· 171 171 let a:dict[a:key] = add(get(a:dict, a:key, []), a:val) 172 172 endfunction 173 173 174 - function! s:ask(message) 174 + function! s:ask(message, ...) 175 175 call inputsave() 176 176 echohl WarningMsg 177 - let proceed = input(a:message.' (y/N) ') =~? '^y' 177 + let answer = input(a:message.(a:0 ? ' (y/N/a) ' : ' (y/N) ')) 178 178 echohl None 179 179 call inputrestore() 180 180 echo "\r" 181 - return proceed 181 + return (a:0 && answer =~? '^a') ? 2 : (answer =~? '^y') ? 1 : 0 182 + endfunction 183 + 184 + function! s:ask_no_interrupt(...) 185 + try 186 + return call('s:ask', a:000) 187 + catch 188 + return 0 189 + endtry 182 190 endfunction 183 191 184 192 function! plug#end() ··· 267 275 syntax enable 268 276 end 269 277 else 270 - call s:reload() 278 + call s:reload_plugins() 271 279 endif 272 280 endfunction 273 281 ··· 275 283 return filter(copy(g:plugs_order), 'get(s:loaded, v:val, 0)') 276 284 endfunction 277 285 278 - function! s:reload() 286 + function! s:load_plugin(spec) 287 + call s:source(s:rtp(a:spec), 'plugin/**/*.vim', 'after/plugin/**/*.vim') 288 + endfunction 289 + 290 + function! s:reload_plugins() 279 291 for name in s:loaded_names() 280 - call s:source(s:rtp(g:plugs[name]), 'plugin/**/*.vim', 'after/plugin/**/*.vim') 292 + call s:load_plugin(g:plugs[name]) 281 293 endfor 282 294 endfunction 283 295 ··· 605 617 syn match plugRelDate /([^)]*)$/ contained 606 618 syn match plugNotLoaded /(not loaded)$/ 607 619 syn match plugError /^x.*/ 620 + syn region plugDeleted start=/^\~ .*/ end=/^\ze\S/ 608 621 syn match plugH2 /^.*:\n-\+$/ 609 622 syn keyword Function PlugInstall PlugStatus PlugUpdate PlugClean 610 623 hi def link plug1 Title ··· 624 637 hi def link plugUpdate Type 625 638 626 639 hi def link plugError Error 640 + hi def link plugDeleted Ignore 627 641 hi def link plugRelDate Comment 628 642 hi def link plugEdge PreProc 629 643 hi def link plugSha Identifier ··· 701 715 throw 'Invalid current working directory. Cannot proceed.' 702 716 endif 703 717 718 + for evar in ['$GIT_DIR', '$GIT_WORK_TREE'] 719 + if exists(evar) 720 + throw evar.' detected. Cannot proceed.' 721 + endif 722 + endfor 723 + 704 724 call s:job_abort() 705 725 if s:switch_in() 706 726 normal q ··· 716 736 let s:plug_buf = winbufnr(0) 717 737 call s:assign_name() 718 738 719 - silent! unmap <buffer> <cr> 720 - silent! unmap <buffer> L 721 - silent! unmap <buffer> o 722 - silent! unmap <buffer> X 739 + for k in ['<cr>', 'L', 'o', 'X', 'd', 'dd'] 740 + execute 'silent! unmap <buffer>' k 741 + endfor 723 742 setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile nowrap cursorline modifiable 724 743 setf vim-plug 725 744 if exists('g:syntax_on') ··· 785 804 let error = '' 786 805 let type = type(spec.do) 787 806 if type == s:TYPE.string 788 - let error = s:bang(spec.do) 807 + if spec.do[0] == ':' 808 + call s:load_plugin(spec) 809 + execute spec.do[1:] 810 + else 811 + let error = s:bang(spec.do) 812 + endif 789 813 elseif type == s:TYPE.funcref 790 814 try 791 815 let status = installed ? 'installed' : (updated ? 'updated' : 'unchanged') ··· 1024 1048 if v:shell_error 1025 1049 call add(s:update.errors, name) 1026 1050 call s:regress_bar() 1027 - execute pos 'd _' 1051 + silent execute pos 'd _' 1028 1052 call append(4, msg) | 4 1029 1053 elseif !empty(out) 1030 1054 call setline(pos, msg) 1031 1055 endif 1032 1056 redraw 1033 1057 endfor 1034 - 4 d _ 1058 + silent 4 d _ 1035 1059 call s:do(s:update.pull, s:update.force, filter(copy(s:update.all), 'index(s:update.errors, v:key) < 0 && has_key(v:val, "do")')) 1036 1060 call s:finish(s:update.pull) 1037 1061 call setline(1, 'Updated. Elapsed time: ' . split(reltimestr(reltime(s:update.start)))[0] . ' sec.') ··· 1148 1172 if s:switch_in() 1149 1173 let pos = s:logpos(a:name) 1150 1174 if pos > 0 1151 - execute pos 'd _' 1175 + silent execute pos 'd _' 1152 1176 if pos > winheight('.') 1153 1177 let pos = 4 1154 1178 endif ··· 1974 1998 if empty(todo) 1975 1999 call append(line('$'), 'Already clean.') 1976 2000 else 1977 - if a:force || s:ask('Proceed?') 1978 - for dir in todo 1979 - call s:rm_rf(dir) 1980 - endfor 1981 - call append(3, ['Removed.', '']) 2001 + let s:clean_count = 0 2002 + call append(3, ['Directories to delete:', '']) 2003 + redraw! 2004 + if a:force || s:ask_no_interrupt('Delete all directories?') 2005 + call s:delete([6, line('$')], 1) 1982 2006 else 1983 - call append(3, ['Cancelled.', '']) 2007 + call setline(4, 'Cancelled.') 2008 + nnoremap <silent> <buffer> d :set opfunc=<sid>delete_op<cr>g@ 2009 + nmap <silent> <buffer> dd d_ 2010 + xnoremap <silent> <buffer> d :<c-u>call <sid>delete_op(visualmode(), 1)<cr> 2011 + echo 'Delete the lines (d{motion}) to delete the corresponding directories' 1984 2012 endif 1985 2013 endif 1986 2014 4 2015 + setlocal nomodifiable 2016 + endfunction 2017 + 2018 + function! s:delete_op(type, ...) 2019 + call s:delete(a:0 ? [line("'<"), line("'>")] : [line("'["), line("']")], 0) 2020 + endfunction 2021 + 2022 + function! s:delete(range, force) 2023 + let [l1, l2] = a:range 2024 + let force = a:force 2025 + while l1 <= l2 2026 + let line = getline(l1) 2027 + if line =~ '^- ' && isdirectory(line[2:]) 2028 + execute l1 2029 + redraw! 2030 + let answer = force ? 1 : s:ask('Delete '.line[2:].'?', 1) 2031 + let force = force || answer > 1 2032 + if answer 2033 + call s:rm_rf(line[2:]) 2034 + setlocal modifiable 2035 + call setline(l1, '~'.line[1:]) 2036 + let s:clean_count += 1 2037 + call setline(4, printf('Removed %d directories.', s:clean_count)) 2038 + setlocal nomodifiable 2039 + endif 2040 + endif 2041 + let l1 += 1 2042 + endwhile 1987 2043 endfunction 1988 2044 1989 2045 function! s:upgrade() ··· 2125 2181 return 2126 2182 endif 2127 2183 2128 - execute 'pedit' sha 2129 - wincmd P 2130 - setlocal filetype=git buftype=nofile nobuflisted modifiable 2131 - execute 'silent read !cd' s:shellesc(g:plugs[name].dir) '&& git show --no-color --pretty=medium' sha 2132 - normal! gg"_dd 2184 + if exists('g:plug_pwindow') && !s:is_preview_window_open() 2185 + execute g:plug_pwindow 2186 + execute 'e' sha 2187 + else 2188 + execute 'pedit' sha 2189 + wincmd P 2190 + endif 2191 + setlocal previewwindow filetype=git buftype=nofile nobuflisted modifiable 2192 + execute 'silent %!cd' s:shellesc(g:plugs[name].dir) '&& git show --no-color --pretty=medium' sha 2133 2193 setlocal nomodifiable 2134 2194 nnoremap <silent> <buffer> q :q<cr> 2135 2195 wincmd p ··· 2215 2275 setlocal modifiable 2216 2276 normal! "_dap 2217 2277 setlocal nomodifiable 2218 - echo 'Reverted.' 2278 + echo 'Reverted' 2219 2279 endfunction 2220 2280 2221 2281 function! s:snapshot(force, ...) abort
-1
nvim/ftdetect/epub.vim
··· 1 - au BufRead,BufNewFile *.epub set ft=epub
-1
nvim/ftdetect/fish.vim
··· 1 - au BufRead,BufNewFile *.fish set ft=fish syn=fish
-1
nvim/ftdetect/html.vim
··· 1 - au BufRead,BufNewFile *.hbs setfiletype html
-1
nvim/ftdetect/javascript.vim
··· 1 - au BufRead,BufNewFile *.es6 set ft=javascript
-1
nvim/ftdetect/ktap.vim
··· 1 - au BufNewFile,BufRead *.kp set filetype=ktap
-1
nvim/ftdetect/markdown.vim
··· 1 - au BufRead,BufNewFile *.md,*.markdown set ft=markdown syn=markdown
-2
nvim/ftdetect/prolog.vim
··· 1 - au BufRead,BufNewFile *.pro set ft=prolog syn=prolog 2 -
-1
nvim/ftdetect/slim.vim
··· 1 - au BufRead,BufNewFile *.slim set ft=slim syn=slim
+9 -36
nvim/init.vim
··· 1 1 " vim: foldmethod=marker foldlevel=0 foldenable 2 2 3 + let $NVIM_TUI_ENABLE_CURSOR_SHAPE=1 4 + 3 5 " Plugins {{{ 4 6 call plug#begin('~/.local/nvim/plugins') 5 7 6 8 " Visual 7 9 Plug 'bling/vim-bufferline' 8 10 Plug 'morhetz/gruvbox' 9 - Plug 'itchyny/lightline.vim' 10 11 11 12 " Languages 12 13 Plug 'sheerun/vim-polyglot' ··· 17 18 " Git 18 19 Plug 'mhinz/vim-signify' 19 20 Plug 'tpope/vim-fugitive' 20 - Plug 'tpope/vim-rhubarb' 21 21 Plug 'junegunn/gv.vim' 22 22 23 23 " Fuzzy find ··· 28 28 Plug 'justinmk/vim-dirvish' 29 29 Plug 'tpope/vim-eunuch' 30 30 31 - " Time management 32 - Plug 'wakatime/vim-wakatime' 33 - 34 31 " TMux integration 35 32 Plug 'christoomey/vim-tmux-navigator' 36 33 37 34 " Completion 38 - Plug 'mattn/emmet-vim' 39 35 Plug 'racer-rust/vim-racer' 36 + Plug 'ludovicchabant/vim-gutentags' 40 37 41 38 " Code manipulation 42 - Plug 'cohama/lexima.vim' 43 39 Plug 'tommcdo/vim-exchange' 44 40 Plug 'tpope/vim-commentary' 45 41 Plug 'tpope/vim-surround' 42 + Plug 'Raimondi/delimitMate' 43 + Plug 'tpope/vim-endwise' 44 + Plug 'tpope/vim-rails' 46 45 47 46 " Build & Configuration 48 47 Plug 'benekastah/neomake' 49 48 Plug 'tpope/vim-projectionist' 50 49 51 50 " Utils 52 - Plug 'godlygeek/tabular' 53 51 Plug 'mbbill/undotree', { 'on': 'UndotreeToggle' } 54 52 Plug 'mjbrownie/swapit' 55 53 Plug 'tpope/vim-repeat' 56 54 Plug 'tpope/vim-unimpaired' 57 55 Plug 'junegunn/Goyo.vim', { 'on': 'Goyo' } 56 + Plug 'junegunn/limelight.vim', { 'on': 'Limelight' } 57 + Plug 'wellle/targets.vim' 58 58 59 59 call plug#end() 60 60 " }}} ··· 145 145 set undoreload=10000 146 146 endif 147 147 " }}} 148 - " Tags {{{ 149 - command! UpdateTags call UpdateTags(0, '.') 150 - 151 - let g:tagscmd = 'ctags -a' 152 - 153 - function! UpdateTags(check, path) 154 - let l:cwd = getcwd() 155 - let l:tagsfile = l:cwd . '/tags' 156 - 157 - if a:check && ! filewritable(tagsfile) && &diff 158 - return 159 - endif 160 - 161 - exec('NeomakeSh ' . g:tagscmd . ' -f ' . tagsfile . ' ' . a:path) 162 - endfunction 163 - 164 - augroup ctags 165 - au! 166 - au BufWritePost * call UpdateTags(1, @%) 167 - augroup END 168 - " }}} 169 148 " Mappings {{{ 170 149 " Leader {{{ 171 150 let mapleader = "\<space>" ··· 174 153 " Treat long lines as break lines (useful when moving around in them). 175 154 noremap <expr> j v:count > 1 ? 'm`' . v:count . 'j' : 'gj' 176 155 noremap <expr> k v:count > 1 ? 'm`' . v:count . 'k' : 'gk' 177 - " }}} 178 - " ESC {{{ 179 - inoremap jk <ESC> 180 156 " }}} 181 157 " Disable arrows {{{ 182 158 noremap <up> <nop> ··· 259 235 nnoremap UB :<C-u>Gblame<CR> 260 236 nnoremap Uc :<C-u>Gcommit<CR> 261 237 nnoremap Um :<C-u>Gmerge<CR> 262 - nnoremap Uu :<C-u>Git up<CR> 238 + nnoremap Uu :<C-u>Git pull --all<CR> 263 239 nnoremap Uf :<C-u>GitFiles<CR> 264 240 nnoremap Ul :<C-u>GV<CR> 265 241 nnoremap UL :<C-u>GV!<CR> ··· 323 299 let g:signify_sign_changedelete = '▞' 324 300 325 301 let g:signify_sign_show_count = 0 326 - " }}} 327 - " Lexima {{{ 328 - call lexima#add_rule({'char': '%', 'at': '<\%#', 'input_after': ' %>', 'filetype': ['eelixir', 'eruby']}) 329 302 " }}} 330 303 " Limelight {{{ 331 304 let g:limelight_conceal_ctermfg = 'lightgray'
+1 -49
nvim/plugin/statusline.vim
··· 1 - let g:lightline = { 2 - \ 'colorscheme': 'gruvbox', 3 - \ 'active': { 4 - \ 'left': [ 5 - \ [ 'mode', 'paste'], 6 - \ [ 'filename', 'readonly', 'fugitive' ], 7 - \ ], 8 - \ 'right': [ 9 - \ [ 'lineinfo' ], 10 - \ [ 'percent' ], 11 - \ [ 'filetype' ], 12 - \ ] 13 - \ }, 14 - \ 'enable': { 15 - \ 'statusline': 1, 16 - \ 'tabline': 1, 17 - \ }, 18 - \ 'component_function': { 19 - \ 'readonly': 'LightLineReadonly', 20 - \ 'fugitive': 'LightLineFugitive', 21 - \ 'filetype': 'LightLineFiletype', 22 - \ 'mode': 'LightLineMode', 23 - \ }, 24 - \ 'component': { 25 - \ 'lineinfo': '%3l:%-2v', 26 - \ }, 27 - \ 'separator': { 'left': '', 'right': '' }, 28 - \ 'subseparator': { 'left': '', 'right': '' } 29 - \ } 30 - 31 - function! LightLineReadonly() 32 - return &ft !~? 'help\|undotree' && &readonly ? '' : '' 33 - endfunction 34 - 35 - function! LightLineFugitive() 36 - if &ft !~? 'undotree' && exists("*fugitive#head") 37 - let _ = fugitive#head() 38 - return strlen(_) ? ' '._ : '' 39 - endif 40 - return '' 41 - endfunction 42 - 43 - function! LightLineFiletype() 44 - return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype : 'no ft') : '' 45 - endfunction 46 - 47 - function! LightLineMode() 48 - return winwidth(0) > 60 ? lightline#mode() : '' 49 - endfunction 1 + let &statusline="%<%n >> %f %h%m%r << %{fugitive#statusline()}%=%4c:%l 0x%04B"
+1 -1
tmux/themes/agnoster.tmux
··· 4 4 set -g status-left-length 30 5 5 set -g status-left '#[fg=colour00,bg=colour08,nobold] #S #[fg=colour08,bg=colour00,nobold]' 6 6 7 - set -g status-right '#(eval tmux-airline #{client_width})' 7 + set -g status-right '#(reattach-to-user-namespace tmux-airline #{client_width})' 8 8 set -g status-right-length 150 9 9 10 10 set -g window-status-format "#[fg=colour08,bg=colour00] #I  #W#[default]"