more misc shortcuts

This commit is contained in:
Noah Masur 2021-04-26 12:55:33 -04:00
parent 482daf329e
commit 5d04fad4c9
4 changed files with 20 additions and 6 deletions

View File

@ -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'

View File

@ -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

View File

@ -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

View File

@ -14,8 +14,9 @@ map <Space> <Leader>
"This unsets the `last search pattern` register by hitting return
nnoremap <silent> <CR> :noh<CR><CR>
" Replace all
nnoremap <Leader>S :%s//g<Left><Left>
" Find and replace
nnoremap <Leader>S :%s/
vnoremap <leader>S :s/
" Shuffle lines around
nnoremap <A-j> :m .+1<CR>==
@ -105,7 +106,7 @@ nnoremap <Leader>rr :Refresh<cr>
nnoremap <Leader>rp :Refresh<cr> :PlugInstall<cr>
" Open file tree
noremap <silent> <Leader>ft :Fern . -drawer -width=35 -toggle<CR><C-w>=
nnoremap <silent> <Leader>ft :Fern . -drawer -width=35 -toggle<CR><C-w>=
" Tabularize
noremap <Leader>ta :Tabularize /