58 current 2025-04-30 20:36:21 25.05.20250424.f771eb4 6.12.24 *

This commit is contained in:
2025-04-30 20:36:29 -04:00
parent 9d10d65c63
commit ab9069d30b
3 changed files with 35 additions and 15 deletions

View File

@@ -13,7 +13,8 @@ search() {
if [[ "$rcv" == "" ]]; then exit 1; fi
if [[ $(echo "$rs" | rg "$rcv") ]]; then # check if we actually have our note
alacritty -t "$rcv" -e nvim "$main_dir/$rcv" \
-c "Goyo | execute 'normal 4j' | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" &!
-c "Goyo | execute 'normal 4j' | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" \
-c "lua vim.g.goyo_if = 1" &!
# -c "syntax match LinkPattern /[a-zA-Z0-9\-][a-zA-Z0-9\-]*\.md/" \
# -c "highlight LinkPattern guifg=LightBlue gui=underline" \
# -c "nnoremap <CR> :call CustomGf()<CR>" \
@@ -31,7 +32,8 @@ search() {
alacritty -t "$rcv" -e nvim "$main_dir/$rcv" \
-c "Goyo | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" \
-c "call setline(1, ['---', 'title: $replaced', 'tags: ', '---', '']) | execute 'normal G'" &!
-c "call setline(1, ['---', 'title: $replaced', 'tags: ', '---', '']) | execute 'normal G'" \
-c "lua vim.g.goyo_if = 1" &!
# make sure standardized frontmatter is there
fi
}
@@ -39,12 +41,14 @@ search() {
open_daily() {
alacritty -t "daily.md" -e nvim "$main/daily.md" \
-c "Goyo | set path+=$main_dir" \
-c "execute 'normal G'" &!
-c "execute 'normal G'" \
-c "lua vim.g.goyo_if = 1" &!
}
open_todo() {
alacritty -t "todo.md" -e nvim "$main/todo.md" \
-c "Goyo | set path+=$main_dir" &!
-c "Goyo | set path+=$main_dir" \
-c "lua vim.g.goyo_if = 1" &!
# -c "execute 'normal G'"
}
@@ -82,7 +86,8 @@ search_by_tags() {
if [[ "$rcv" == "" ]]; then exit 1; fi
if [[ $(echo "$rs" | rg "$rcv") ]]; then # check if we actually have our note
alacritty -t "$rcv" -e nvim "$main_dir/$rcv" \
-c "Goyo | execute 'normal 4j' | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" &!
-c "Goyo | execute 'normal 4j' | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" \
-c "lua vim.g.goyo_if = 1" &!
else
# if rcv doesn't contain md, add it
@@ -95,7 +100,8 @@ search_by_tags() {
alacritty -t "$rcv" -e nvim "$main_dir/$rcv" \
-c "Goyo | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" \
-c "call setline(1, ['---', 'title: $replaced', 'tags: ', '---', '']) | execute 'normal G'" &! # make sure standardized frontmatter is there
-c "call setline(1, ['---', 'title: $replaced', 'tags: ', '---', '']) | execute 'normal G'" \
-c "lua vim.g.goyo_if = 1" &!
fi
}
@@ -133,7 +139,8 @@ search_by_title() {
# echo "$rcv"
if [[ $(echo "$rs" | rg "$rcv") ]]; then # check if we actually have our note
alacritty -t "$rcv" -e nvim "$main_dir/$rcv" \
-c "Goyo | execute 'normal 4j' | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" &!
-c "Goyo | execute 'normal 4j' | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" \
-c "lua vim.g.goyo_if = 1" &!
else
# if rcv doesn't contain md, add it
@@ -146,7 +153,8 @@ search_by_title() {
alacritty -t "$rcv" -e nvim "$main_dir/$rcv" \
-c "Goyo | set path+=$main_dir | autocmd BufEnter * let b:coc_suggest_disable=1" \
-c "call setline(1, ['---', 'title: $replaced', 'tags: ', '---', '']) | execute 'normal G'" &! # make sure standardized frontmatter is there
-c "call setline(1, ['---', 'title: $replaced', 'tags: ', '---', '']) | execute 'normal G'" \
-c "lua vim.g.goyo_if = 1" &!
fi
}