diff --git a/functions/journal.fish b/functions/journal.fish index 1c4d395..ec03313 100644 --- a/functions/journal.fish +++ b/functions/journal.fish @@ -3,11 +3,19 @@ function journal echo "Por favor, define a variável \$wiki com o caminho da wiki." exit 5 end - set -x NVIM_APPNAME nvim.bak - set NVIM "$wiki/journal/nvim.appimage" + # set -x NVIM_APPNAME nvim.bak + # set NVIM "$wiki/journal/nvim.appimage" + + cd $wiki/journal + + git pull + set NVIM nvim if test -e "$wiki/journal/$(date +%Y/%m/%d).md" - $NVIM +'execute "normal :WikiJournal\Go\\!!date +\\\\%R\I# \o\"' +"norm G\$" -c 'startinsert'; + $NVIM +'set spell' +'execute "normal :WikiJournal\Go\\!!date +\\\\%R\I# \o\"' +"norm G\$" -c 'startinsert'; else - $NVIM +'execute "normal :WikiJournal\!!date +\\\\%R\I# \o\"' +"norm G\$" -c 'startinsert' + $NVIM +'set spell' +'execute "normal :WikiJournal\!!date +\\\\%R\I# \o\"' +"norm G\$" -c 'startinsert' end + git add . + git commit -m "More entries" + git push end