Add more stuff for journal

This commit is contained in:
2026-02-09 22:34:38 -03:00
parent d225df4a39
commit 2333ad2fea

View File

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