From 5d04fad4c9ac8da4a146121745f66c06f394e702 Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Mon, 26 Apr 2021 12:55:33 -0400 Subject: [PATCH] more misc shortcuts --- fish.configlink/functions/abbrs.fish | 1 + fish.configlink/functions/meeting.fish | 7 ++++--- fish.configlink/functions/tickers.fish | 11 +++++++++++ nvim.configlink/settings/custom.vim | 7 ++++--- 4 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 fish.configlink/functions/tickers.fish diff --git a/fish.configlink/functions/abbrs.fish b/fish.configlink/functions/abbrs.fish index ab947b0..6612507 100644 --- a/fish.configlink/functions/abbrs.fish +++ b/fish.configlink/functions/abbrs.fish @@ -78,6 +78,7 @@ function abbrs --description 'All abbreviations' '-keyout server.key -out server.csr' abbr -a fingerprint 'ssh-keyscan myhost.com | ssh-keygen -lf -' abbr -a publickey 'ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub' + abbr -a forloop 'for i in (seq 1 100)' # Docker abbr -a dc '$DOTS/bin/docker_cleanup' diff --git a/fish.configlink/functions/meeting.fish b/fish.configlink/functions/meeting.fish index e9b1ff9..98f1f1d 100644 --- a/fish.configlink/functions/meeting.fish +++ b/fish.configlink/functions/meeting.fish @@ -4,7 +4,8 @@ function meeting --description "Describe a meeting" -a "name" set time (date +"%I:%M%p" | tr '[:upper:]' '[:lower:]') set meeting_name (echo $name | tr ' ' '-' | tr '[:upper:]' '[:lower:]') set meeting_note $today_date-$meeting_name - printf "[$TODAY_NOTE](journal/$TODAY_NOTE.md) | #meeting\n\n# $name\n\n---\n\n" > $NOTES_PATH/$meeting_note.md - printf "\n\n---\n\n$time - [$name](../$meeting_note.md)\n\n---\n\n" >> $TODAY_NOTE_FILE - open "obsidian://open?vault=notes&file=$meeting_note" + set meeting_file meetings/$meeting_note.md + printf "[$TODAY_NOTE](../journal/$TODAY_NOTE.md) | #meeting\n\n# $name\n\n---\n\n" > $NOTES_PATH/$meeting_file + printf "\n\n---\n\n$time - [$name](../$meeting_file)\n\n---\n\n" >> $TODAY_NOTE_FILE + vim $NOTES_PATH/$meeting_file end diff --git a/fish.configlink/functions/tickers.fish b/fish.configlink/functions/tickers.fish new file mode 100644 index 0000000..34d6d36 --- /dev/null +++ b/fish.configlink/functions/tickers.fish @@ -0,0 +1,11 @@ +#!/usr/local/bin/fish + +function tickers --description "Stock and money tickers" + abbr -a tk 'tickrs -s' + abbr -a vt 'tickrs -s vt' + abbr -a vti 'tickrs -s vti' + abbr -a vxus 'tickrs -s vxus' + abbr -a btc 'rates btc usd' + abbr -a ada 'rates ada usd' + abbr -a eth 'rates eth usd' +end diff --git a/nvim.configlink/settings/custom.vim b/nvim.configlink/settings/custom.vim index 2d1aef9..2eeea49 100644 --- a/nvim.configlink/settings/custom.vim +++ b/nvim.configlink/settings/custom.vim @@ -14,8 +14,9 @@ map "This unsets the `last search pattern` register by hitting return nnoremap :noh -" Replace all -nnoremap S :%s//g +" Find and replace +nnoremap S :%s/ +vnoremap S :s/ " Shuffle lines around nnoremap :m .+1== @@ -105,7 +106,7 @@ nnoremap rr :Refresh nnoremap rp :Refresh :PlugInstall " Open file tree -noremap ft :Fern . -drawer -width=35 -toggle= +nnoremap ft :Fern . -drawer -width=35 -toggle= " Tabularize noremap ta :Tabularize /