this repo has no description
1
fork

Configure Feed

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

Replace Fisherman with fin

+2545 -229
-6
.gitmodules
··· 1 1 [submodule "tmux/plugins/tpm"] 2 2 path = tmux/plugins/tpm 3 3 url = https://github.com/tmux-plugins/tpm.git 4 - [submodule "fish/fisherman"] 5 - path = fish/fisherman 6 - url = git://github.com/fisherman/fisherman.git 7 4 [submodule "git/template/hooks/commit-comments"] 8 5 path = git/template/hooks/commit-comments 9 6 url = https://github.com/thebearjew/commit-comments.git 10 - [submodule "fish/base16"] 11 - path = fish/base16 12 - url = https://github.com/chriskempson/base16-shell.git
+1 -1
bin/git-cleanup
··· 1 1 #!/bin/sh 2 2 3 - git branch --merged master | grep -v '^\*' | xargs -n1 git branch -d 3 + git branch --merged master | grep -v '^\*' | grep -v master | xargs -n1 git branch -d
+7 -8
bin/tmux-airline
··· 1 - #!/bin/sh 1 + #!/bin/bash 2 2 3 3 SEP= 4 - SEPE= 4 + SEPE=$(echo -e "\ue0b3") 5 5 6 6 CLOCK=⌚ 7 - CALENDAR=☼ 7 + CALENDAR=📆 8 8 MUSIC=♫ 9 9 10 10 WIDTH="${1}" ··· 14 14 15 15 if [ "$WIDTH" -gt "$MEDIUM" ]; then 16 16 if type mpc >/dev/null; then 17 - MPD="#[fg=colour252,bg=default,nobold,noitalics,nounderscore]$SEP#[fg=colour16,bg=colour252,bold,noitalics,nounderscore] $MUSIC $(mpc current)" 18 - date_colour='colour252' 17 + MPD="#[fg=colour15,bg=default,nobold,noitalics,nounderscore]$SEP#[fg=colour00,bg=colour15,bold,noitalics,nounderscore] $MUSIC $(mpc current)" 19 18 fi 20 19 fi 21 20 22 21 if [ "$WIDTH" -ge "$SMALL" ]; then 23 - UNAME="#[fg=colour21,bg=colour18,nobold,noitalics,nounderscore]$SEP#[fg=colour18,bg=colour21,bold,noitalics,nounderscore] $(uname -n)" 22 + UNAME="#[fg=colour15,bg=colour08,nobold,noitalics,nounderscore]$SEP#[fg=colour00,bg=colour15,bold,noitalics,nounderscore] $(uname -n)" 24 23 fi 25 24 26 - DATE="#[fg=colour18,bg=${date_colour:-default},nobold,noitalics,nounderscore]$SEP#[fg=colour20,bg=colour18,nobold,noitalics,nounderscore] $CALENDAR $(date +'%d.%m.%y')" 27 - TIME="#[fg=colour19,bg=colour18,nobold,noitalics,nounderscore]$SEPE#[fg=colour20,bg=colour18,bold,noitalics,nounderscore] $CLOCK $(date +'%H:%M')" 25 + DATE="#[fg=colour08,nobold,noitalics,nounderscore]$SEP#[fg=colour00,bg=colour08,nobold,noitalics,nounderscore] $CALENDAR $(date +'%d.%m.%y')" 26 + TIME="#[fg=colour00,bg=colour08,nobold,noitalics,nounderscore]$SEPE#[fg=colour00,bg=colour08,nobold,noitalics,nounderscore] $CLOCK $(date +'%H:%M')" 28 27 29 28 echo "$MPD $DATE $TIME $UNAME " | sed 's/ *$/ /g'
+3
fish/.gitignore
··· 1 + /fishd.* 2 + /config.* 3 + /fish_history
+8 -4
fish/Makefile
··· 2 2 3 3 PWD = $(shell pwd) 4 4 5 - install: 6 - $(LN) ${PWD}/functions $(XDG_CONFIG_HOME)/fish/functions 7 - $(LN) ${PWD}/completions $(XDG_CONFIG_HOME)/fish/completions 8 - $(LN) ${PWD}/config.fish $(XDG_CONFIG_HOME)/fish/config.fish 5 + install: fin 6 + $(LN) ${PWD} $(XDG_CONFIG_HOME)/fish 7 + 8 + functions/fin.fish: 9 + $(WGET) -O$@ https://raw.githubusercontent.com/fishery/fin/master/fin.fish 10 + 11 + fin: functions/fin.fish 12 + fish -c 'fin' 9 13 10 14 .PHONY: install
+1
fish/bundle
··· 1 + hauleth/agnoster
+8
fish/completions/fin.fish
··· 1 + complete -xc fin -s h -l help -d "Show usage help" 2 + complete -xc fin -s q -l quiet -d "Enable quiet mode" 3 + complete -xc fin -s v -l version -d "Show version information" 4 + complete -xc fin -n "__fish_use_subcommand" -a install -d "Install plugins / i" 5 + complete -xc fin -n "__fish_use_subcommand" -a update -d "Update fin and plugins / u" 6 + complete -xc fin -n "__fish_use_subcommand" -a rm -d "Remove plugins / r" 7 + complete -xc fin -n "__fish_use_subcommand" -a ls -d "List plugins / l" 8 + complete -xc fin -n "__fish_use_subcommand" -a help -d "Show help / h"
+1 -9
fish/config.fish
··· 11 11 # channel. 12 12 set -gx NIX_PATH nixpkgs=$HOME/.nix-defexpr/channels/nixpkgs 13 13 14 - set fisher_home $DOTFILES/fish/fisherman 15 - set fisher_config $HOME/.config/fisherman 16 - source $fisher_home/config.fish 17 - 18 - theme base16-ocean dark 19 - 20 - # set fish_greeting (fortune zen) 14 + # theme base16-ocean dark 21 15 22 16 enable direnv hook fish 23 17 enable hub alias -s 24 18 enable jump shell fish 25 19 enable rbenv init - 26 20 enable thefuck --alias 27 - 28 - agnoster powerline
+1
fish/functions/agnoster.fish
··· 1 + /home/hauleth/.config/fin/agnoster/agnoster.fish
+1951
fish/functions/fin.fish
··· 1 + # The MIT License (MIT) 2 + # 3 + # Copyright (c) 2016 Jorge Bucaran 4 + # 5 + # Permission is hereby granted, free of charge, to any person obtaining a copy of 6 + # this software and associated documentation files (the "Software"), to deal in 7 + # the Software without restriction, including without limitation the rights to 8 + # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 + # the Software, and to permit persons to whom the Software is furnished to do so, 10 + # subject to the following conditions: 11 + # 12 + # The above copyright notice and this permission notice shall be included in all 13 + # copies or substantial portions of the Software. 14 + # 15 + # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 + # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 + # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 + # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 + # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 + # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 + 22 + 23 + set -g fin_version "1.0.0-beta" 24 + 25 + 26 + function __fin_install 27 + if test -z "$argv" 28 + __fin_read_bundle_file | read -az argv 29 + end 30 + 31 + set -e __fin_fetch_plugins_state 32 + 33 + if set -l fetched (__fin_plugin_fetch_items (__fin_plugin_get_missing $argv)) 34 + if test -z "$fetched" 35 + set -l count (count $argv) 36 + 37 + if test "$count" -eq 1 38 + if test -d "$argv[1]" 39 + set argv[1] (__fin_plugin_normalize_path "$argv[1]") 40 + end 41 + 42 + set -l base (__fin_plugin_get_names "$argv[1]")[1] 43 + 44 + __fin_log warn " 45 + It seems @$base@ is already installed 46 + __""$fin_config/$base""__ 47 + " $__fin_stderr 48 + 49 + else 50 + __fin_log warn "No plugins to install or missing dependencies." $__fin_stderr 51 + 52 + __fin_log says " 53 + 54 + If you tried to install any plugins, it's likely 55 + they are already installed in your shell. To see 56 + what's installed, run @fin ls@. 57 + " $__fin_stderr 58 + end 59 + 60 + return 1 61 + end 62 + 63 + for i in $fetched 64 + __fin_plugin_enable "$fin_config/$i" 65 + end 66 + 67 + else 68 + __fin_log error " 69 + There was an error cloning @$fetched@. 70 + " $__fin_stderr 71 + 72 + __fin_log says " 73 + 74 + You can use a url or prepend a namespace to 75 + the plugin's name, for example: @omf@/$fetched 76 + " $__fin_stderr 77 + 78 + return 1 79 + end 80 + end 81 + 82 + 83 + function __fin_plugin_fetch_items 84 + __fin_show_spinner 85 + 86 + set -l jobs 87 + set -l links 88 + set -l white 89 + set -l count (count $argv) 90 + 91 + if test "$count" -eq 0 92 + return 93 + end 94 + 95 + switch "$__fin_fetch_plugins_state" 96 + case "" 97 + if test "$count" = 1 98 + __fin_log says "Installing @$count@ plugin" $__fin_stderr 99 + else 100 + __fin_log says "Installing @$count@ plugins" $__fin_stderr 101 + end 102 + 103 + set -g __fin_fetch_plugins_state "fetching" 104 + 105 + case "fetching" 106 + __fin_log says "Installing @$count@ dependencies" $__fin_stderr 107 + set -g __fin_fetch_plugins_state "done" 108 + 109 + case "done" 110 + end 111 + 112 + for i in $argv 113 + set -l names 114 + 115 + switch "$i" 116 + case \*gist.github.com\* 117 + __fin_log says "Resolving gist name..." 118 + if not set names (__fin_get_plugin_name_from_gist "$i") "" 119 + __fin_log error " 120 + I couldn't find your gist 121 + @$i@ 122 + " 123 + continue 124 + end 125 + 126 + case \* 127 + set names (__fin_plugin_get_names "$i") 128 + end 129 + 130 + if test -d "$i" 131 + command ln -sfF "$i" "$fin_config/$names[1]" 132 + set links $links "$names[1]" 133 + continue 134 + end 135 + 136 + set -l source "$fin_cache/$names[1]" 137 + 138 + if test -z "$names[2]" 139 + if test -d "$source" 140 + if test -L "$source" 141 + command ln -sfF "$source" "$fin_config" 142 + else 143 + command cp -rf "$source" "$fin_config" 144 + end 145 + else 146 + set jobs $jobs (__fin_plugin_url_clone_async "$i" "$names[1]") 147 + end 148 + else 149 + if test -d "$source" 150 + set -l real_namespace (__fin_plugin_get_url_info --dirname "$source" ) 151 + 152 + if test "$real_namespace" = "$names[2]" 153 + command cp -rf "$source" "$fin_config" 154 + else 155 + set jobs $jobs (__fin_plugin_url_clone_async "$i" "$names[1]") 156 + end 157 + else 158 + set jobs $jobs (__fin_plugin_url_clone_async "$i" "$names[1]") 159 + end 160 + end 161 + 162 + set fetched $fetched "$names[1]" 163 + end 164 + 165 + __fin_jobs_await $jobs 166 + 167 + for i in $fetched 168 + if test ! -d "$fin_cache/$i" 169 + printf "%s\n" "$i" 170 + return 1 171 + end 172 + end 173 + 174 + if test ! -z "$fetched" 175 + __fin_plugin_fetch_items (__fin_plugin_get_missing $fetched) 176 + printf "%s\n" $fetched 177 + end 178 + 179 + if test ! -z "$links" 180 + __fin_plugin_fetch_items (__fin_plugin_get_missing $links) 181 + printf "%s\n" $links 182 + end 183 + end 184 + 185 + 186 + function __fin_plugin_url_clone_async -a url name 187 + switch "$url" 188 + case https://\* 189 + case github.com/\* 190 + set url "https://$url" 191 + 192 + case \?\*/\?\* 193 + set url "https://github.com/$url" 194 + 195 + case \* 196 + set url "https://github.com/fishery/$url" 197 + end 198 + 199 + set -l nc (set_color normal) 200 + set -l red (set_color red) 201 + set -l uline (set_color -u) 202 + set -l green (set_color green) 203 + set -l magenta (set_color magenta) 204 + 205 + set -l hm_url (printf "%s\n" "$url" | sed 's|^https://||') 206 + 207 + fish -c " 208 + set -lx GIT_ASKPASS /bin/echo 209 + 210 + if command git clone -q --depth 1 '$url' '$fin_cache/$name' ^ /dev/null 211 + printf 'fin $green""OKAY""$nc $magenta%18s$nc $uline%s$nc\n' '$name' '$hm_url' 212 + command cp -rf '$fin_cache/$name' '$fin_config' 213 + else 214 + printf 'fin $red""ARGH""$nc $magenta%18s$nc $uline%s$nc\n' '$name' '$hm_url' 215 + end 216 + " > /dev/stderr & 217 + 218 + __fin_jobs_get -l 219 + end 220 + 221 + 222 + function __fin_update 223 + set -l jobs 224 + set -l count (count $argv) 225 + set -l updated 226 + 227 + if test "$count" = 0 228 + return 229 + end 230 + 231 + if test "$count" -eq 1 232 + __fin_log says "Updating @$count@ plugin" $__fin_stderr 233 + else 234 + __fin_log says "Updating @$count@ plugins" $__fin_stderr 235 + end 236 + 237 + for i in $argv 238 + set -l path "$fin_config/$i" 239 + 240 + if test -d "$path" 241 + set updated $updated "$i" 242 + set jobs $jobs (__fin_update_path_async "$i" "$path") 243 + else 244 + __fin_log warn "@$i@ is not installed" 245 + end 246 + end 247 + 248 + __fin_jobs_await $jobs 249 + 250 + set -g __fin_fetch_plugins_state "fetching" 251 + set -l fetched (__fin_plugin_fetch_items (__fin_plugin_get_missing $updated)) 252 + 253 + for i in $updated $fetched 254 + if test "$i" = "$fin_active_prompt" 255 + set fin_active_prompt 256 + end 257 + __fin_plugin_enable "$fin_config/$i" 258 + end 259 + end 260 + 261 + 262 + function __fin_self_update 263 + set -l raw_url "https://raw.githubusercontent.com/fishery/fin/master/fin.fish" 264 + set -l fake_qs (date "+%s") 265 + set -l file (status --current-filename) 266 + 267 + set -l previous_version "$fin_version" 268 + 269 + fish -c "curl --max-time 5 -sS '$raw_url?$fake_qs' > $file.$fake_qs" & 270 + 271 + __fin_jobs_await (__fin_jobs_get -l) 272 + 273 + if test -s "$file.$fake_qs" 274 + command mv "$file.$fake_qs" "$file" 275 + end 276 + 277 + source "$file" 278 + fin -v > /dev/null 279 + set -l new_version "$fin_version" 280 + 281 + if test "$previous_version" = "$fin_version" 282 + __fin_log says "@fin is up to date@" $__fin_stderr 283 + else 284 + __fin_log okay "You are now running fin @$fin_version@" $__fin_stderr 285 + 286 + __fin_log says " 287 + 288 + To see the change log, please visit: 289 + __https://github.com/fishery/fin/releases 290 + " $__fin_stderr 291 + end 292 + end 293 + 294 + 295 + function __fin_update_path_async -a name path 296 + set -l nc (set_color normal) 297 + set -l red (set_color red) 298 + set -l uline (set_color -u) 299 + set -l green (set_color green) 300 + set -l magenta (set_color magenta) 301 + 302 + fish -c " 303 + 304 + pushd $path 305 + 306 + if not command git fetch -q origin master ^ /dev/null 307 + printf 'fin $red""ARGH""$nc $magenta%18s$nc $red✘$nc fetch error\n' '$name' 308 + exit 309 + end 310 + 311 + set -l commits (command git rev-list --left-right --count master..FETCH_HEAD ^ /dev/null | cut -d\t -f2) 312 + 313 + command git reset -q --hard FETCH_HEAD ^ /dev/null 314 + command git clean -qdfx 315 + 316 + if test -z \"\$commits\" -o \"\$commits\" -eq 0 317 + printf 'fin $green""OKAY""$nc $magenta%18s$nc $green•$nc up to date\n' '$name' 318 + command cp -rf '$path' '$fin_cache/$name' 319 + else 320 + printf 'fin $green""OKAY""$nc $magenta%18s$nc $green▸$nc $magenta%s$nc new commits\n' '$name' \$commits 321 + end 322 + 323 + " > /dev/stderr & 324 + 325 + __fin_jobs_get -l 326 + end 327 + 328 + 329 + function __fin_plugin_enable -a path 330 + if __fin_plugin_is_prompt "$path" 331 + if test ! -z "$fin_active_prompt" 332 + __fin_plugin_disable "$fin_config/$fin_active_prompt" 333 + end 334 + 335 + set -U fin_active_prompt (basename "$path") 336 + end 337 + 338 + set -l plugin_name (basename $path) 339 + 340 + for file in $path/{functions/*,}*.fish 341 + set -l base (basename "$file") 342 + 343 + if test "$base" = "uninstall.fish" 344 + continue 345 + end 346 + 347 + switch "$base" 348 + case {,fish_}key_bindings.fish 349 + __fin_key_bindings_append "$plugin_name" "$file" 350 + continue 351 + end 352 + 353 + set -l dir "functions" 354 + 355 + if test "$base" = "init.fish" 356 + set dir "conf.d" 357 + 358 + set base "$plugin_name.$base" 359 + end 360 + 361 + set -l target "$fish_config/$dir/$base" 362 + 363 + command ln -sfF "$file" "$target" 364 + builtin source "$target" 365 + 366 + if test "$base" = "set_color_custom.fish" 367 + printf "%s\n" "$fish_color_normal" "$fish_color_command" "$fish_color_param" "$fish_color_redirection" "$fish_color_comment" "$fish_color_error" "$fish_color_escape" "$fish_color_operator" "$fish_color_end" "$fish_color_quote" "$fish_color_autosuggestion" "$fish_color_user" "$fish_color_valid_path" "$fish_color_cwd" "$fish_color_cwd_root" "$fish_color_match" "$fish_color_search_match" "$fish_color_selection" "$fish_pager_color_prefix" "$fish_pager_color_completion" "$fish_pager_color_description" "$fish_pager_color_progress" "$fish_color_history_current" "$fish_color_host" > "$fish_config/fish_colors" 368 + set_color_custom 369 + end 370 + end 371 + 372 + for file in $path/conf.d/*.{py,awk} 373 + set -l base (basename "$file") 374 + command ln -sfF "$file" "$fish_config/conf.d/$base" 375 + end 376 + 377 + for file in $path/{functions/,}*.{py,awk} 378 + set -l base (basename "$file") 379 + command ln -sfF "$file" "$fish_config/functions/$base" 380 + end 381 + 382 + for file in $path/conf.d/*.fish 383 + set -l base (basename "$file") 384 + set -l target "$fish_config/conf.d/$base" 385 + 386 + command ln -sfF "$file" "$target" 387 + builtin source "$target" 388 + end 389 + 390 + for file in $path/completions/*.fish 391 + set -l base (basename "$file") 392 + set -l target "$fish_config/completions/$base" 393 + 394 + command ln -sfF "$file" "$target" 395 + builtin source "$target" 396 + end 397 + 398 + return 0 399 + end 400 + 401 + 402 + function __fin_plugin_disable -a path 403 + set -l plugin_name (basename $path) 404 + 405 + for file in $path/{functions/*,}*.fish 406 + set -l name (basename "$file" .fish) 407 + set -l base "$name.fish" 408 + 409 + if test "$base" = "uninstall.fish" 410 + builtin source "$file" 411 + continue 412 + end 413 + 414 + switch "$base" 415 + case {,fish_}key_bindings.fish 416 + __fin_key_bindings_remove "$plugin_name" 417 + continue 418 + end 419 + 420 + set -l dir "functions" 421 + 422 + if test "$base" = "init.fish" 423 + set dir "conf.d" 424 + set base "$plugin_name.$base" 425 + end 426 + 427 + command rm -f "$fish_config/$dir/$base" 428 + 429 + functions -e "$name" 430 + 431 + if test "$base" = "set_color_custom.fish" 432 + set -l fish_colors_config "$fish_config/fish_colors" 433 + 434 + if test ! -f "$fish_colors_config" 435 + __fin_reset_default_fish_colors 436 + continue 437 + end 438 + 439 + set -l IFS \n 440 + 441 + read -laz colors < $fish_colors_config 442 + set colors[25] "" 443 + 444 + set -l IFS " " 445 + 446 + echo "$colors[1]" | read -a -U fish_color_normal 447 + echo "$colors[2]" | read -a -U fish_color_command 448 + echo "$colors[3]" | read -a -U fish_color_param 449 + echo "$colors[4]" | read -a -U fish_color_redirection 450 + echo "$colors[5]" | read -a -U fish_color_comment 451 + echo "$colors[6]" | read -a -U fish_color_error 452 + echo "$colors[7]" | read -a -U fish_color_escape 453 + echo "$colors[8]" | read -a -U fish_color_operator 454 + echo "$colors[9]" | read -a -U fish_color_end 455 + echo "$colors[10]" | read -a -U fish_color_quote 456 + echo "$colors[11]" | read -a -U fish_color_autosuggestion 457 + echo "$colors[12]" | read -a -U fish_color_user 458 + echo "$colors[13]" | read -a -U fish_color_valid_path 459 + echo "$colors[14]" | read -a -U fish_color_cwd 460 + echo "$colors[15]" | read -a -U fish_color_cwd_root 461 + echo "$colors[16]" | read -a -U fish_color_match 462 + echo "$colors[17]" | read -a -U fish_color_search_match 463 + echo "$colors[18]" | read -a -U fish_color_selection 464 + echo "$colors[19]" | read -a -U fish_pager_color_prefix 465 + echo "$colors[20]" | read -a -U fish_pager_color_completion 466 + echo "$colors[21]" | read -a -U fish_pager_color_description 467 + echo "$colors[22]" | read -a -U fish_pager_color_progress 468 + echo "$colors[23]" | read -a -U fish_color_history_current 469 + echo "$colors[24]" | read -a -U fish_color_host 470 + 471 + command rm -f $fish_colors_config 472 + end 473 + end 474 + 475 + for file in $path/conf.d/*.{py,awk} 476 + set -l base (basename "$file") 477 + command rm -f "$fish_config/conf.d/$base" 478 + end 479 + 480 + for file in $path/{functions/,}*.{py,awk} 481 + set -l base (basename "$file") 482 + command rm -f "$fish_config/functions/$base" 483 + end 484 + 485 + for file in $path/conf.d/*.fish 486 + set -l base (basename "$file") 487 + command rm -f "$fish_config/conf.d/$base" 488 + end 489 + 490 + for file in $path/completions/*.fish 491 + set -l name (basename "$file" .fish) 492 + set -l base "$name.fish" 493 + 494 + command rm -f "$fish_config/completions/$base" 495 + complete -c "$name" --erase 496 + end 497 + 498 + if __fin_plugin_is_prompt "$path" 499 + set -U fin_active_prompt 500 + builtin source $__fish_datadir/functions/fish_prompt.fish ^ /dev/null 501 + end 502 + 503 + command rm -rf "$path" > /dev/stderr 504 + end 505 + 506 + 507 + function __fin_get_plugin_name_from_gist -a url 508 + set -l gist_id (printf "%s\n" "$url" | command sed 's|.*/||') 509 + set -l name (fish -c " 510 + 511 + fin -v > /dev/null 512 + curl -Ss https://api.github.com/gists/$gist_id & 513 + 514 + __fin_jobs_await (__fin_jobs_get -l) 515 + 516 + " | command awk ' 517 + 518 + /"files": / { 519 + files++ 520 + } 521 + 522 + /"[^ ]+.fish": / && files { 523 + gsub("^ *\"|\.fish.*", "") 524 + print 525 + } 526 + 527 + ') 528 + 529 + if test -z "$name" 530 + return 1 531 + end 532 + 533 + printf "%s\n" $name 534 + end 535 + 536 + 537 + function __fin_list 538 + set -l config $fin_config/* 539 + 540 + if test -z "$config" 541 + return 1 542 + end 543 + 544 + set -l white 545 + set -l links (command find $config -maxdepth 0 -type l ! -name "$fin_active_prompt" ^ /dev/null) 546 + set -l names (command find $config -maxdepth 0 -type d ! -name "$fin_active_prompt" ^ /dev/null) 547 + 548 + if test ! -z "$links" 549 + set white " " 550 + printf "%s\n" $links | command sed "s|.*/|@ |" 551 + end 552 + 553 + if test ! -z "$fin_active_prompt" 554 + set white " " 555 + printf "* %s\n" "$fin_active_prompt" 556 + end 557 + 558 + if test ! -z "$names" 559 + printf "%s\n" $names | command sed "s|.*/|$white|" 560 + end 561 + end 562 + 563 + 564 + function __fin_list_plugin_directory -a item 565 + set -l fd $__fin_stderr 566 + 567 + set -e argv[1] 568 + set -l path "$fin_config/$item" 569 + 570 + if test ! -d "$path" 571 + __fin_log error "$item is not installed" $__fin_stderr 572 + 573 + return 1 574 + end 575 + 576 + pushd "$path" 577 + 578 + set -l color (set_color $fish_color_command) 579 + set -l nc (set_color normal) 580 + set -l inside_tree 581 + 582 + if contains -- --no-color $argv 583 + set color 584 + set nc 585 + set fd $__fin_stdout 586 + end 587 + 588 + printf "$color%s$nc\n" "$PWD" > $fd 589 + 590 + for file in .* ** 591 + if test -f "$file" 592 + switch "$file" 593 + case .\* 594 + printf " %s\n" $file 595 + set inside_tree 596 + 597 + case \*/\* 598 + if test -z "$inside_tree" 599 + printf " $color%s/$nc\n" (dirname $file) 600 + set inside_tree - 601 + end 602 + printf " %s\n" (basename $file) 603 + 604 + case \* 605 + printf " %s\n" $file 606 + set inside_tree 607 + end 608 + end 609 + end > $fd 610 + 611 + popd 612 + end 613 + 614 + 615 + function __fin_log -a log message fd 616 + set -l nc (set_color normal) 617 + set -l red (set_color red) 618 + set -l warn (set_color black -b yellow) 619 + set -l green (set_color green) 620 + set -l bold (set_color magenta) 621 + set -l uline (set_color -u) 622 + 623 + switch "$fd" 624 + case "/dev/null" 625 + return 626 + 627 + case "" "/dev/stderr" 628 + set fd "/dev/stderr" 629 + 630 + case \* 631 + set nc "" 632 + set red "" 633 + set warn "" 634 + set green "" 635 + set bold "" 636 + set uline 637 + end 638 + 639 + printf "%s\n" "$message" | command awk ' 640 + function okay(name, s) { 641 + printf("'$nc'%s '$green'%s'$nc' %s\n", name, "OKAY", s) 642 + } 643 + 644 + function says(name, s) { 645 + printf("'$nc'%s '$green'%s'$nc' %s\n", name, "SAYS", s) 646 + } 647 + 648 + function warn(name, s) { 649 + printf("'$nc'%s '$warn'%s'$nc' %s\n", name, "WARN", s) 650 + } 651 + 652 + function error(name, s) { 653 + printf("'$nc'%s '$red'%s'$nc' %s\n", name, "ARGH", s) 654 + } 655 + 656 + { 657 + sub(/^[ ]+/, "") 658 + gsub("``", " ") 659 + 660 + if (/@[^@]+@/) { 661 + n = match($0, /@[^@]+@/) 662 + if (n) { 663 + sub(/@[^@]+@/, "'$bold'" substr($0, RSTART + 1, RLENGTH - 2) "'$nc'", $0) 664 + } 665 + } 666 + 667 + if (/__[^_]+__/) { 668 + n = match($0, /__[^_]+__/) 669 + if (n) { 670 + sub(/__[^_]+__/, "'$uline'" substr($0, RSTART + 2, RLENGTH - 4) "'$nc'", $0) 671 + } 672 + } 673 + 674 + s[++len] = $0 675 + } 676 + 677 + END { 678 + for (i = 1; i <= len; i++) { 679 + if ((i == 1 || i == len) && (s[i] == "")) { 680 + continue 681 + } 682 + 683 + if (s[i] == "") { 684 + print 685 + } else { 686 + '$log'("fin", s[i]) 687 + } 688 + } 689 + } 690 + 691 + ' > "$fd" 692 + end 693 + 694 + 695 + function __fin_log_error_footer -a fd 696 + set -l url "https://github.com/fishery/fin/issues" 697 + set -l debug_log "$fin_cache/fin-debug.log" 698 + 699 + __fin_log error " 700 + For more help, visit the issue tracker 701 + @$url@ 702 + `` 703 + Include the following file with your issue 704 + @$debug_log@ 705 + " $fd 706 + end 707 + 708 + 709 + function __fin_jobs_get 710 + jobs $argv | command awk -v FS=\t ' 711 + /[0-9]+\t/{ 712 + jobs[++job_count] = $1 713 + } 714 + 715 + END { 716 + for (i = 1; i <= job_count; i++) { 717 + print(jobs[i]) 718 + } 719 + 720 + exit job_count == 0 721 + } 722 + ' 723 + end 724 + 725 + 726 + function __fin_jobs_await 727 + if test -z "$argv" 728 + return 729 + end 730 + 731 + while true 732 + for spinner in $fin_spinners 733 + printf " $spinner \r" > /dev/stderr 734 + sleep 0.04 735 + end 736 + 737 + set -l currently_active_jobs (__fin_jobs_get) 738 + 739 + if test -z "$currently_active_jobs" 740 + break 741 + end 742 + 743 + set -l has_jobs 744 + 745 + for i in $argv 746 + if builtin contains -- $i $currently_active_jobs 747 + set has_jobs "*" 748 + break 749 + end 750 + end 751 + 752 + if test -z "$has_jobs" 753 + break 754 + end 755 + end 756 + end 757 + 758 + 759 + function __fin_key_bindings_remove -a plugin_name 760 + set -l user_key_bindings "$fish_config/functions/fish_user_key_bindings.fish" 761 + set -l tmp (date "+%s") 762 + 763 + fish_indent < "$user_key_bindings" | sed -n "/### $plugin_name ###/,/### $plugin_name ###/{s/^ *bind /bind -e /p;};" > shit #| source ^ /dev/null 764 + 765 + sed "/### $plugin_name ###/,/### $plugin_name ###/d" < "$user_key_bindings" > "$user_key_bindings.$tmp" 766 + command mv -f "$user_key_bindings.$tmp" "$user_key_bindings" 767 + 768 + if awk ' 769 + /^$/ { next } 770 + 771 + /^function fish_user_key_bindings/ { 772 + i++ 773 + next 774 + } 775 + 776 + /^end$/ && 1 == i { 777 + exit 0 778 + } 779 + 780 + // { 781 + exit 1 782 + } 783 + 784 + ' < "$user_key_bindings" 785 + 786 + command rm -f "$user_key_bindings" 787 + end 788 + end 789 + 790 + 791 + function __fin_key_bindings_append -a plugin_name file 792 + set -l user_key_bindings "$fish_config/functions/fish_user_key_bindings.fish" 793 + 794 + command mkdir -p (dirname "$user_key_bindings") 795 + touch "$user_key_bindings" 796 + 797 + set -l key_bindings_source ( 798 + fish_indent < "$user_key_bindings" | awk ' 799 + 800 + /^function fish_user_key_bindings/ { 801 + reading_function_source = 1 802 + next 803 + } 804 + 805 + /^end$/ { 806 + exit 807 + } 808 + 809 + reading_function_source { 810 + print $0 811 + next 812 + } 813 + 814 + ' 815 + ) 816 + 817 + set -l plugin_key_bindings_source ( 818 + fish_indent < "$file" | awk -v name="$plugin_name" ' 819 + 820 + BEGIN { 821 + printf("### %s ###\n", name) 822 + } 823 + 824 + END { 825 + printf("### %s ###\n", name) 826 + } 827 + 828 + /^function fish_user_key_bindings$/ { 829 + check_for_and_keyword = 1 830 + next 831 + } 832 + 833 + /^end$/ && check_for_and_keyword { 834 + end = 0 835 + next 836 + } 837 + 838 + !/^ *(#.*)*$/ { 839 + gsub("#.*", "") 840 + printf("%s\n", $0) 841 + } 842 + 843 + ' 844 + ) 845 + 846 + printf "%s\n" $key_bindings_source $plugin_key_bindings_source | awk ' 847 + 848 + BEGIN { 849 + print "function fish_user_key_bindings" 850 + } 851 + 852 + // 853 + 854 + END { 855 + print "end" 856 + } 857 + 858 + ' | fish_indent > "$user_key_bindings" 859 + end 860 + 861 + 862 + function __fin_plugin_is_prompt -a path 863 + if test -e $path/fish_prompt.fish 864 + return 865 + end 866 + 867 + if test -e $path/functions/fish_prompt.fish 868 + return 869 + end 870 + 871 + if test -e $path/fish_right_prompt.fish 872 + return 873 + end 874 + 875 + if test -e $path/functions/fish_right_prompt.fish 876 + return 877 + end 878 + 879 + return 1 880 + end 881 + 882 + 883 + function __fin_plugin_get_names 884 + printf "%s\n" $argv | command awk ' 885 + 886 + { 887 + sub(/\/$/, "") 888 + n = split($0, s, "/") 889 + sub(/^(omf|omf-theme|omf-plugin|plugin|theme|fish|fisher)-/, "", s[n]) 890 + 891 + printf("%s\n%s\n", s[n], s[n - 1]) 892 + } 893 + 894 + ' 895 + end 896 + 897 + 898 + function __fin_plugin_get_url_info -a option 899 + set -e argv[1] 900 + 901 + if test -z "$argv" 902 + return 903 + end 904 + 905 + cat {$argv}/.git/config ^ /dev/null | command awk -v option="$option" ' 906 + /url/ { 907 + n = split($3, s, "/") 908 + 909 + if ($3 ~ /https:\/\/gist/) { 910 + printf("# %s\n", $3) 911 + next 912 + } 913 + 914 + if (option == "--dirname") { 915 + printf("%s\n", s[n - 1]) 916 + 917 + } else if (option == "--basename") { 918 + printf("%s\n", s[n]) 919 + 920 + } else { 921 + printf("%s/%s\n", s[n - 1], s[n]) 922 + } 923 + } 924 + ' 925 + end 926 + 927 + 928 + function __fin_plugin_normalize_path 929 + printf "%s\n" $argv | command awk -v pwd="$PWD" ' 930 + 931 + /^\.$/ { 932 + print(pwd) 933 + next 934 + } 935 + 936 + /^\// { 937 + sub(/\/$/, "") 938 + print($0) 939 + next 940 + } 941 + 942 + { 943 + sub(/\/$/, "") 944 + n = split($0, a, "/") 945 + print(pwd "/" (n > 1 ? a[n - 1] "/" : "") a[n]) 946 + 947 + next 948 + } 949 + 950 + ' 951 + end 952 + 953 + 954 + function __fin_plugin_get_missing 955 + for i in $argv 956 + if test -d "$i" 957 + set i (__fin_plugin_normalize_path "$i") 958 + end 959 + 960 + set -l name (__fin_plugin_get_names "$i")[1] 961 + 962 + if set -l path (__fin_plugin_is_installed "$name") 963 + for file in fishfile bundle 964 + if test -s "$path/$file" 965 + __fin_plugin_get_missing (__fin_read_bundle_file < "$path/$file") 966 + end 967 + end 968 + else 969 + printf "%s\n" "$i" 970 + end 971 + end 972 + 973 + __fin_show_spinner 974 + end 975 + 976 + 977 + function __fin_plugin_is_installed -a name 978 + if test -z "$name" -o ! -d "$fin_config/$name" 979 + return 1 980 + end 981 + 982 + printf "%s\n" "$fin_config/$name" 983 + end 984 + 985 + 986 + function __fin_reset_default_fish_colors 987 + set -U fish_color_normal normal 988 + set -U fish_color_command 005fd7 purple 989 + set -U fish_color_param 00afff cyan 990 + set -U fish_color_redirection 005fd7 991 + set -U fish_color_comment 600 992 + set -U fish_color_error red --bold 993 + set -U fish_color_escape cyan 994 + set -U fish_color_operator cyan 995 + set -U fish_color_end green 996 + set -U fish_color_quote brown 997 + set -U fish_color_autosuggestion 555 yellow 998 + set -U fish_color_user green 999 + set -U fish_color_valid_path --underline 1000 + set -U fish_color_cwd green 1001 + set -U fish_color_cwd_root red 1002 + set -U fish_color_match cyan 1003 + set -U fish_color_search_match --background=purple 1004 + set -U fish_color_selection --background=purple 1005 + set -U fish_pager_color_prefix cyan 1006 + set -U fish_pager_color_completion normal 1007 + set -U fish_pager_color_description 555 yellow 1008 + set -U fish_pager_color_progress cyan 1009 + set -U fish_color_history_current cyan 1010 + set -U fish_color_host normal 1011 + end 1012 + 1013 + 1014 + function __fin_read_bundle_file 1015 + command awk -v FS=\t ' 1016 + /^$/ || /^[ \t]*#/ { 1017 + next 1018 + } 1019 + 1020 + /^[ \t]*package / { 1021 + sub("^[ \t]*package ", "oh-my-fish/plugin-") 1022 + } 1023 + 1024 + { 1025 + sub("^[@* \t]*", "") 1026 + 1027 + if (!seen[$0]++) { 1028 + printf("%s\n", $0) 1029 + } 1030 + } 1031 + ' 1032 + end 1033 + 1034 + 1035 + function __fin_completions_write 1036 + functions __fin_completions_write | fish_indent | __fin_parse_comments_from_function 1037 + 1038 + # complete -xc fin -s h -l help -d "Show usage help" 1039 + # complete -xc fin -s q -l quiet -d "Enable quiet mode" 1040 + # complete -xc fin -s v -l version -d "Show version information" 1041 + # complete -xc fin -n "__fish_use_subcommand" -a install -d "Install plugins / i" 1042 + # complete -xc fin -n "__fish_use_subcommand" -a update -d "Update fin and plugins / u" 1043 + # complete -xc fin -n "__fish_use_subcommand" -a rm -d "Remove plugins / r" 1044 + # complete -xc fin -n "__fish_use_subcommand" -a ls -d "List plugins / l" 1045 + # complete -xc fin -n "__fish_use_subcommand" -a help -d "Show help / h" 1046 + end 1047 + 1048 + 1049 + function __fin_humanize_duration 1050 + awk ' 1051 + function hmTime(time, stamp) { 1052 + split("h:m:s:ms", units, ":") 1053 + 1054 + for (i = 2; i >= -1; i--) { 1055 + if (t = int( i < 0 ? time % 1000 : time / (60 ^ i * 1000) % 60 )) { 1056 + stamp = stamp t units[sqrt((i - 2) ^ 2) + 1] " " 1057 + } 1058 + } 1059 + 1060 + if (stamp ~ /^ *$/) { 1061 + return "0ms" 1062 + } 1063 + 1064 + return substr(stamp, 1, length(stamp) - 1) 1065 + } 1066 + 1067 + { 1068 + print hmTime($0) 1069 + } 1070 + ' 1071 + end 1072 + 1073 + 1074 + function __fin_get_key 1075 + stty -icanon -echo ^ /dev/null 1076 + 1077 + printf "$argv" > /dev/stderr 1078 + 1079 + while true 1080 + dd bs=1 count=1 ^ /dev/null | read -p "" -l yn 1081 + 1082 + switch "$yn" 1083 + case y Y n N 1084 + printf "\n" > /dev/stderr 1085 + printf "%s\n" $yn > /dev/stdout 1086 + break 1087 + end 1088 + end 1089 + 1090 + stty icanon echo > /dev/stderr ^ /dev/null 1091 + end 1092 + 1093 + 1094 + function __fin_get_epoch_in_ms -a elapsed 1095 + if test -z "$elapsed" 1096 + set elapsed 0 1097 + end 1098 + 1099 + perl -MTime::HiRes -e 'printf("%.0f\n", (Time::HiRes::time() * 1000) - '$elapsed')' 1100 + end 1101 + 1102 + 1103 + function __fin_parse_column_output 1104 + command awk -v FS=\t ' 1105 + { 1106 + 1107 + for (i = 1; i <= NF; i++) { 1108 + if ($i != "") { 1109 + print $i 1110 + } 1111 + } 1112 + 1113 + } 1114 + ' 1115 + end 1116 + 1117 + 1118 + function __fin_parse_comments_from_function 1119 + command awk ' 1120 + 1121 + /^[\t ]*# ?/ { 1122 + sub(/^[\t ]*# ?/, "") 1123 + a[++n] = $0 1124 + } 1125 + 1126 + END { 1127 + for (i = 1; i <= n; i++) { 1128 + printf("%s\n", a[i]) 1129 + } 1130 + } 1131 + 1132 + ' 1133 + end 1134 + 1135 + 1136 + function __fin_usage 1137 + set -l u (set_color -u) 1138 + set -l nc (set_color normal) 1139 + 1140 + echo "Usage: fin [<command>] [<plugins>] [--quiet] [--version]" 1141 + echo 1142 + echo "where <command> can be one of:" 1143 + echo " "$u"i"$nc"nstall (default)" 1144 + echo " "$u"u"$nc"pdate" 1145 + echo " "$u"r"$nc"m" 1146 + echo " "$u"l"$nc"s" 1147 + echo " "$u"h"$nc"elp" 1148 + end 1149 + 1150 + 1151 + function __fin_help -a command number 1152 + if test -z "$argv" 1153 + set -l page "$fin_cache/fin.1" 1154 + 1155 + if test ! -s "$page" 1156 + __fin_man_page_write > "$page" 1157 + end 1158 + 1159 + set -l pager "/usr/bin/less -s" 1160 + 1161 + if test ! -z "$PAGER" 1162 + set pager "$PAGER" 1163 + end 1164 + 1165 + man -P "$pager" -- "$page" 1166 + 1167 + command rm -f "$page" 1168 + 1169 + else 1170 + if test -z "$number" 1171 + set number 1 1172 + end 1173 + 1174 + set -l page "$fin_config/$command/man/man$number/$command.$number" 1175 + 1176 + if not man "$page" ^ /dev/null 1177 + __fin_log error "No manual entry for $command" $__fin_stderr 1178 + 1179 + if test -d "$fin_config/$command" 1180 + set -l url (__fin_plugin_get_url_info -- $fin_config/$command) 1181 + 1182 + if test ! -z "$url" 1183 + __fin_log says "Visit the online repository for help:" $__fin_stderr 1184 + __fin_log says "__https://github.com/$url" $__fin_stderr 1185 + end 1186 + else 1187 + __fin_log error "$command is not installed" $__fin_stderr 1188 + end 1189 + 1190 + return 1 1191 + end 1192 + end 1193 + end 1194 + 1195 + 1196 + function __fin_man_page_write 1197 + functions __fin_man_page_write | fish_indent | __fin_parse_comments_from_function 1198 + 1199 + # . 1200 + # .TH "FIN" "1" "April 2016" "" "fin" 1201 + # . 1202 + # .SH "NAME" 1203 + # \fBfin\fR \- fish plugin manager 1204 + # . 1205 + # .SH "SYNOPSIS" 1206 + # fin [\fIcommand\fR] [\fIplugins\fR] [\-\-quiet] [\-\-version] 1207 + # . 1208 + # .br 1209 + # . 1210 + # .SH "DESCRIPTION" 1211 + # fin is a one\-file, no\-configuration, concurrent plugin manager for the fish shell\. 1212 + # . 1213 + # .SH "USAGE" 1214 + # Install a plugin\. 1215 + # . 1216 + # .IP "" 4 1217 + # . 1218 + # .nf 1219 + # 1220 + # fin superman 1221 + # . 1222 + # .fi 1223 + # . 1224 + # .IP "" 0 1225 + # . 1226 + # .P 1227 + # Install from multiple sources\. 1228 + # . 1229 + # .IP "" 4 1230 + # . 1231 + # .nf 1232 + # 1233 + # fin omf/{grc,thefuck} fzf z 1234 + # . 1235 + # .fi 1236 + # . 1237 + # .IP "" 0 1238 + # . 1239 + # .P 1240 + # Install from a URL\. 1241 + # . 1242 + # .IP "" 4 1243 + # . 1244 + # .nf 1245 + # 1246 + # fin https://github\.com/edc/bass 1247 + # . 1248 + # .fi 1249 + # . 1250 + # .IP "" 0 1251 + # . 1252 + # .P 1253 + # Install from a gist\. 1254 + # . 1255 + # .IP "" 4 1256 + # . 1257 + # .nf 1258 + # 1259 + # fin https://gist\.github\.com/username/1f40e1c6e0551b2666b2 1260 + # . 1261 + # .fi 1262 + # . 1263 + # .IP "" 0 1264 + # . 1265 + # .P 1266 + # Install from a local directory\. 1267 + # . 1268 + # .IP "" 4 1269 + # . 1270 + # .nf 1271 + # 1272 + # fin ~/my_aliases 1273 + # . 1274 + # .fi 1275 + # . 1276 + # .IP "" 0 1277 + # . 1278 + # .P 1279 + # Use it a la vundle\. Edit \fB~/\.config/fish/bundle\fR and run \fBfin\fR to satisfy the changes\. 1280 + # . 1281 + # .IP "" 4 1282 + # . 1283 + # .nf 1284 + # 1285 + # $EDITOR ~/\.config/fish/bundle # add plugins 1286 + # fin 1287 + # . 1288 + # .fi 1289 + # . 1290 + # .IP "" 0 1291 + # . 1292 + # .P 1293 + # See what\'s installed\. 1294 + # . 1295 + # .IP "" 4 1296 + # . 1297 + # .nf 1298 + # 1299 + # fin ls 1300 + # @ my_aliases # this plugin is a local directory 1301 + # * superman # this plugin is the current prompt 1302 + # bass 1303 + # fzf 1304 + # grc 1305 + # thefuck 1306 + # z 1307 + # . 1308 + # .fi 1309 + # . 1310 + # .IP "" 0 1311 + # . 1312 + # .P 1313 + # Update everything\. 1314 + # . 1315 + # .IP "" 4 1316 + # . 1317 + # .nf 1318 + # 1319 + # fin update 1320 + # . 1321 + # .fi 1322 + # . 1323 + # .IP "" 0 1324 + # . 1325 + # .P 1326 + # Update some plugins\. 1327 + # . 1328 + # .IP "" 4 1329 + # . 1330 + # .nf 1331 + # 1332 + # fin update bass z fzf thefuck 1333 + # . 1334 + # .fi 1335 + # . 1336 + # .IP "" 0 1337 + # . 1338 + # .P 1339 + # Remove plugins\. 1340 + # . 1341 + # .IP "" 4 1342 + # . 1343 + # .nf 1344 + # 1345 + # fin rm superman 1346 + # . 1347 + # .fi 1348 + # . 1349 + # .IP "" 0 1350 + # . 1351 + # .P 1352 + # Remove everything\. 1353 + # . 1354 + # .IP "" 4 1355 + # . 1356 + # .nf 1357 + # 1358 + # fin ls | fin rm 1359 + # . 1360 + # .fi 1361 + # . 1362 + # .IP "" 0 1363 + # . 1364 + # .P 1365 + # Get help\. 1366 + # . 1367 + # .IP "" 4 1368 + # . 1369 + # .nf 1370 + # 1371 + # fin help z 1372 + # . 1373 + # .fi 1374 + # . 1375 + # .IP "" 0 1376 + # . 1377 + # .SH "FAQ" 1378 + # . 1379 + # .SS "1\. How do I uninstall fin?" 1380 + # Run 1381 + # . 1382 + # .IP "" 4 1383 + # . 1384 + # .nf 1385 + # 1386 + # fin self\-destroy 1387 + # . 1388 + # .fi 1389 + # . 1390 + # .IP "" 0 1391 + # . 1392 + # .SS "2\. What fish version is required?" 1393 + # fin was built for the latest fish, but at least 2\.2\.0 is required\. If you can\'t upgrade your build, append the following code to your \fB~/\.config/fish/config\.fish\fR for snippet \fIhttps://github\.com/fishery/fin/blob/master/faq\.md#12\-what\-is\-a\-plugin\fR support\. 1394 + # . 1395 + # .IP "" 4 1396 + # . 1397 + # .nf 1398 + # 1399 + # for file in ~/\.config/fish/conf\.d/*\.fish 1400 + # source $file 1401 + # end 1402 + # . 1403 + # .fi 1404 + # . 1405 + # .IP "" 0 1406 + # . 1407 + # .SS "3\. Is fin compatible with fisherman and oh my fish themes and plugins?" 1408 + # Yes\. 1409 + # . 1410 + # .SS "4\. Why fin? Why not ____?" 1411 + # fin learns from my mistakes building oh my fish, wahoo and fisherman\. It also takes some ideas from fundle and chips\. 1412 + # . 1413 + # .P 1414 + # Other reasons: 1415 + # . 1416 + # .IP "\(bu" 4 1417 + # fast and easy to install, update and uninstall 1418 + # . 1419 + # .IP "\(bu" 4 1420 + # small and fits in one file 1421 + # . 1422 + # .IP "\(bu" 4 1423 + # you don\'t need to modify your fish configuration to use it 1424 + # . 1425 + # .IP "\(bu" 4 1426 + # framework agnostic, no favorites 1427 + # . 1428 + # .IP "\(bu" 4 1429 + # zero impact on shell startup time 1430 + # . 1431 + # .IP "" 0 1432 + # . 1433 + # .SS "5\. Where does fin put stuff?" 1434 + # fin usually goes in \fB~/\.config/fish/functions/fin\.fish\fR\. 1435 + # . 1436 + # .P 1437 + # The cache and plugin configuration is created in \fB~/\.cache/fin\fR and \fB~/\.config/fin\fR respectively\. 1438 + # . 1439 + # .P 1440 + # The \fBbundle\fR file is stored in \fB~/\.config/fish\fR\. 1441 + # . 1442 + # .SS "6\. What is a bundle file and how do I use it?" 1443 + # The bundle file lists all the installed plugins\. 1444 + # . 1445 + # .P 1446 + # You can let fin take care of the bundle for you automatically, or write in the plugins you want and run \fBfin\fR to satisfy the changes\. 1447 + # . 1448 + # .IP "" 4 1449 + # . 1450 + # .nf 1451 + # 1452 + # fishery/superman 1453 + # omf/grc 1454 + # omf/thefuck 1455 + # fishery/z 1456 + # . 1457 + # .fi 1458 + # . 1459 + # .IP "" 0 1460 + # . 1461 + # .P 1462 + # This mechanism only installs plugins and missing dependencies\. To remove a plugin, use \fBfin rm\fR instead\. 1463 + # . 1464 + # .P 1465 + # The bundle file is inside your fish configuration directory \fB~/\.config/fish\fR so you can commit the entire tree to your dotfiles or only the bundle and that\'s it\. 1466 + # . 1467 + # .SS "7\. Where can I find a list of fish plugins?" 1468 + # Browse github/fishery, github/oh\-my\-fish, github/awesome\-fish or use the http://fisherman.sh online search to discover content\. 1469 + # . 1470 + # .SS "8\. How do I install, update, list or remove plugins?" 1471 + # See \fIUsage\fR\. 1472 + # . 1473 + # .SS "9\. How do I upgrade from ___?" 1474 + # You don\'t have to\. fin is framework agnostic and does not interfere with other known systems\. If you want to uninstall oh my fish or fisherman, refer to their documentation\. 1475 + # . 1476 + # .SS "10\. How do I update fin to the latest version?" 1477 + # Run 1478 + # . 1479 + # .IP "" 4 1480 + # . 1481 + # .nf 1482 + # 1483 + # fin update 1484 + # . 1485 + # .fi 1486 + # . 1487 + # .IP "" 0 1488 + # . 1489 + # .SS "12\. What is a plugin?" 1490 + # A plugin is: 1491 + # . 1492 + # .IP "1." 4 1493 + # a directory or git repo with a function \fB\.fish\fR file either at the root level of the project or inside a \fBfunctions\fR directory 1494 + # . 1495 + # .IP "2." 4 1496 + # a theme or prompt, i\.e, a \fBfish_prompt\.fish\fR, \fBfish_right_prompt\.fish\fR or both files 1497 + # . 1498 + # .IP "3." 4 1499 + # a snippet, i\.e, one or more \fB\.fish\fR files inside a directory named \fBconf\.d\fR that are evaluated by fish at the start of the shell 1500 + # . 1501 + # .IP "" 0 1502 + # . 1503 + # .SS "13\. How can I list plugins as dependencies to my plugin?" 1504 + # Create a new \fBbundle\fR file at the root level of your project and write in the plugin dependencies: 1505 + # . 1506 + # .IP "" 4 1507 + # . 1508 + # .nf 1509 + # 1510 + # owner/repo 1511 + # https://github\.com/dude/sweet 1512 + # https://gist\.github\.com/bucaran/c256586044fea832e62f02bc6f6daf32 1513 + # . 1514 + # .fi 1515 + # . 1516 + # .IP "" 0 1517 + # . 1518 + # .SS "14\. I have a question or request not addressed here\. Where should I put it?" 1519 + # Create a new ticket on the issue tracker: 1520 + # . 1521 + # .IP "\(bu" 4 1522 + # https://github\.com/fishery/fin/issues 1523 + # . 1524 + # .IP "" 0 1525 + # . 1526 + # .SS "15\. Why did you create a new project instead of improving fisherman?" 1527 + # . 1528 + # .IP "1." 4 1529 + # fisherman uses an index file and has built\-in search capabilities / advanced completions that are not compatible with fin\'s simpler model 1530 + # . 1531 + # .IP "2." 4 1532 + # I wanted a clean slate and a chance to experiment with something different 1533 + # . 1534 + # .IP "3." 4 1535 + # fin is more opinionated and pragmatic than fisherman, thus truer to fish configurability principle 1536 + # . 1537 + # .IP "" 0 1538 + # . 1539 + # .SS "16\. What about chips and fundle?" 1540 + # chips is far from ready and it\'s not written in fish either\. fundle inspired me to use a bundle and one\-file distribution, but it has limited capabilities and still requires you to edit your fish configuration\. 1541 + # . 1542 + # .SS "17\. Does this mean you are done with fisherman?" 1543 + # Nope\. 1544 + # . 1545 + # .SH "BUGS" 1546 + # When you find issues, please report them: 1547 + # . 1548 + # .IP "\(bu" 4 1549 + # \fIhttp://github\.com/fishery/fin/issues\fR 1550 + # . 1551 + # .IP "" 0 1552 + # . 1553 + # .P 1554 + # Be sure to include all of the output from fin that didn\'t work as expected\. 1555 + # . 1556 + # .SH "AUTHOR" 1557 + # Fisherman was created by Jorge Bucaran :: @bucaran :: j@bucaran\.me 1558 + # . 1559 + # .P 1560 + # See the contributor graph for a list of other people who have contributed to this project: 1561 + # . 1562 + # .IP "\(bu" 4 1563 + # \fIhttps://github\.com/fishery/fin/graphs/contributors\fR 1564 + # . 1565 + # .IP "" 0 1566 + end 1567 + 1568 + 1569 + function __fin_self_destroy 1570 + if test -z "$fish_config" -o -z "$fin_cache" -o -z "$fin_config" -o -L "$fin_cache" -o -L "$fin_config" 1571 + __fin_log error " 1572 + 1573 + Some of fin variables refer to symbolic links or were undefined. 1574 + 1575 + If you are running a custom fin setup, remove the following 1576 + directories and files by yourself: 1577 + 1578 + @$fin_cache@ 1579 + @$fin_config@ 1580 + @$fish_config/functions/fin.fish@ 1581 + @$fish_config/completions/fin.fish@ 1582 + 1583 + " /dev/stderr 1584 + 1585 + __fin_log_error_footer /dev/stderr 1586 + 1587 + return 1 1588 + end 1589 + 1590 + set -l u (set_color -u) 1591 + set -l nc (set_color normal) 1592 + 1593 + switch "$argv" 1594 + case -y --yes 1595 + case \* 1596 + __fin_log warn " 1597 + This will permanently remove fin from your system. 1598 + The following directories and files will be erased: 1599 + 1600 + @$fin_cache@ 1601 + @$fin_config@ 1602 + @$fish_config/functions/fin.fish@ 1603 + @$fish_config/completions/fin.fish@ 1604 + 1605 + " /dev/stderr 1606 + 1607 + echo -sn "Do you wish to continue? [Y/n] " > /dev/stderr 1608 + 1609 + __fin_get_key | read -l yn 1610 + 1611 + switch "$yn" 1612 + case n N 1613 + set -l username 1614 + 1615 + if test ! -z "$USER" 1616 + set username " $USER" 1617 + end 1618 + 1619 + __fin_log okay "As you wish cap!" 1620 + return 1 1621 + end 1622 + end 1623 + 1624 + complete -c fin --erase 1625 + 1626 + __fin_show_spinner 1627 + 1628 + fin ls | fin rm 1629 + 1630 + __fin_show_spinner 1631 + 1632 + command rm -rf "$fin_cache" "$fin_config" 1633 + command rm -f "$fish_config/functions/fin.fish" "$fish_config/completions/fin.fish" 1634 + 1635 + __fin_show_spinner 1636 + 1637 + set -e fin_active_prompt 1638 + set -e fin_cache 1639 + set -e fin_config 1640 + set -e fish_config 1641 + set -e fin_bundle 1642 + set -e fin_version 1643 + set -e fin_spinners 1644 + 1645 + for func in __fin_jobs_await __fin_plugin_url_clone_async __fin_completions_write __fin_plugin_fetch_items __fin_get_epoch_in_ms __fin_jobs_get __fin_get_key __fin_get_plugin_name_from_gist __fin_plugin_get_names __fin_plugin_get_url_info __fin_plugin_get_missing __fin_help __fin_humanize_duration __fin_install __fin_list __fin_list_plugin_directory __fin_log_error_footer __fin_man_page_write __fin_plugin_normalize_path __fin_parse_column_output __fin_parse_comments_from_function __fin_plugin_is_prompt __fin_plugin_disable __fin_plugin_enable __fin_plugin_is_installed __fin_read_bundle_file __fin_reset_default_fish_colors __fin_self_destroy __fin_self_update __fin_usage __fin_update __fin_update_path_async 1646 + __fin_show_spinner 1647 + functions -e "$func" 1648 + end 1649 + 1650 + __fin_show_spinner 1651 + 1652 + functions -e __fin_show_spinner 1653 + 1654 + __fin_log says " 1655 + 1656 + Thanks for trying out fin. If you have a moment, 1657 + please share your feedback in our issue tracker. 1658 + 1659 + @https://github.com/fishery/fin/issues@ 1660 + 1661 + " $__fin_stderr 1662 + 1663 + functions -e __fin_log 1664 + end 1665 + 1666 + 1667 + function fin 1668 + set -g fin_spinners ⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧ ⠇ ⠏ 1669 + 1670 + function __fin_show_spinner 1671 + if not set -q __fin_fg_spinner[1] 1672 + set -g __fin_fg_spinner $fin_spinners 1673 + end 1674 + 1675 + printf " $__fin_fg_spinner[1]\r" > /dev/stderr 1676 + 1677 + set -e __fin_fg_spinner[1] 1678 + end 1679 + 1680 + set -l config_home $XDG_CONFIG_HOME 1681 + set -l cache_home $XDG_CACHE_HOME 1682 + 1683 + if test -z "$config_home" 1684 + set config_home ~/.config 1685 + end 1686 + 1687 + if test -z "$cache_home" 1688 + set cache_home ~/.cache 1689 + end 1690 + 1691 + if test -z "$fish_config" 1692 + set -g fish_config "$config_home/fish" 1693 + end 1694 + 1695 + if test -z "$fin_config" 1696 + set -g fin_config "$config_home/fin" 1697 + end 1698 + 1699 + if test -z "$fin_cache" 1700 + set -g fin_cache "$cache_home/fin" 1701 + end 1702 + 1703 + if test -z "$fin_bundle" 1704 + set -g fin_bundle "$fish_config/bundle" 1705 + end 1706 + 1707 + if not command mkdir -p "$fish_config/"{conf.d,functions,completions} "$fin_config" "$fin_cache" 1708 + __fin_log error " 1709 + I couldn't create the fin configuration. 1710 + You need write permissions in these directories: 1711 + 1712 + @$fish_config@ 1713 + @$fin_config@ 1714 + @$fin_cache@ 1715 + " > /dev/stderr 1716 + 1717 + return 1 1718 + end 1719 + 1720 + set -l elapsed (__fin_get_epoch_in_ms) 1721 + 1722 + set -g __fin_stdout /dev/stdout 1723 + set -g __fin_stderr /dev/stderr 1724 + 1725 + set -l command 1726 + 1727 + for flag in -q --quiet 1728 + if set -l index (builtin contains --index -- $flag $argv) 1729 + set -e argv[$index] 1730 + set __fin_stdout /dev/null 1731 + set __fin_stderr /dev/null 1732 + 1733 + break 1734 + end 1735 + end 1736 + 1737 + switch "$argv[1]" 1738 + case i install 1739 + set -e argv[1] 1740 + set command "install" 1741 + 1742 + case u up update 1743 + set -e argv[1] 1744 + set command "update" 1745 + 1746 + case r rm remove uninstall 1747 + set -e argv[1] 1748 + set command "rm" 1749 + 1750 + case l ls list 1751 + set -e argv[1] 1752 + set command "ls" 1753 + 1754 + case h help 1755 + set -e argv[1] 1756 + __fin_help $argv 1757 + return 1758 + 1759 + case -h 1760 + __fin_usage > /dev/stderr 1761 + return 1762 + 1763 + case --help 1764 + __fin_help 1765 + return 1766 + 1767 + case -v --version 1768 + set -l home ~ 1769 + printf "fin v$fin_version %s\n" (__fin_plugin_normalize_path (status -f) | command awk -v home="$home" '{ sub(home, "~") } //') 1770 + return 1771 + 1772 + case -- "" 1773 + set -e argv[1] 1774 + 1775 + if test -z "$argv" 1776 + set command "default" 1777 + else 1778 + set command "install" 1779 + end 1780 + 1781 + case self-destroy 1782 + set -e argv[1] 1783 + __fin_self_destroy $argv 1784 + return 1785 + 1786 + case -\*\? 1787 + printf "fin: '%s' is not a valid option\n" "$argv[1]" > /dev/stderr 1788 + __fin_usage > /dev/stderr 1789 + return 1 1790 + 1791 + case \* 1792 + set command "install" 1793 + end 1794 + 1795 + set -l items ( 1796 + printf "%s\n" $argv | command awk ' 1797 + 1798 + /^(--|-).*/ { next } 1799 + 1800 + /^omf\// { 1801 + sub(/^omf\//, "oh-my-fish/") 1802 + 1803 + if ($0 !~ /(theme|plugin)-/) { 1804 + sub(/^oh-my-fish\//, "oh-my-fish/plugin-") 1805 + } 1806 + } 1807 + 1808 + !seen[$0]++ 1809 + 1810 + ' 1811 + ) 1812 + 1813 + if test -z "$items" -a "$command" = "default" 1814 + if isatty 1815 + touch "$fin_bundle" 1816 + set items (__fin_read_bundle_file < "$fin_bundle") 1817 + set command "install" 1818 + 1819 + if test -z "$items" 1820 + __fin_log warn " 1821 + The bundle file is empty. 1822 + @$fish_config/bundle@ 1823 + " $__fin_stderr 1824 + 1825 + __fin_log says " 1826 + 1827 + Your bundle keeps track of what's currently installed. 1828 + Write in the plugins you want and run fin again to 1829 + satisfy changes. 1830 + 1831 + You can also install plugins using @fin plugin1 ...@ 1832 + " $__fin_stderr 1833 + 1834 + return 1 1835 + end 1836 + end 1837 + end 1838 + 1839 + switch "$command" 1840 + case install 1841 + if __fin_install $items 1842 + __fin_log says "Done in "(__fin_get_epoch_in_ms $elapsed | __fin_humanize_duration) $__fin_stderr 1843 + end 1844 + 1845 + case update 1846 + if isatty 1847 + if test -z "$items" 1848 + __fin_self_update 1849 + 1850 + set items (__fin_list | command sed 's/^[@* ]*//') 1851 + end 1852 + else 1853 + __fin_parse_column_output | __fin_read_bundle_file | read -laz _items 1854 + set items $items $_items 1855 + end 1856 + 1857 + __fin_update $items 1858 + 1859 + __fin_log says "Done in "(__fin_get_epoch_in_ms $elapsed | __fin_humanize_duration) $__fin_stderr 1860 + 1861 + case ls 1862 + if test "$argv" -ge 0 -o "$argv" = - 1863 + set items (__fin_list) 1864 + 1865 + set -l count (count $items) 1866 + 1867 + if test "$count" -ge 10 1868 + printf "%s\n" $items | column -c$argv 1869 + 1870 + else if test "$count" -ge 1 1871 + printf "%s\n" $items 1872 + end 1873 + 1874 + else 1875 + __fin_list_plugin_directory $argv 1876 + end 1877 + 1878 + case rm 1879 + if test -z "$items" 1880 + __fin_parse_column_output | __fin_read_bundle_file | read -az items 1881 + end 1882 + 1883 + if test (count $items) -le 1 1884 + function __fin_show_spinner 1885 + end 1886 + end 1887 + 1888 + if test ! -z "$items" 1889 + for i in $items 1890 + set -l name (__fin_plugin_get_names "$i")[1] 1891 + __fin_plugin_disable "$fin_config/$name" 1892 + __fin_show_spinner 1893 + end 1894 + end 1895 + 1896 + __fin_log says "Done in "(__fin_get_epoch_in_ms $elapsed | __fin_humanize_duration) $__fin_stderr 1897 + end 1898 + 1899 + complete -c fin --erase 1900 + 1901 + set -l config $fin_config/* 1902 + set -l cache $fin_cache/* 1903 + 1904 + if test -z "$config" 1905 + echo > $fin_bundle 1906 + else 1907 + __fin_plugin_get_url_info -- $config > $fin_bundle 1908 + 1909 + complete -xc fin -n "__fish_seen_subcommand_from u up update r rm remove uninstall" -a "(printf '%s\n' $config | command sed 's|.*/||')" 1910 + complete -xc fin -n "__fish_seen_subcommand_from u up update r rm remove uninstall" -a "$fin_active_prompt" -d "Prompt" 1911 + end 1912 + 1913 + if test ! -z "$cache" 1914 + printf "%s\n" $cache | command awk -v _config="$config" ' 1915 + 1916 + BEGIN { 1917 + count = split(_config, config, " ") 1918 + } 1919 + 1920 + { 1921 + sub(/.*\//, "") 1922 + 1923 + for (i = 1; i <= count; i++) { 1924 + sub(/.*\//, "", config[i]) 1925 + 1926 + if (config[i] == $0) { 1927 + next 1928 + } 1929 + } 1930 + } 1931 + 1932 + // 1933 + 1934 + ' | while read -l plugin 1935 + if __fin_plugin_is_prompt "$fin_cache/$plugin" 1936 + complete -xc fin -n "__fish_seen_subcommand_from i in install" -a "$plugin" -d "Prompt" 1937 + complete -xc fin -n "not __fish_seen_subcommand_from u up update r rm remove uninstall l ls list h help" -a "$plugin" -d "Prompt" 1938 + else 1939 + complete -xc fin -n "__fish_seen_subcommand_from i in install" -a "$plugin" -d "Plugin" 1940 + complete -xc fin -n "not __fish_seen_subcommand_from u up update r rm remove uninstall l ls list h help" -a "$plugin" -d "Plugin" 1941 + end 1942 + end 1943 + end 1944 + 1945 + set -l completions "$fish_config/completions/fin.fish" 1946 + 1947 + if test ! -e "$completions" 1948 + __fin_completions_write > "$completions" 1949 + source "$completions" 1950 + end 1951 + end
+1
fish/functions/fish_prompt.fish
··· 1 + /home/hauleth/.config/fin/agnoster/fish_prompt.fish
+1
fish/functions/fish_right_prompt.fish
··· 1 + /home/hauleth/.config/fin/agnoster/fish_right_prompt.fish
+5 -2
fish/functions/work.fish
··· 1 1 function work 2 2 set NAME $argv[1] 3 3 4 - tmux new-session -A -s "$NAME" -c "$WORKSPACE_SRC/$NAME" ^/dev/null 5 - if [ ! -z "$TMUX" ] 4 + tmux has-session -t "$NAME" 5 + or tmux new-session -d -s "$NAME" -c "$WORKSPACE_SRC/$NAME" 6 + if [ -z "$TMUX" ] 7 + tmux attach-session -t "$NAME" 8 + else 6 9 tmux switch-client -t "$NAME" 7 10 end 8 11 end
+3
git/config
··· 16 16 st = status -sb 17 17 todo = grep -Ee '\\bTODO:?\\b' 18 18 fixme = grep -Ee '\\bFIX(ME)?:?\\b' 19 + com = checkout master 20 + fix = commit --fixup=HEAD 21 + psuh = push 19 22 20 23 [mergetool] 21 24 keepBackup = false
+2
git/ignore
··· 14 14 *.jar 15 15 *.rar 16 16 *.tar 17 + *.xz 17 18 *.zip 18 19 # }}} 19 20 # Logs and databases {{{ ··· 60 61 .gdb_history 61 62 perf.data* 62 63 /oprofile_data 64 + *.socket 63 65 # }}}
-1
nvim/after/ftplugin/cpp.vim
··· 1 - let g:syntastic_cpp_compiler_options = ' -std=c++11'
+1 -2
nvim/after/ftplugin/dirvish.vim
··· 1 1 " Map gh to hide "hidden" files. 2 - nnoremap <silent> <buffer> gh 3 - \ :g@\v/\.[^\/]+/?$@d <bar> set nohlsearch<CR> 2 + nnoremap <silent> <buffer> gh :<C-u>call whirl#toggle_dotfiles()<CR>
+7
nvim/after/ftplugin/elixir.vim
··· 1 + set makeprg=mix 2 + 3 + ClearSwapList 4 + 5 + SwapList defs def defp 6 + SwapList imports require import use alias 7 + SwapList tuples :ok :error
+6 -6
nvim/after/ftplugin/gitrebase.vim
··· 1 - nmap ce ^ciwe<ESC> 2 - nmap cf ^ciwf<ESC> 3 - nmap cp ^ciwp<ESC> 4 - nmap cr ^ciwr<ESC> 5 - nmap cs ^ciws<ESC> 6 - nmap cd ^ciwd<ESC> 1 + nmap <buffer> ce ^ciwe<ESC> 2 + nmap <buffer> cf ^ciwf<ESC> 3 + nmap <buffer> cp ^ciwp<ESC> 4 + nmap <buffer> cr ^ciwr<ESC> 5 + nmap <buffer> cs ^ciws<ESC> 6 + nmap <buffer> cd ^ciwd<ESC>
+1 -1
nvim/after/ftplugin/markdown.vim
··· 1 1 setlocal spell 2 2 3 - map <F9> :!markdown-preview %<CR> 3 + map <buffer> <F9> :!markdown-preview %<CR>
+5 -7
nvim/after/ftplugin/ruby.vim
··· 1 - augroup format 2 - au! 3 - au BufWritePost *.rb :RubocopFmt 4 - augroup END 1 + command! RubocopFmt NeomakeSh rubocop -a % 5 2 6 - command! RubocopFmt NeomakeSh rubocop -la % 3 + ClearSwapList 7 4 8 - noremap <leader>rb :up<bar>call VimuxRunCommand("clear; cargo bench")<CR> 9 - noremap <leader>rr :up<bar>call VimuxRunCommand("clear; cargo test")<CR> 5 + SwapList visibility public protected private 6 + SwapList if if unless 7 + SwapList while while until
+13 -2
nvim/after/ftplugin/rust.vim
··· 28 28 \ '%f:%l: %m', 29 29 \ } 30 30 31 - noremap <leader>rb :up<bar>call VimuxRunCommand("clear; cargo bench")<CR> 32 - noremap <leader>rr :up<bar>call VimuxRunCommand("clear; cargo test")<CR> 31 + ClearSwapList 32 + 33 + SwapList float f32 f64 34 + SwapList integers i8 i16 i32 i64 35 + SwapList unsigned u8 u16 u32 u64 36 + SwapList ref_mut & &mut 37 + SwapList string str String 38 + SwapList result Ok Err 39 + SwapList option Some None 40 + SwapList assert assert assert_eq 41 + SwapList print print println 42 + SwapList write write writeln 43 + SwapList module mod use
-12
nvim/after/ftplugin/rust_swapit.vim
··· 1 - ClearSwapList 2 - 3 - SwapList float f32 f64 4 - SwapList integers i8 u8 i16 u16 i32 u32 i64 u64 5 - SwapList ref_mut & &mut 6 - SwapList string str String 7 - SwapList result Ok Err 8 - SwapList option Some None 9 - SwapList assert assert assert_eq 10 - SwapList print print println 11 - SwapList write write writeln 12 - SwapList module mod use
-2
nvim/after/ftplugin/scheme.vim
··· 1 - let b:delimitMate_quotes = "\"" 2 - let b:delimitMate_matchpairs = "(:),[:],{:}"
+129 -94
nvim/autoload/plug.vim
··· 58 58 " More information: https://github.com/junegunn/vim-plug 59 59 " 60 60 " 61 - " Copyright (c) 2015 Junegunn Choi 61 + " Copyright (c) 2016 Junegunn Choi 62 62 " 63 63 " MIT License 64 64 " ··· 288 288 endfunction 289 289 290 290 function! s:git_version_requirement(...) 291 - let s:git_version = get(s:, 'git_version', 292 - \ map(split(split(s:system('git --version'))[-1], '\.'), 'str2nr(v:val)')) 291 + if !exists('s:git_version') 292 + let s:git_version = map(split(split(s:system('git --version'))[-1], '\.'), 'str2nr(v:val)') 293 + endif 293 294 return s:version_requirement(s:git_version, a:000) 294 295 endfunction 295 296 ··· 336 337 echohl ErrorMsg 337 338 echom '[vim-plug] '.a:msg 338 339 echohl None 339 - return 0 340 + endfunction 341 + 342 + function! s:warn(cmd, msg) 343 + echohl WarningMsg 344 + execute a:cmd 'a:msg' 345 + echohl None 340 346 endfunction 341 347 342 348 function! s:esc(path) ··· 385 391 endif 386 392 endfunction 387 393 394 + function! s:doautocmd(...) 395 + execute 'doautocmd' ((v:version > 703 || has('patch442')) ? '<nomodeline>' : '') join(a:000) 396 + endfunction 397 + 388 398 function! plug#load(...) 389 399 if a:0 == 0 390 400 return s:err('Argument missing: plugin name(s) required') ··· 439 449 call s:source(rtp, a:2) 440 450 endif 441 451 if exists('#User#'.name) 442 - execute 'doautocmd User' name 452 + call s:doautocmd('User', name) 443 453 endif 444 454 endfor 445 455 endfunction ··· 562 572 syn match plugStar /^*/ 563 573 syn match plugMessage /\(^- \)\@<=.*/ 564 574 syn match plugName /\(^- \)\@<=[^ ]*:/ 565 - syn match plugSha /\%(: \)\@<=[0-9a-z]\{4,}$/ 575 + syn match plugSha /\%(: \)\@<=[0-9a-f]\{4,}$/ 566 576 syn match plugTag /(tag: [^)]\+)/ 567 577 syn match plugInstall /\(^+ \)\@<=[^:]*/ 568 578 syn match plugUpdate /\(^* \)\@<=[^:]*/ 569 - syn match plugCommit /^ \X*[0-9a-z]\{7} .*/ contains=plugRelDate,plugEdge,plugTag 579 + syn match plugCommit /^ \X*[0-9a-f]\{7} .*/ contains=plugRelDate,plugEdge,plugTag 570 580 syn match plugEdge /^ \X\+$/ 571 581 syn match plugEdge /^ \X*/ contained nextgroup=plugSha 572 - syn match plugSha /[0-9a-z]\{7}/ contained 582 + syn match plugSha /[0-9a-f]\{7}/ contained 573 583 syn match plugRelDate /([^)]*)$/ contained 574 584 syn match plugNotLoaded /(not loaded)$/ 575 585 syn match plugError /^x.*/ ··· 655 665 endfunction 656 666 657 667 function! s:finish_bindings() 658 - nnoremap <silent> <buffer> R :silent! call <SID>retry()<cr> 668 + nnoremap <silent> <buffer> R :call <SID>retry()<cr> 659 669 nnoremap <silent> <buffer> D :PlugDiff<cr> 660 670 nnoremap <silent> <buffer> S :PlugStatus<cr> 661 671 nnoremap <silent> <buffer> U :call <SID>status_update()<cr> ··· 707 717 silent! execute 'f' fnameescape(name) 708 718 endfunction 709 719 720 + function! s:bang(cmd, ...) 721 + try 722 + " FIXME: Escaping is incomplete. We could use shellescape with eval, 723 + " but it won't work on Windows. 724 + let cmd = a:0 > 0 ? s:with_cd(a:cmd, a:1) : a:cmd 725 + let g:_plug_bang = '!'.escape(cmd, '#!%') 726 + execute "normal! :execute g:_plug_bang\<cr>\<cr>" 727 + finally 728 + unlet g:_plug_bang 729 + endtry 730 + return v:shell_error ? 'Exit status: ' . v:shell_error : '' 731 + endfunction 732 + 733 + function! s:regress_bar() 734 + let bar = substitute(getline(2)[1:-2], '.*\zs=', 'x', '') 735 + call s:progress_bar(2, bar, len(bar)) 736 + endfunction 737 + 738 + function! s:is_updated(dir) 739 + return !empty(s:system_chomp('git log --pretty=format:"%h" "HEAD...HEAD@{1}"', a:dir)) 740 + endfunction 741 + 710 742 function! s:do(pull, force, todo) 711 743 for [name, spec] in items(a:todo) 712 744 if !isdirectory(spec.dir) ··· 714 746 endif 715 747 let installed = has_key(s:update.new, name) 716 748 let updated = installed ? 0 : 717 - \ (a:pull && index(s:update.errors, name) < 0 && !empty(s:system_chomp('git log --pretty=format:"%h" "HEAD...HEAD@{1}"', spec.dir))) 749 + \ (a:pull && index(s:update.errors, name) < 0 && s:is_updated(spec.dir)) 718 750 if a:force || installed || updated 719 751 execute 'cd' s:esc(spec.dir) 720 752 call append(3, '- Post-update hook for '. name .' ... ') 721 753 let error = '' 722 754 let type = type(spec.do) 723 755 if type == s:TYPE.string 724 - try 725 - " FIXME: Escaping is incomplete. We could use shellescape with eval, 726 - " but it won't work on Windows. 727 - let g:_plug_do = '!'.escape(spec.do, '#!%') 728 - execute "normal! :execute g:_plug_do\<cr>\<cr>" 729 - finally 730 - if v:shell_error 731 - let error = 'Exit status: ' . v:shell_error 732 - endif 733 - unlet g:_plug_do 734 - endtry 756 + let error = s:bang(spec.do) 735 757 elseif type == s:TYPE.funcref 736 758 try 737 759 let status = installed ? 'installed' : (updated ? 'updated' : 'unchanged') ··· 744 766 endif 745 767 call setline(4, empty(error) ? (getline(4) . 'OK') 746 768 \ : ('x' . getline(4)[1:] . error)) 769 + if !empty(error) 770 + call add(s:update.errors, name) 771 + call s:regress_bar() 772 + endif 747 773 cd - 748 774 endif 749 775 endfor ··· 753 779 return stridx(a:a, a:b) == 0 || stridx(a:b, a:a) == 0 754 780 endfunction 755 781 756 - function! s:checkout(plugs) 757 - for [name, spec] in items(a:plugs) 758 - let sha = spec.commit 759 - call append(3, '- Checking out '.sha[:6].' of '.name.' ... ') 760 - redraw 761 - 762 - let error = [] 763 - let output = s:lines(s:system('git rev-parse HEAD', spec.dir)) 764 - if v:shell_error 765 - let error = output 766 - elseif !s:hash_match(sha, output[0]) 767 - let output = s:lines(s:system( 768 - \ 'git fetch --depth 999999 && git checkout '.sha, spec.dir)) 769 - if v:shell_error 770 - let error = output 771 - endif 772 - endif 773 - if empty(error) 774 - call setline(4, getline(4) . 'OK') 775 - else 776 - call setline(4, 'x'.getline(4)[1:] . 'Error') 777 - for line in reverse(error) 778 - call append(4, ' '.line) 779 - endfor 780 - endif 781 - endfor 782 + function! s:checkout(spec) 783 + let sha = a:spec.commit 784 + let output = s:system('git rev-parse HEAD', a:spec.dir) 785 + if !v:shell_error && !s:hash_match(sha, s:lines(output)[0]) 786 + let output = s:system( 787 + \ 'git fetch --depth 999999 && git checkout '.s:esc(sha), a:spec.dir) 788 + endif 789 + return output 782 790 endfunction 783 791 784 792 function! s:finish(pull) ··· 787 795 let s = new_frozen > 1 ? 's' : '' 788 796 call append(3, printf('- Installed %d frozen plugin%s', new_frozen, s)) 789 797 endif 790 - call append(3, '- Finishing ... ') 798 + call append(3, '- Finishing ... ') | 4 791 799 redraw 792 800 call plug#helptags() 793 801 call plug#end() ··· 809 817 if empty(s:update.errors) 810 818 return 811 819 endif 820 + echo 812 821 call s:update_impl(s:update.pull, s:update.force, 813 822 \ extend(copy(s:update.errors), [s:update.threads])) 814 823 endfunction ··· 821 830 return sort(filter(keys(g:plugs), 'stridx(v:val, a:1) == 0 && s:is_managed(v:val)')) 822 831 endfunction 823 832 833 + function! s:check_ruby() 834 + silent! ruby require 'thread'; VIM::command('let g:plug_ruby = 1') 835 + if get(g:, 'plug_ruby', 0) 836 + unlet g:plug_ruby 837 + return 1 838 + endif 839 + redraw! 840 + return s:warn('echom', 'Warning: Ruby interface is broken') 841 + endfunction 842 + 824 843 function! s:update_impl(pull, force, args) abort 825 844 let args = copy(a:args) 826 845 let threads = (len(args) > 0 && args[-1] =~ '^[1-9][0-9]*$') ? ··· 831 850 \ filter(managed, 'index(args, v:key) >= 0') 832 851 833 852 if empty(todo) 834 - echohl WarningMsg 835 - echo 'No plugin to '. (a:pull ? 'update' : 'install') . '.' 836 - echohl None 837 - return 853 + return s:warn('echo', 'No plugin to '. (a:pull ? 'update' : 'install')) 838 854 endif 839 855 840 856 if !s:is_win && s:git_version_requirement(2, 3) ··· 856 872 endif 857 873 858 874 if has('nvim') && !exists('*jobwait') && threads > 1 859 - echohl WarningMsg 860 - echomsg 'vim-plug: update Neovim for parallel installer' 861 - echohl None 875 + call s:warn('echom', '[vim-plug] Update Neovim for parallel installer') 862 876 endif 863 877 864 878 let python = (has('python') || has('python3')) && (!s:nvim || has('vim_starting')) 865 - let ruby = has('ruby') && !s:nvim && (v:version >= 703 || v:version == 702 && has('patch374')) && !(s:is_win && has('gui_running')) 879 + let ruby = has('ruby') && !s:nvim && (v:version >= 703 || v:version == 702 && has('patch374')) && !(s:is_win && has('gui_running')) && s:check_ruby() 866 880 867 881 let s:update = { 868 882 \ 'start': reltime(), ··· 930 944 endif 931 945 endfunction 932 946 947 + function! s:log4(name, msg) 948 + call setline(4, printf('- %s (%s)', a:msg, a:name)) 949 + redraw 950 + endfunction 951 + 933 952 function! s:update_finish() 934 953 if exists('s:git_terminal_prompt') 935 954 let $GIT_TERMINAL_PROMPT = s:git_terminal_prompt 936 955 endif 937 956 if s:switch_in() 938 - call s:checkout(filter(copy(s:update.all), 'has_key(v:val, "commit")')) 939 - call s:do(s:update.pull, s:update.force, filter(copy(s:update.all), 'has_key(v:val, "do")')) 957 + call append(3, '- Updating ...') | 4 958 + for [name, spec] in items(filter(copy(s:update.all), 'index(s:update.errors, v:key) < 0 && (s:update.force || s:update.pull || has_key(s:update.new, v:key))')) 959 + let pos = s:logpos(name) 960 + if !pos 961 + continue 962 + endif 963 + if has_key(spec, 'commit') 964 + call s:log4(name, 'Checking out '.spec.commit) 965 + let out = s:checkout(spec) 966 + elseif has_key(spec, 'tag') 967 + call s:log4(name, 'Checking out '.spec.tag) 968 + let out = s:system('git checkout -q '.s:esc(spec.tag).' 2>&1', spec.dir) 969 + else 970 + let branch = s:esc(get(spec, 'branch', 'master')) 971 + call s:log4(name, 'Merging origin/'.branch) 972 + let out = s:system('git checkout -q '.branch.' 2>&1' 973 + \. (has_key(s:update.new, name) ? '' : ('&& git merge --ff-only origin/'.branch.' 2>&1')), spec.dir) 974 + endif 975 + if !v:shell_error && filereadable(spec.dir.'/.gitmodules') && 976 + \ (s:update.force || has_key(s:update.new, name) || s:is_updated(spec.dir)) 977 + call s:log4(name, 'Updating submodules. This may take a while.') 978 + let out .= s:bang('git submodule update --init --recursive 2>&1', spec.dir) 979 + endif 980 + let msg = printf('%s %s: %s', v:shell_error ? 'x': '-', name, get(s:lines(out), -1, '')) 981 + if v:shell_error 982 + call add(s:update.errors, name) 983 + call s:regress_bar() 984 + execute pos 'd _' 985 + call append(4, msg) | 4 986 + elseif !empty(out) 987 + call setline(pos, msg) 988 + endif 989 + redraw 990 + endfor 991 + 4 d _ 992 + 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")')) 940 993 call s:finish(s:update.pull) 941 994 call setline(1, 'Updated. Elapsed time: ' . split(reltimestr(reltime(s:update.start)))[0] . ' sec.') 942 995 call s:switch_out('normal! gg') ··· 1024 1077 endif 1025 1078 let s:update.bar .= job.error ? 'x' : '=' 1026 1079 1027 - call s:log(job.error ? 'x' : '-', a:name, job.result) 1080 + call s:log(job.error ? 'x' : '-', a:name, empty(job.result) ? 'OK' : job.result) 1028 1081 call s:bar() 1029 1082 1030 1083 call remove(s:jobs, a:name) ··· 1041 1094 endfunction 1042 1095 1043 1096 function! s:logpos(name) 1044 - for i in range(1, line('$')) 1097 + for i in range(4, line('$')) 1045 1098 if getline(i) =~# '^[-+x*] '.a:name.':' 1046 1099 return i 1047 1100 endif 1048 1101 endfor 1049 - return 0 1050 1102 endfunction 1051 1103 1052 1104 function! s:log(bullet, name, lines) ··· 1092 1144 redraw 1093 1145 1094 1146 let has_tag = has_key(spec, 'tag') 1095 - let checkout = s:shellesc(has_tag ? spec.tag : spec.branch) 1096 - let merge = s:shellesc(has_tag ? spec.tag : 'origin/'.spec.branch) 1097 - 1098 1147 if !new 1099 1148 let error = s:git_validate(spec, 0) 1100 1149 if empty(error) 1101 1150 if pull 1102 1151 let fetch_opt = (has_tag && !empty(globpath(spec.dir, '.git/shallow'))) ? '--depth 99999999' : '' 1103 - call s:spawn(name, 1104 - \ printf('(git fetch %s %s 2>&1 && git checkout -q %s 2>&1 && git merge --ff-only %s 2>&1 && git submodule update --init --recursive 2>&1)', 1105 - \ fetch_opt, prog, checkout, merge), { 'dir': spec.dir }) 1152 + call s:spawn(name, printf('git fetch %s %s 2>&1', fetch_opt, prog), { 'dir': spec.dir }) 1106 1153 else 1107 1154 let s:jobs[name] = { 'running': 0, 'result': 'Already installed', 'error': 0 } 1108 1155 endif ··· 1111 1158 endif 1112 1159 else 1113 1160 call s:spawn(name, 1114 - \ printf('git clone %s %s --recursive %s -b %s %s 2>&1', 1161 + \ printf('git clone %s %s %s %s 2>&1', 1115 1162 \ has_tag ? '' : s:clone_opt, 1116 1163 \ prog, 1117 1164 \ s:shellesc(spec.uri), 1118 - \ checkout, 1119 1165 \ s:shellesc(s:trim(spec.dir))), { 'new': 1 }) 1120 1166 endif 1121 1167 ··· 1344 1390 self.args = args 1345 1391 self.buf_q = buf_q 1346 1392 self.lock = lock 1347 - tag = args.get('tag', 0) 1348 - self.checkout = esc(tag if tag else args['branch']) 1349 - self.merge = esc(tag if tag else 'origin/' + args['branch']) 1350 - self.tag = tag 1393 + self.tag = args.get('tag', 0) 1351 1394 1352 1395 def manage(self): 1353 1396 try: ··· 1383 1426 1384 1427 self.write(Action.INSTALL, self.name, ['Installing ...']) 1385 1428 callback = functools.partial(self.write, Action.INSTALL, self.name) 1386 - cmd = 'git clone {0} {1} --recursive {2} -b {3} {4} 2>&1'.format( 1429 + cmd = 'git clone {0} {1} {2} {3} 2>&1'.format( 1387 1430 '' if self.tag else G_CLONE_OPT, G_PROGRESS, self.args['uri'], 1388 - self.checkout, esc(target)) 1431 + esc(target)) 1389 1432 com = Command(cmd, None, G_TIMEOUT, callback, clean(target)) 1390 1433 result = com.execute(G_RETRIES) 1391 1434 self.write(Action.DONE, self.name, result[-1:]) 1392 1435 1393 1436 def repo_uri(self): 1394 - cmd = 'git rev-parse --abbrev-ref HEAD 2>&1 && git config remote.origin.url' 1437 + cmd = 'git rev-parse --abbrev-ref HEAD 2>&1 && git config -f .git/config remote.origin.url' 1395 1438 command = Command(cmd, self.args['dir'], G_TIMEOUT,) 1396 1439 result = command.execute(G_RETRIES) 1397 1440 return result[-1] ··· 1411 1454 self.write(Action.UPDATE, self.name, ['Updating ...']) 1412 1455 callback = functools.partial(self.write, Action.UPDATE, self.name) 1413 1456 fetch_opt = '--depth 99999999' if self.tag and os.path.isfile(os.path.join(self.args['dir'], '.git/shallow')) else '' 1414 - cmds = ['git fetch {0} {1}'.format(fetch_opt, G_PROGRESS), 1415 - 'git checkout -q {0}'.format(self.checkout), 1416 - 'git merge --ff-only {0}'.format(self.merge), 1417 - 'git submodule update --init --recursive'] 1418 - cmd = ' 2>&1 && '.join(cmds) 1457 + cmd = 'git fetch {0} {1} 2>&1'.format(fetch_opt, G_PROGRESS) 1419 1458 com = Command(cmd, self.args['dir'], G_TIMEOUT, callback) 1420 1459 result = com.execute(G_RETRIES) 1421 1460 self.write(Action.DONE, self.name, result[-1:]) ··· 1507 1546 while not buf_q.empty() or thr.active_count() != start_cnt: 1508 1547 try: 1509 1548 action, name, msg = buf_q.get(True, 0.25) 1510 - buf.write(action, name, msg) 1549 + buf.write(action, name, ['OK'] if not msg else msg) 1511 1550 buf_q.task_done() 1512 1551 except queue.Empty: 1513 1552 pass ··· 1601 1640 end 1602 1641 result = 1603 1642 if type || type.nil? 1604 - ["#{b} #{name}: #{result.lines.to_a.last}"] 1643 + ["#{b} #{name}: #{result.lines.to_a.last || 'OK'}"] 1605 1644 elsif result =~ /^Interrupted|^Timeout/ 1606 1645 ["#{b} #{name}: #{result}"] 1607 1646 else ··· 1691 1730 threads << Thread.new { 1692 1731 while pair = take1.call 1693 1732 name = pair.first 1694 - dir, uri, branch, tag = pair.last.values_at *%w[dir uri branch tag] 1695 - checkout = esc(tag ? tag : branch) 1696 - merge = esc(tag ? tag : "origin/#{branch}") 1697 - subm = "git submodule update --init --recursive 2>&1" 1733 + dir, uri, tag = pair.last.values_at *%w[dir uri tag] 1698 1734 exists = File.directory? dir 1699 1735 ok, result = 1700 1736 if exists 1701 1737 chdir = "#{cd} #{iswin ? dir : esc(dir)}" 1702 - ret, data = bt.call "#{chdir} && git rev-parse --abbrev-ref HEAD 2>&1 && git config remote.origin.url", nil, nil, nil 1738 + ret, data = bt.call "#{chdir} && git rev-parse --abbrev-ref HEAD 2>&1 && git config -f .git/config remote.origin.url", nil, nil, nil 1703 1739 current_uri = data.lines.to_a.last 1704 1740 if !ret 1705 1741 if data =~ /^Interrupted|^Timeout/ ··· 1715 1751 if pull 1716 1752 log.call name, 'Updating ...', :update 1717 1753 fetch_opt = (tag && File.exist?(File.join(dir, '.git/shallow'))) ? '--depth 99999999' : '' 1718 - bt.call "#{chdir} && git fetch #{fetch_opt} #{progress} 2>&1 && git checkout -q #{checkout} 2>&1 && git merge --ff-only #{merge} 2>&1 && #{subm}", name, :update, nil 1754 + bt.call "#{chdir} && git fetch #{fetch_opt} #{progress} 2>&1", name, :update, nil 1719 1755 else 1720 1756 [true, skip] 1721 1757 end ··· 1723 1759 else 1724 1760 d = esc dir.sub(%r{[\\/]+$}, '') 1725 1761 log.call name, 'Installing ...', :install 1726 - bt.call "git clone #{clone_opt unless tag} #{progress} --recursive #{uri} -b #{checkout} #{d} 2>&1", name, :install, proc { 1762 + bt.call "git clone #{clone_opt unless tag} #{progress} #{uri} #{d} 2>&1", name, :install, proc { 1727 1763 FileUtils.rm_rf dir 1728 1764 } 1729 1765 end ··· 1792 1828 function! s:git_validate(spec, check_branch) 1793 1829 let err = '' 1794 1830 if isdirectory(a:spec.dir) 1795 - let result = s:lines(s:system('git rev-parse --abbrev-ref HEAD 2>&1 && git config remote.origin.url', a:spec.dir)) 1831 + let result = s:lines(s:system('git rev-parse --abbrev-ref HEAD 2>&1 && git config -f .git/config remote.origin.url', a:spec.dir)) 1796 1832 let remote = result[-1] 1797 1833 if v:shell_error 1798 1834 let err = join([remote, 'PlugClean required.'], "\n") ··· 2000 2036 wincmd p 2001 2037 return 1 2002 2038 endif 2003 - return 0 2004 2039 endfunction 2005 2040 2006 2041 function! s:find_name(lnum) ··· 2022 2057 let b:plug_preview = !s:is_preview_window_open() 2023 2058 endif 2024 2059 2025 - let sha = matchstr(getline('.'), '^ \X*\zs[0-9a-z]\{7}') 2060 + let sha = matchstr(getline('.'), '^ \X*\zs[0-9a-f]\{7}') 2026 2061 if empty(sha) 2027 2062 return 2028 2063 endif ··· 2035 2070 execute 'pedit' sha 2036 2071 wincmd P 2037 2072 setlocal filetype=git buftype=nofile nobuflisted modifiable 2038 - execute 'silent read !cd' s:shellesc(g:plugs[name].dir) '&& git show --pretty=medium' sha 2073 + execute 'silent read !cd' s:shellesc(g:plugs[name].dir) '&& git show --no-color --pretty=medium' sha 2039 2074 normal! gg"_dd 2040 2075 setlocal nomodifiable 2041 2076 nnoremap <silent> <buffer> q :q<cr>
+1 -1
nvim/ftdetect/ketos.vim
··· 1 - au BufRead,BufNewFile *.ket set ft=scheme syn=scheme 1 + au BufRead,BufNewFile *.ket set ft=ketos.scheme syn=scheme
+78 -56
nvim/init.vim
··· 5 5 6 6 " Visual 7 7 Plug 'bling/vim-bufferline' 8 - Plug 'chriskempson/base16-vim' 8 + Plug 'morhetz/gruvbox' 9 9 Plug 'itchyny/lightline.vim' 10 - Plug 'kshenoy/vim-signature' 10 + Plug 'wellle/targets.vim' 11 11 12 12 " Languages 13 13 Plug 'sheerun/vim-polyglot' 14 14 Plug 'dag/vim-fish' 15 + Plug 'hauleth/vim-ketos' 15 16 16 17 " Git 17 18 Plug 'mhinz/vim-signify' 18 19 Plug 'tpope/vim-fugitive' 19 20 Plug 'tpope/vim-rhubarb' 21 + Plug 'junegunn/gv.vim' 20 22 21 23 " Fuzzy find 22 24 Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } ··· 30 32 Plug 'wakatime/vim-wakatime' 31 33 32 34 " TMux integration 33 - Plug 'benmills/vimux' 35 + Plug 'tpope/vim-tbone' 34 36 Plug 'christoomey/vim-tmux-navigator' 35 37 36 38 " Completion 37 - Plug 'Shougo/deoplete.nvim' 38 39 Plug 'mattn/emmet-vim' 39 40 Plug 'racer-rust/vim-racer' 40 41 ··· 47 48 " Build & Configuration 48 49 Plug 'benekastah/neomake' 49 50 Plug 'tpope/vim-projectionist' 51 + Plug 'editorconfig/editorconfig-vim' 50 52 51 53 " Utils 52 - Plug 'junegunn/vim-easy-align' 54 + Plug 'godlygeek/tabular' 53 55 Plug 'mbbill/undotree', { 'on': 'UndotreeToggle' } 54 56 Plug 'mjbrownie/swapit' 55 57 Plug 'tpope/vim-repeat' 56 58 Plug 'tpope/vim-unimpaired' 59 + Plug 'junegunn/Goyo.vim' 60 + 61 + " Ruby 62 + Plug 'tpope/vim-rails' 57 63 58 64 call plug#end() 59 65 " }}} 60 66 " Colors {{{ 61 - " Use Dark Solarized theme 62 - let base16colorspace=256 63 67 set background=dark 64 - colorscheme base16-ocean 68 + colorscheme gruvbox 65 69 " }}} 66 70 " User interface {{{ 67 71 " Ignore all automatic files and folders ··· 71 75 set list 72 76 set listchars=tab:→\ ,trail:· 73 77 74 - " Line numbers are good 75 - set number 76 - set relativenumber 77 - 78 78 " Show current mode down the bottom 79 79 set noshowmode 80 + set showcmd 80 81 81 82 " Set utf8 as standard encoding 82 83 set encoding=utf8 ··· 100 101 " Show me more! 101 102 set scrolloff=10 102 103 104 + set iskeyword+=- 105 + 103 106 " Show 80 column 104 - let &colorcolumn="81,+" . join(range(1,100), ',+') 107 + let &colorcolumn="81,+" . join(range(1,200), ',+') 105 108 set cursorline 106 109 110 + set splitright 111 + set splitbelow 112 + 107 113 set lazyredraw 108 114 " }}} 109 115 " Identation {{{ 110 - set smartindent 111 116 set shiftwidth=2 112 117 set softtabstop=2 113 118 set tabstop=2 ··· 137 142 if !isdirectory($HOME . "/.cache/backups") 138 143 silent !mkdir -p ~/.cache/backups > /dev/null 2>&1 139 144 endif 140 - set undodir=~/.cache/backups 145 + let &undodir=$HOME . "/.cache/backups" 141 146 set undofile 147 + set undolevels=1000 148 + set undoreload=10000 142 149 " }}} 143 150 " Tags {{{ 144 - command! UpdateTags call UpdateTags(0) 151 + command! UpdateTags call UpdateTags(0, '.') 145 152 146 153 let g:tagscmd = 'ctags -a' 147 154 148 - function! UpdateTags(check) 155 + function! UpdateTags(check, path) 149 156 let l:cwd = getcwd() 150 157 let l:tagsfile = l:cwd . '/tags' 151 158 152 - if a:check && filewritable(tagsfile) 153 - exec('NeomakeSh ' . g:tagscmd . ' -f ' . tagsfile . ' ' . @%) 159 + if a:check && ! filewritable(tagsfile) 160 + return 154 161 endif 162 + 163 + exec('NeomakeSh ' . g:tagscmd . ' -f ' . tagsfile . ' ' . a:path) 155 164 endfunction 156 165 157 166 augroup ctags 158 167 au! 159 - au BufWritePost * call UpdateTags(1) 168 + au BufWritePost * call UpdateTags(1, @%) 160 169 augroup END 161 170 " }}} 162 171 " Mappings {{{ 163 172 " Leader {{{ 164 173 let mapleader = "\<space>" 165 174 " }}} 175 + " ESC {{{ 176 + inoremap jk <ESC> 177 + " }}} 178 + " Disable arrows {{{ 179 + noremap <up> <nop> 180 + noremap <down> <nop> 181 + noremap <left> <nop> 182 + noremap <right> <nop> 183 + noremap! <up> <nop> 184 + noremap! <down> <nop> 185 + noremap! <left> <nop> 186 + noremap! <right> <nop> 187 + " }}} 166 188 " Swap 'go to marker' mappings {{{ 167 189 nnoremap ' ` 168 190 nnoremap ` ' ··· 197 219 " }}} 198 220 " Folding {{{ 199 221 nnoremap <CR> za 222 + au CmdwinEnter * nunmap <CR> 223 + au CmdwinLeave * nnoremap <CR> za 200 224 " }}} 201 225 " FZF {{{ 202 - noremap <C-p> :<C-u>Files<CR> 203 - noremap zz :<C-u>Files<CR> 204 - noremap zt :<C-u>Tags<CR> 205 - noremap zb :<C-u>Buffers<CR> 226 + nnoremap <C-p> :<C-u>Files<CR> 227 + nnoremap <leader>f :<C-u>Files<CR> 228 + nnoremap <leader><leader> :<C-u>Files<CR> 229 + nnoremap <leader>t :<C-u>Tags<CR> 230 + nnoremap <leader>b :<C-u>Buffers<CR> 206 231 " }}} 207 232 " UndoTree {{{ 208 233 noremap <F2> :<C-u>UndotreeToggle<CR> ··· 223 248 224 249 " Search for selection 225 250 vnoremap // y/<C-r>"<CR> 226 - 227 - " Consistent search forward 228 - noremap <expr> n 'Nn'[v:searchforward] 229 - noremap <expr> N 'nN'[v:searchforward] 230 251 " }}} 231 252 " Git {{{ 232 253 nnoremap U <nop> 233 254 nnoremap Us :<C-u>Gstatus<CR> 234 255 nnoremap Ud :<C-u>Gdiff<CR> 235 - nnoremap Ub :<C-u>Gblame<CR> 256 + nnoremap UB :<C-u>Gblame<CR> 257 + nnoremap Ub :<C-u>Promiscuous<CR> 258 + nnoremap U- :<C-u>Promiscuous -<CR> 236 259 nnoremap Uc :<C-u>Gcommit<CR> 237 260 nnoremap Um :<C-u>Gmerge<CR> 238 261 nnoremap Uu :<C-u>Git up<CR> 239 262 nnoremap Uf :<C-u>GitFiles<CR> 263 + nnoremap Ul :<C-u>GV<CR> 264 + nnoremap UL :<C-u>GV!<CR> 240 265 nmap UU Uu 241 266 " }}} 267 + " Tabs {{{ 268 + nnoremap <C-w>t :<C-u>tabnew <bar> Dirvish<CR> 269 + " }}} 242 270 " }}} 243 271 " Configuration {{{ 244 272 " Grep {{{ 245 273 set grepformat^=%f:%l:%c:%m 246 - set grepprg=ag\ --vimgrep\ --hidden 274 + set grepprg=ag\ --vimgrep\ --hidden\ --ignore\ .git 247 275 " }}} 248 276 " BufferLine {{{ 249 277 let g:bufferline_echo = 1 ··· 252 280 let g:bufferline_active_buffer_right = ']' 253 281 let g:bufferline_fname_mod = ':~:.' 254 282 " }}} 255 - " Deoplete {{{ 256 - let g:deoplete#enable_at_startup = 1 257 - 258 - let g:deoplete#omni_patterns = {} 259 - let g:deoplete#omni_patterns.rust = '[(\.)(::)]' 260 - " }}} 261 - " Unload netrw {{{ 262 - let g:loaded_netrw = 1 263 - let g:loaded_netrwPlugin = 1 283 + " Unload unneeded plugins {{{ 284 + let g:loaded_netrw = 1 285 + let g:loaded_netrwPlugin = 1 286 + let g:loaded_vimballPlugin = 1 264 287 " }}} 265 288 " Formatting & Cleaning {{{ 266 289 command! Clean let _s=@/ | %s/\s\+$//e | let @/=_s | set nohlsearch ··· 268 291 " Neomake {{{ 269 292 augroup syntax_check 270 293 au! 271 - autocmd BufEnter,BufWritePost * silent Neomake 294 + autocmd BufWritePost * silent Neomake 272 295 augroup END 273 296 274 297 let g:neomake_warning_sign = { 275 298 \ 'text': '‼', 276 299 \ 'texthl': 'Warning', 277 300 \ } 301 + " }}} 302 + " MPD {{{ 303 + command! -nargs=+ MPD call jobstart(['mpc', <f-args>]) 304 + command! MPDAdd call fzf#run({ 305 + \ 'source': 'mpc listall', 306 + \ 'sink': 'MPD add', 307 + \ }) 278 308 " }}} 279 309 " TMux {{{ 280 - let g:tmux_navigator_no_mappings = 1 281 - 282 - nnoremap <silent> <C-h> :TmuxNavigateLeft<cr> 283 - nnoremap <silent> <C-k> :TmuxNavigateUp<cr> 284 - nnoremap <silent> <C-j> :TmuxNavigateDown<cr> 285 - nnoremap <silent> <C-l> :TmuxNavigateRight<cr> 286 - nnoremap <silent> <C-\> :TmuxNavigatePrevious<cr> 287 - 288 - let g:VimuxOrientation = 'h' 289 - let g:VimuxHeight = '40' 290 - 291 - noremap <leader>vl :VimuxRunLastCommand<CR> 292 - noremap <leader>vi :VimuxInspectPanel<CR> 293 - noremap <leader>vq :VimuxCloseRunner<CR> 294 - noremap <leader>vx :VimuxInterruptRunner<CR> 295 - noremap <leader>vz :call VimuxZoomRunner()<CR> 310 + let g:tmux_navigator_save_on_switch = 1 296 311 " }}} 297 312 " Signify {{{ 298 313 let g:signify_sign_add = '▌' ··· 302 317 let g:signify_sign_changedelete = '▞' 303 318 304 319 let g:signify_sign_show_count = 0 320 + " }}} 321 + " Lexima {{{ 322 + call lexima#add_rule({'char': '%', 'at': '<\%#', 'input_after': ' %>', 'filetype': ['eelixir', 'eruby']}) 323 + " }}} 324 + " Limelight {{{ 325 + let g:limelight_conceal_ctermfg = 'lightgray' 326 + let g:limelight_conceal_guifg = '#666666' 305 327 " }}} 306 328 " }}}
+7
nvim/plugin/numbers.vim
··· 1 + " Line numbers are good 2 + augroup numbers 3 + au BufEnter,WinEnter * set number 4 + au BufEnter,WinEnter * set relativenumber 5 + au BufLeave,WinLeave * set nonumber 6 + au BufLeave,WinLeave * set norelativenumber 7 + augroup END
+1 -1
nvim/plugin/statusline.vim
··· 1 1 let g:lightline = { 2 - \ 'colorscheme': 'base16', 2 + \ 'colorscheme': 'gruvbox', 3 3 \ 'active': { 4 4 \ 'left': [ 5 5 \ [ 'mode', 'paste'],
+14
nvim/plugin/vsearch.vim
··· 1 + " vsearch.vim 2 + " Visual mode search 3 + function! s:VSetSearch() 4 + let temp = @@ 5 + norm! gvy 6 + let @/ = '\V' . substitute(escape(@@, '\'), '\n', '\\n', 'g') 7 + " Use this line instead of the above to match matches spanning across lines 8 + "let @/ = '\V' . substitute(escape(@@, '\'), '\_s\+', '\\_s\\+', 'g') 9 + call histadd('/', substitute(@/, '[?/]', '\="\\%d".char2nr(submatch(0))', 'g')) 10 + let @@ = temp 11 + endfunction 12 + 13 + vnoremap * :<C-u>call <SID>VSetSearch()<CR>/<CR> 14 + vnoremap # :<C-u>call <SID>VSetSearch()<CR>?<CR>
+7 -6
nvim/plugin/whirl.vim
··· 5 5 finish 6 6 endif 7 7 let g:loaded_whirl = 1 8 + let s:save_cpo = &cpo 9 + set cpo&vim 8 10 9 11 augroup dirvish_sort 10 12 au! 11 13 au FileType dirvish sort r /[^\/]$/ 12 - au FileType dirvish g/\~$/d 13 14 augroup END 14 15 15 - if empty(maparg('-', 'n')) 16 - nnoremap <silent> - :<C-u>Dirvish .<CR> 16 + if mapcheck('+', 'n') ==# '' 17 + nnoremap <silent> + :<C-U>exe 'Dirvish %:p'.repeat(':h',v:count1)<CR> 17 18 endif 18 - 19 - if empty(maparg('+', 'n')) 20 - nnoremap <silent> + :<C-u>Dirvish %:p:h<CR> 19 + if mapcheck('-', 'n') ==# '' 20 + nnoremap <silent> - :<C-U>Dirvish<CR> 21 21 endif 22 + let &cpo = s:save_cpo
+14
nvim/plugin/zoom.vim
··· 1 + " Zoom / Restore window. 2 + function! s:ZoomToggle() abort 3 + if exists('t:zoomed') && t:zoomed 4 + execute t:zoom_winrestcmd 5 + let t:zoomed = 0 6 + else 7 + let t:zoom_winrestcmd = winrestcmd() 8 + resize 9 + vertical resize 10 + let t:zoomed = 1 11 + endif 12 + endfunction 13 + command! ZoomToggle call s:ZoomToggle() 14 + nnoremap <silent> <C-w>z :ZoomToggle<CR>
+244
nvim/syntax/sql.vim
··· 1 + " Vim syntax file 2 + " Language: SQL with SQLite and other additions. 3 + " Maintainer: Jessica K McIntosh AT gmail DOT com 4 + " Last Changed: Thu Jan 23 06:00 PM 2014 EST 5 + 6 + " More complete SQL matching with error reporting. 7 + " Only matches types inside 'CREATE TABLE ();'. 8 + " Highlights functions. Unknown functions are an error. 9 + " Based on the SQL syntax files that come with Vim. 10 + 11 + if exists("b:current_syntax") 12 + finish 13 + endif 14 + 15 + syn case ignore 16 + 17 + " All non-contained SQL syntax. 18 + syn cluster sqlALL contains=TOP 19 + 20 + " Various error conditions. 21 + "syn match sqlError "\<\w\+(" " Not a known function. 22 + syn match sqlError ")" " Lonely closing paren. 23 + syn match sqlError ",\(\_\s*[;)]\)\@=" " Comma before a paren or semicolon. 24 + syn match sqlError " $" " Space at the end of a line. 25 + " Comma before certain words. 26 + syn match sqlError ",\_\s*\(\<\(asc\|desc\|exists\|for\|from\)\>\)\@=" 27 + syn match sqlError ",\_\s*\(\<\(group by\|into\|limit\|order\)\>\)\@=" 28 + syn match sqlError ",\_\s*\(\<\(table\|using\|where\)\>\)\@=" 29 + 30 + " Special words. 31 + syn keyword sqlSpecial false null true 32 + 33 + " Keywords 34 + syn keyword sqlKeyword access add after aggregate as asc authorization 35 + syn keyword sqlKeyword begin by cache cascade check cluster collate 36 + syn keyword sqlKeyword collation column compress conflict connect connection 37 + syn keyword sqlKeyword constraint current cursor database debug decimal 38 + syn keyword sqlKeyword default desc each else elsif escape exception 39 + syn keyword sqlKeyword exclusive explain external file for foreign from function 40 + syn keyword sqlKeyword group having identified if immediate increment index 41 + syn keyword sqlKeyword initial inner into is join key left level loop 42 + syn keyword sqlKeyword maxextents mode modify nocompress nowait object of 43 + syn keyword sqlKeyword off offline on online option order outer over 44 + syn keyword sqlKeyword partition pctfree 45 + syn keyword sqlKeyword primary privileges procedure public references 46 + syn keyword sqlKeyword referencing release resource return role row rowid 47 + syn keyword sqlKeyword rowlabel rownum rows schema session share size 48 + syn keyword sqlKeyword start successful synonym then to transaction trigger 49 + syn keyword sqlKeyword uid user using validate values view virtual whenever 50 + syn keyword sqlKeyword where with 51 + syn match sqlKeyword "\<prompt\>" 52 + syn match sqlKeyword "\<glob\>" 53 + " Do special things with CREATE TABLE ( below. 54 + syn match sqlKeyword "\<table\>" 55 + 56 + " SQLite Pragmas - Treat them as keywords. 57 + syn keyword sqlKeyword auto_vacuum automatic_index cache_size 58 + syn keyword sqlKeyword case_sensitive_like checkpoint_fullfsync 59 + syn keyword sqlKeyword collation_list compile_options count_changes 60 + syn keyword sqlKeyword database_list default_cache_size 61 + syn keyword sqlKeyword empty_result_callbacks encoding foreign_key_list 62 + syn keyword sqlKeyword foreign_keys freelist_count full_column_names 63 + syn keyword sqlKeyword fullfsync ignore_check_constraints 64 + syn keyword sqlKeyword incremental_vacuum index_info index_list 65 + syn keyword sqlKeyword integrity_check journal_mode journal_size_limit 66 + syn keyword sqlKeyword legacy_file_format locking_mode max_page_count 67 + syn keyword sqlKeyword page_count page_size parser_trace quick_check 68 + syn keyword sqlKeyword read_uncommitted recursive_triggers 69 + syn keyword sqlKeyword reverse_unordered_selects schema_version 70 + syn keyword sqlKeyword secure_delete short_column_names synchronous 71 + syn keyword sqlKeyword table_info temp_store temp_store_directory 72 + syn keyword sqlKeyword user_version vdbe_listing vdbe_trace 73 + syn keyword sqlKeyword wal_autocheckpoint wal_checkpoint writable_schema 74 + 75 + " Operators 76 + syn keyword sqlOperator all and any between case distinct elif else end 77 + syn keyword sqlOperator exit exists if in intersect is like match matches 78 + syn keyword sqlOperator minus not or out prior regexp some then union 79 + syn keyword sqlOperator unique when 80 + syn match sqlOperator "||\|:=" 81 + 82 + " Conditionals 83 + syn match sqlConditional "=\|<\|>\|+\|-" 84 + 85 + " Unknown functions. 86 + syn match sqlUnknownFunc "\<\w\+(\@=" 87 + 88 + " Functions - Only valid with a '(' after them. 89 + syn match sqlFunction "\<\(abs\|acos\|asin\|atan2\?\|avg\|cardinality\)(\@=" 90 + syn match sqlFunction "\<\(cast\|changes\|char_length\|character_length\)(\@=" 91 + syn match sqlFunction "\<\(coalesce\|concat\|cos\|count\|\(date\)\?\(time\)\?\)(\@=" 92 + syn match sqlFunction "\<\(exp\|filetoblob\|filetoclob\|floor\|glob\|group_concat\)(\@=" 93 + syn match sqlFunction "\<\(hex\|ifnull\|initcap\|isnull\|julianday\|last_insert_rowid\)(\@=" 94 + syn match sqlFunction "\<\(length\|log10\|logn\|lower\|lpad\|ltrin\|max\|min\)(\@=" 95 + syn match sqlFunction "\<\(mod\|nullif\|octet_length\|pow\|quote\|random\)(\@=" 96 + syn match sqlFunction "\<\(range\|replace\|root\|round\|rpad\|sin\|soundex\)(\@=" 97 + syn match sqlFunction "\<\(sqrtstdev\|strftime\|substr\|substring\|sum\|sysdate\|tan\)(\@=" 98 + syn match sqlFunction "\<\(to_char\|to_date\|to_number\|total\|trim\|trunc\|typeof\)(\@=" 99 + syn match sqlFunction "\<\(upper\|variance\)(\@=" 100 + 101 + " Oracle DBMS functions. 102 + syn match sqlFunction "\<dbms_\w\+\.\w\+(\@=" 103 + 104 + " Oracle Exception Functions. 105 + syn match sqlFunction "\<raise_application_error(\@=" 106 + 107 + " SQLite Functions 108 + syn match sqlFunction "\<\(last_insert_rowid\|load_extension\|randomblob\)(\@=" 109 + syn match sqlFunction "\<\(sqlite_compileoption_get\|sqlite_compileoption_used\)(\@=" 110 + syn match sqlFunction "\<\(sqlite_source_id\|sqlite_version\|sqlite_version\)(\@=" 111 + syn match sqlFunction "\<\(zeroblob\|ltrim\|rtrim\)(\@=" 112 + 113 + " SQLite Command Line Client Functions 114 + syn match sqlFunction "^\.\w\+" 115 + 116 + " Statements 117 + syn keyword sqlStatement alter analyze audit begin comment commit delete 118 + syn keyword sqlStatement drop execute explain grant insert lock noaudit 119 + syn keyword sqlStatement rename revoke rollback savepoint select 120 + syn keyword sqlStatement truncate update vacuum 121 + syn match sqlStatement "\<\(replace\|create\)\>" 122 + 123 + " SQLite Statements 124 + syn keyword sqlStatement attach detach indexed pragma reindex 125 + 126 + " Types - Only matched inside 'CREATE TABLE ();'. 127 + syn keyword sqlType contained bigint bit blob bool boolean byte char 128 + syn keyword sqlType contained clob date datetime dec decimal enum 129 + syn keyword sqlType contained float int int8 integer interval long 130 + syn keyword sqlType contained longblob longtext lvarchar mediumblob 131 + syn keyword sqlType contained mediumint mediumtext mlslabel money 132 + syn keyword sqlType contained multiset nchar number numeric nvarchar 133 + syn keyword sqlType contained raw real rowid serial serial8 set 134 + syn keyword sqlType contained smallfloat smallint text time 135 + syn keyword sqlType contained timestamp tinyblob tinyint tinytext 136 + syn keyword sqlType contained varchar varchar2 varray year 137 + syn match sqlType contained "\<\(character\|double\|varying\)\>" 138 + syn match sqlType contained "\<character\s\+varying\>" 139 + syn match sqlType contained "\<double\s\+precision\>" 140 + 141 + " Oracle Variables 142 + syn match sqlVariable "&\a\w\+" 143 + syn match sqlVariable ":\w\+" 144 + syn match sqlVariable "SQL%\w\+" 145 + 146 + " Strings 147 + syn region sqlString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=sqlVariable 148 + syn region sqlString start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=sqlVariable 149 + syn region sqlString start=+`+ skip=+\\\\\|\\`+ end=+`+ contains=sqlVariable 150 + 151 + " Numbers 152 + syn match sqlNumber "-\=\<[0-9]*\>" 153 + syn match sqlNumber "-\=\<[0-9]*\.[0-9]*\>" 154 + syn match sqlNumber "-\=\<[0-9][0-9]*e[+-]\=[0-9]*\>" 155 + syn match sqlNumber "-\=\<[0-9]*\.[0-9]*e[+-]\=[0-9]*\>" 156 + syn match sqlNumber "\<0x[abcdef0-9]*\>" 157 + 158 + " Todo 159 + syn keyword sqlTodo contained DEBUG FIXME NOTE TODO XXX 160 + 161 + " Comments 162 + syn region sqlComment start="/\*" end="\*/" contains=sqlTodo 163 + syn match sqlComment "--.*$" contains=sqlTodo 164 + syn match sqlComment "rem.*$" contains=sqlTodo 165 + 166 + " Mark correct paren use. Different colors for different purposes. 167 + syn region sqlParens transparent matchgroup=sqlParen start="(" end=")" 168 + syn match sqlParenEmpty "()" 169 + syn region sqlParens transparent matchgroup=sqlParenFunc start="\(\<\w\+\>\)\@<=(" end=")" 170 + 171 + " Highlight types correctly inside create table and procedure statements. 172 + " All other SQL is properly highlighted as well. 173 + syn region sqlTypeParens contained matchgroup=sqlType start="(" end=")" contains=@sqlALL 174 + syn match sqlTypeMatch contained "\(\(^\|[,(]\)\s*\S\+\s\+\)\@<=\w\+\(\s*([^)]\+)\)\?" contains=sqlType,sqlTypeParens 175 + syn match sqlTypeMatch contained "\(\(^\|[,(]\)\s*\S\+\s\+\)\@<=character\s\+varying\s*([^)]\+)" contains=sqlType,sqlTypeParens 176 + syn region sqlTypeRegion matchgroup=sqlParen start="\(create\s\+table\s\+[^(]\+\s\+\)\@<=(" end=")" contains=@sqlALL,sqlTypeMatch 177 + syn region sqlTypeRegion matchgroup=sqlParen start="\(create\s\+\(or\s\+replace\s\+\)\?procedure\s\+[^(]\+\s*\)\@<=(" end=")" contains=@sqlALL,sqlTypeMatch 178 + 179 + " SQL Embedded in a statement. 180 + syn region sqlquoteRegion matchgroup=sqlParen start="\(execute\s\+immediate\s*\)\@<=('" end="')" contains=@sqlALL 181 + 182 + " Special Oracle Statements 183 + syn match sqlStatement "^\s*\(prompt\|spool\)\>" nextgroup=sqlAnyString 184 + syn match sqlStatement "^\s*accept\s\+" nextgroup=sqlAnyVariable 185 + syn match sqlStatement "declare\s\+" nextgroup=sqlDeclare 186 + syn region sqlDeclare contained matchgroup=sqlVariable start="\a\w\+" end="$" contains=@sqlALL,sqlType 187 + syn match sqlOperator "^@" nextgroup=sqlAnyString 188 + syn match sqlAnyVariable contained "\a\w\+" 189 + syn match sqlAnyString contained ".*" contains=sqlVariable 190 + 191 + syn region sqlSetRegion matchgroup=sqlStatement start="^\s*set\>" matchgroup=NONE end="$" contains=sqlSetOptions,sqlSetValues 192 + syn keyword sqlSetOptions contained autorecovery colsep copytypecheck describe escchar flagger 193 + syn keyword sqlSetOptions contained instance logsource long null recsep recsepchar 194 + syn keyword sqlSetOptions contained 195 + syn match sqlSetOptions contained "\<\(app\w*\|array\w*\|auto\w*\|autop\w*\)\>" 196 + syn match sqlSetOptions contained "\<\(autot\w*\|blo\w*\|cmds\w*\|con\w*\|copyc\w*\)\>" 197 + syn match sqlSetOptions contained "\<\(def\w*\|echo\|editf\w*\|emb\w*\|errorl\w*\|esc\w*\)\>" 198 + syn match sqlSetOptions contained "\<\(feed\w*\|flu\w*\|hea\w*\|heads\w*\|lin\w*\)\>" 199 + syn match sqlSetOptions contained "\<\(lobof\w*\|longc\w*\|mark\w*\|newp\w*\|numf\w*\)\>" 200 + syn match sqlSetOptions contained "\<\(pages\w*\|pau\w*\|serverout\w*\|shift\w*\|show\w*\)\>" 201 + syn match sqlSetOptions contained "\<\(sqlbl\w*\|sqlc\w*\|sqlco\w*\|sqln\w*\|sqlpluscompat\w*\)\>" 202 + syn match sqlSetOptions contained "\<\(sqlpre\w*\|sqlp\w*\|sqlt\w*\|suf\w*\|tab\)\>" 203 + syn match sqlSetOptions contained "\<\(term\w*\|timi\w*\|und\w*\|ver\w*\|wra\w\?\)\>" 204 + syn match sqlSetOptions contained "\<\(xquery\s\+\(baseuri\|ordering\|node\|context\)\)\>" 205 + syn keyword sqlSetValues contained all body byreference byvalue default 206 + syn keyword sqlSetValues contained entry fill head html identifier indent 207 + syn keyword sqlSetValues contained linenum local none off on size table truncate 208 + syn match sqlSetValues contained "\<\(ea\w*\|wr\w*\|imm\w*\|trace\w*\|expl\w*\|stat\w*\)\>" 209 + syn match sqlSetValues contained "\<\(intermed\w*\|pre\w*\|unl\w*\|for\w*\|wra\w*\|wor\w\?\)\>" 210 + syn match sqlSetValues contained "\<\(vis\w*\|inv\w*\)\>" 211 + syn match sqlSetValues contained "\<\(\(un\)\?ordered\)\>" 212 + 213 + let sh_minlines = 200 214 + let sh_maxlines = 2 * sh_minlines 215 + exec "syn sync minlines=" . sh_minlines . " maxlines=" . sh_maxlines 216 + 217 + command -nargs=+ HiLink hi def link <args> 218 + 219 + HiLink sqlComment Comment 220 + HiLink sqlError Error 221 + HiLink sqlFunction Function 222 + HiLink sqlUnknownFunc Exception 223 + HiLink sqlKeyword Special 224 + HiLink sqlConditional Conditional 225 + HiLink sqlNumber Number 226 + HiLink sqlOperator Operator 227 + HiLink sqlParen Comment 228 + HiLink sqlParenEmpty Operator 229 + HiLink sqlParenFunc Function 230 + HiLink sqlSpecial Keyword 231 + HiLink sqlStatement Statement 232 + HiLink sqlString String 233 + HiLink sqlTodo Todo 234 + HiLink sqlType Type 235 + HiLink sqlVariable Identifier 236 + 237 + HiLink sqlAnyString sqlString 238 + HiLink sqlAnyVariable sqlVariable 239 + HiLink sqlSetOptions Operator 240 + HiLink sqlSetValues Special 241 + 242 + delcommand HiLink 243 + 244 + let b:current_syntax = "sql"
+1 -3
tmux/init.tmux
··· 26 26 set -g base-index 1 27 27 set -g pane-base-index 1 28 28 29 - set -g @shell_mode 'vi' 30 - 31 29 set -g @sidebar-tree-command 'tree -aCI "tmp|bundle|coverage|target|node_modules|.git|log"' 32 - set -g @sidebar-tree-width '20' 30 + set -g @sidebar-tree-width '50' 33 31 34 32 # List of plugins 35 33 set -g @plugin 'tmux-plugins/tpm'
+4 -4
tmux/themes/agnoster.tmux
··· 2 2 set -g status-bg colour00 3 3 4 4 set -g status-left-length 30 5 - set -g status-left '#[fg=colour18,bg=colour21,bold] #S #[fg=colour21,bg=colour00,nobold]' 5 + set -g status-left '#[fg=colour00,bg=colour08,nobold] #S #[fg=colour08,bg=colour00,nobold]' 6 6 7 7 set -g status-right '#(eval tmux-airline `tmux display -p "#{client_width}"`)' 8 8 set -g status-right-length 150 9 9 10 - set -g window-status-format "#[fg=colour19,bg=colour00] #I  #W#[default]" 11 - set -g window-status-current-format "#[fg=colour00,bg=colour19]#[fg=colour21] #I  #[bold]#W #[fg=colour19,bg=colour00,nobold]" 10 + set -g window-status-format "#[fg=colour08,bg=colour00] #I  #W#[default]" 11 + set -g window-status-current-format "#[fg=colour00,bg=colour08] #[fg=colour00]#I  #W #[fg=colour08,bg=colour00,nobold]" 12 12 13 - set-window-option -g window-status-fg colour21 13 + set-window-option -g window-status-fg colour08 14 14 set-window-option -g window-status-activity-attr none 15 15 set-window-option -g window-status-bell-attr none 16 16 set-window-option -g window-status-activity-fg yellow
+16
utils/ctags
··· 2 2 --exclude=log 3 3 --exclude=tmp 4 4 --exclude=target 5 + 6 + --langdef=Elixir 7 + --langmap=Elixir:.ex.exs 8 + --regex-Elixir=/^[ \t]*def(p?)[ \t]+([a-z_][a-zA-Z0-9_?!]*)/\2/f,functions,functions (def ...)/ 9 + --regex-Elixir=/^[ \t]*defcallback[ \t]+([a-z_][a-zA-Z0-9_?!]*)/\1/c,callbacks,callbacks (defcallback ...)/ 10 + --regex-Elixir=/^[ \t]*defdelegate[ \t]+([a-z_][a-zA-Z0-9_?!]*)/\1/d,delegates,delegates (defdelegate ...)/ 11 + --regex-Elixir=/^[ \t]*defexception[ \t]+([A-Z][a-zA-Z0-9_]*\.)*([A-Z][a-zA-Z0-9_?!]*)/\2/e,exceptions,exceptions (defexception ...)/ 12 + --regex-Elixir=/^[ \t]*defimpl[ \t]+([A-Z][a-zA-Z0-9_]*\.)*([A-Z][a-zA-Z0-9_?!]*)/\2/i,implementations,implementations (defimpl ...)/ 13 + --regex-Elixir=/^[ \t]*defmacro(p?)[ \t]+([a-z_][a-zA-Z0-9_?!]*)\(/\2/a,macros,macros (defmacro ...)/ 14 + --regex-Elixir=/^[ \t]*defmacro(p?)[ \t]+([a-zA-Z0-9_?!]+)?[ \t]+([^ \tA-Za-z0-9_]+)[ \t]*[a-zA-Z0-9_!?!]/\3/o,operators,operators (e.g. "defmacro a <<< b")/ 15 + --regex-Elixir=/^[ \t]*defmodule[ \t]+([A-Z][a-zA-Z0-9_]*\.)*([A-Z][a-zA-Z0-9_?!]*)/\2/m,modules,modules (defmodule ...)/ 16 + --regex-Elixir=/^[ \t]*defprotocol[ \t]+([A-Z][a-zA-Z0-9_]*\.)*([A-Z][a-zA-Z0-9_?!]*)/\2/p,protocols,protocols (defprotocol...)/ 17 + --regex-Elixir=/^[ \t]*Record\.defrecord[ \t]+:([a-zA-Z0-9_]+)/\1/r,records,records (defrecord...)/ 18 + --regex-Elixir=/^[ \t]*test[ \t]+\"([a-z_][a-zA-Z0-9_?! ]*)\"*/\1/t,tests,tests (test ...)/ 19 + 20 + --fields=+l
+3 -1
utils/dir_colors
··· 14 14 # Background 256 color coding: 15 15 # 48;5;COLOR_NUMBER 16 16 17 - NORMAL 00;38;5;19 # no color code at all 17 + NORMAL 00;38;5;01 # no color code at all 18 18 #FILE 00 # regular file: use no color at all 19 19 RESET 0 # reset to "normal" color 20 20 DIR 00;38;5;04 # directory 01;34 ··· 156 156 .coffee 01;38;5;11 157 157 .ts 01;38;5;11 158 158 .nix 01;38;5;13 159 + .ex 01;38;5;01 160 + .exs 01;38;5;01 159 161 # }}} 160 162 # Documentation {{{ 161 163 .md 01;38;5;07