This commit is contained in:
tavo-wasd 2023-06-02 09:14:58 -06:00
parent ae65dcf7fb
commit 8b7ef2ba49
3 changed files with 16 additions and 6 deletions

4
bashrc
View file

@ -91,8 +91,8 @@ while true ; do
[ -d "$opt" ] && cd "$opt" > /dev/null 2>&1 || break
done
ls
[ -n "$opt" ] && printf "\nOpen $opt? [y/N]: " && read -r open || return 0
[ "$open" = "y" ] && o "$opt"
[ -n "$opt" ] && printf "\nOpen $opt? [Y/n]: " && read -r open || return 0
[ "$open" != "n" ] && o "$opt" || return 0
}
bind '"\C-n":"fzf_nav\C-m"'

11
scripts/todo Executable file
View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
currweek="# Week $(date '+%U')"
if $(head -n1 ~/Documents/notes/note-todo.md | grep -q "^$currweek") ; then
bat -pp ~/Documents/notes/note-todo.md
else
sed -i "1s/^/$currweek\n/" ~/Documents/notes/note-todo.md
"$EDITOR" ~/Documents/notes/note-todo.md
fi

View file

@ -18,14 +18,13 @@ silent! normal! zE
80,110fold
112,118fold
let &fdl = &fdl
let s:l = 1 - ((0 * winheight(0) + 13) / 26)
let s:l = 95 - ((94 * winheight(0) + 27) / 55)
if s:l < 1 | let s:l = 1 | endif
keepjumps exe s:l
normal! zt
keepjumps 1
normal! 05|
keepjumps 95
normal! 01|
let &g:so = s:so_save | let &g:siso = s:siso_save
set hlsearch
nohlsearch
doautoall SessionLoadPost
" vim: set ft=vim :