# HG changeset patch # User Steve Losh # Date 1580583171 18000 # Node ID 8da727b58a0febe19b1a05ca6cee886dcef6c0ab # Parent 6a7f7a6d75320335488d496a4d2d9c20c252a270 More diff -r 6a7f7a6d7532 -r 8da727b58a0f bin/e --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/e Sat Feb 01 13:52:51 2020 -0500 @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +set -euo pipefail + +"$EDITOR" "$@" diff -r 6a7f7a6d7532 -r 8da727b58a0f bin/nnl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/nnl Sat Feb 01 13:52:51 2020 -0500 @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +set -euo pipefail + +tr -d '\n' diff -r 6a7f7a6d7532 -r 8da727b58a0f bin/pbc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/pbc Sat Feb 01 13:52:51 2020 -0500 @@ -0,0 +1,1 @@ +pbcopy \ No newline at end of file diff -r 6a7f7a6d7532 -r 8da727b58a0f bin/pbcopy --- a/bin/pbcopy Sat Feb 01 12:56:34 2020 -0500 +++ b/bin/pbcopy Sat Feb 01 13:52:51 2020 -0500 @@ -1,3 +1,5 @@ #!/usr/bin/env bash -xclip -selection clipboard -i +set -euo pipefail + +xsel --clipboard --input diff -r 6a7f7a6d7532 -r 8da727b58a0f bin/pbp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/pbp Sat Feb 01 13:52:51 2020 -0500 @@ -0,0 +1,1 @@ +pbpaste \ No newline at end of file diff -r 6a7f7a6d7532 -r 8da727b58a0f bin/pbpaste --- a/bin/pbpaste Sat Feb 01 12:56:34 2020 -0500 +++ b/bin/pbpaste Sat Feb 01 13:52:51 2020 -0500 @@ -1,3 +1,5 @@ #!/usr/bin/env bash -xclip -selection clipboard -o +set -euo pipefail + +xsel --clipboard diff -r 6a7f7a6d7532 -r 8da727b58a0f fish/functions/pbc.fish --- a/fish/functions/pbc.fish Sat Feb 01 12:56:34 2020 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -function pbc -d "pbcopy" - xsel --clipboard --input -end diff -r 6a7f7a6d7532 -r 8da727b58a0f fish/functions/pbp.fish --- a/fish/functions/pbp.fish Sat Feb 01 12:56:34 2020 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -function pbp -d "pbpaste" - xsel --clipboard -end diff -r 6a7f7a6d7532 -r 8da727b58a0f fish/functions/pbpb.fish --- a/fish/functions/pbpb.fish Sat Feb 01 12:56:34 2020 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -function pbpb -d "pbpaste to pastebin site" - pbp | pb -end diff -r 6a7f7a6d7532 -r 8da727b58a0f gnuplot --- a/gnuplot Sat Feb 01 12:56:34 2020 -0500 +++ b/gnuplot Sat Feb 01 13:52:51 2020 -0500 @@ -1,9 +1,51 @@ +# Basic Settings ---------------------------------------------------------- {{{ + +set encoding utf8 set terminal qt noraise set samples 1000 +# }}} +# Constants --------------------------------------------------------------- {{{ + tau = 2 * pi e = 2.71828182845905 r2 = sqrt(2.0) +# }}} +# Utility Functions ------------------------------------------------------- {{{ + min(a, b) = (ab) ? a : b + +# }}} +# Exporting --------------------------------------------------------------- {{{ + +export(file, terminal) = sprintf( \ + "set terminal push;" . \ + "set terminal %s;" . \ + "set output '%s';" . \ + "replot;" . \ + "set output;" . \ + "set terminal pop;" . \ + "print system('realpath %s | nnl | pbcopy');" \ + , terminal, file, file) + +export_pdf(file) = export(file . '.pdf', "pdfcairo") +export_png(file) = export(file . '.png', "pngcairo") + +pdf = "eval export_pdf('graph')" +png = "eval export_png('graph')" + +# }}} +# Other ------------------------------------------------------------------- {{{ + +kdens(file, column, bandwidth) = sprintf( \ + "stats '%s' using %d;" . \ + "plot '%s' using %d:(1.0/STATS_records) smooth kdensity bandwidth %f;" \ + , file, column, file, column, bandwidth) + +cdf(file, column) = sprintf( \ + "plot '%s' using %d:(1.0) smooth cnormal;" \ + , file, column) + +# }}} diff -r 6a7f7a6d7532 -r 8da727b58a0f vim/vimrc --- a/vim/vimrc Sat Feb 01 12:56:34 2020 -0500 +++ b/vim/vimrc Sat Feb 01 13:52:51 2020 -0500 @@ -1405,7 +1405,7 @@ augroup ft_gnuplot au! - au BufNewFile,BufRead *.gp setlocal filetype=gnuplot + au BufNewFile,BufRead *.gp,.gnuplot setlocal filetype=gnuplot au FileType gnuplot nnoremap o :call OpenGnuplotRepl()