58 current 2025-04-30 20:36:21 25.05.20250424.f771eb4 6.12.24 *
This commit is contained in:
@@ -44,10 +44,19 @@ vim.api.nvim_create_autocmd('VimEnter', {
|
||||
callback = function()
|
||||
local w = vim.g.goyo_if
|
||||
if w then
|
||||
vim.schedule(function()
|
||||
vim.cmd('BarbarDisable')
|
||||
end)
|
||||
vim.schedule(hide)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('UIEnter', {
|
||||
once = true,
|
||||
group = grp,
|
||||
callback = function()
|
||||
local w = vim.g.goyo_if
|
||||
if w then
|
||||
vim.opt.showtabline = 0
|
||||
vim.cmd('BarbarDisable')
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
@@ -185,14 +185,16 @@ super + {o}
|
||||
|
||||
# open my notes without goyo and with nvimteee
|
||||
super + {shift} + {o}
|
||||
alacritty -e nvim /home/synchronous/journal/Daily.md -c "execute 'normal G' | NvimTreeOpen /home/synchronous/journal"
|
||||
# alacritty -e nvim /home/synchronous/journal/Daily.md -c "execute 'normal G' | NvimTreeOpen /home/synchronous/journal"
|
||||
nf daily
|
||||
|
||||
# search my notes using rofi and open the right one
|
||||
super + {ctrl} + {o}
|
||||
sh /home/synchronous/.scripts/vimwiki/search_notes.sh
|
||||
# sh /home/synchronous/.scripts/vimwiki/search_notes.sh
|
||||
nf search
|
||||
|
||||
super + {ctrl} + {p}
|
||||
sh /home/synchronous/.scripts/papers/paper-search-cached.sh
|
||||
# sh /home/synchronous/.scripts/papers/paper-search-cached.sh
|
||||
|
||||
super + {ctrl} + {l}
|
||||
sh /home/synchronous/.scripts/papers/paper-search.sh
|
||||
@@ -211,7 +213,8 @@ super + {alt} + {c}
|
||||
find /home/synchronous/current-semester -follow -maxdepth 1 | cut -c36- | sed '/^[[:space:]]*$/d' | rofi -dmenu | read rsem; yq ".url" "/home/synchronous/current-semester/$rsem/info.yaml" | xargs firefox
|
||||
|
||||
super + {p}
|
||||
sh /home/synchronous/.scripts/vimwiki/open_todo.sh
|
||||
# sh /home/synchronous/.scripts/vimwiki/open_todo.sh
|
||||
nf todo
|
||||
|
||||
super + {m}
|
||||
sh /home/synchronous/.scripts/vimwiki/open-learning.sh
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user