mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-22 14:35:37 +00:00
more wiki stuff
This commit is contained in:
parent
7b5e55cd3e
commit
2f4e73b5d6
@ -36,6 +36,8 @@ if status --is-interactive
|
|||||||
|
|
||||||
# Fuzzy finder
|
# Fuzzy finder
|
||||||
fzf_key_bindings
|
fzf_key_bindings
|
||||||
|
set -g FZF_DEFAULT_COMMAND 'rg --files'
|
||||||
|
set -g FZF_DEFAULT_OPTS '-m --height 50% --border'
|
||||||
|
|
||||||
# Use `starship` prompt
|
# Use `starship` prompt
|
||||||
starship init fish | source
|
starship init fish | source
|
||||||
|
@ -15,4 +15,29 @@ function notes --description "Notes functions"
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function today --description "Open today's journal"
|
||||||
|
set today (date -j +"%Y-%m-%d_%a")
|
||||||
|
set today_journal $HOME/Documents/notes/journal/$today.md
|
||||||
|
if [ -f $today_journal ]
|
||||||
|
vim $today_journal
|
||||||
|
else
|
||||||
|
set yesterday (date -jv "-1d" +"%Y-%m-%d_%a")
|
||||||
|
set tomorrow (date -jv "+1d" +"%Y-%m-%d_%a")
|
||||||
|
printf "[[journal/$yesterday|Previous]] - [[calendar|Index]] - [[journal/$tomorrow|Next]]\n\n---\n\n # Tasks\n\n\n# Log\n\n\n# Communication\n\n---\n\n# Meetings\n\n" > $today_journal
|
||||||
|
echo "New journal added."
|
||||||
|
vim $today_journal
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function wiki --description "Open vimwiki file"
|
||||||
|
set file (fd . ~/Documents/notes | fzf)
|
||||||
|
if [ $status -eq 0 ]
|
||||||
|
vim $file
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function note --description "Edit or create a note"
|
||||||
|
vim ~/Documents/notes/$argv[1].md
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user