diff options
| author | Paul Buetow <paul@buetow.org> | 2025-04-23 22:10:14 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-04-23 22:10:14 +0300 |
| commit | 789050fd674330dae96d3b5fd28fa2e12e7256a5 (patch) | |
| tree | 59320e594fff211fe41c905496bdf18edee83374 | |
| parent | ddf3cfbf9b7cff20c99e7974076326bfcd2d1e2b (diff) | |
Update
| -rw-r--r-- | dotfiles/fish/conf.d/notes.fish | 32 | ||||
| -rw-r--r-- | dotfiles/fish/conf.d/quickedit.fish | 31 | ||||
| -rw-r--r-- | dotfiles/helix/config.toml | 2 |
3 files changed, 32 insertions, 33 deletions
diff --git a/dotfiles/fish/conf.d/notes.fish b/dotfiles/fish/conf.d/notes.fish deleted file mode 100644 index 8a69619..0000000 --- a/dotfiles/fish/conf.d/notes.fish +++ /dev/null @@ -1,32 +0,0 @@ -set NOTES_DIR ~/Notes - -function notes::edit - cd ~/Notes - $VISUAL (find . -type f | fzf) - cd - >/dev/null -end - -function notes::quick - set -l name $argv[1] - set -l file "$NOTES_DIR/$name.md" - if not test -f "$file" - echo "# $name" >>"$file" - end - $EDITOR "$file" -end - -function notes::quick::find - set -l name $argv[1] - set -l note (find $NOTES_DIR/ -iregex ".*$name.*\.\(md\|txt\)" | head -n 1) - if not test -f "$note" - echo "Could not find any note in $NOTES_DIR" - return - end - $EDITOR "$note" -end - -abbr -a ,ne 'notes::edit' -abbr -a cdnodes "cd $NOTES_DIR" -abbr -a ,nq 'notes::quick' -abbr -a ,nf 'notes::quick::find' -abbr -a ,nr "ranger $NOTES_DIR" diff --git a/dotfiles/fish/conf.d/quickedit.fish b/dotfiles/fish/conf.d/quickedit.fish new file mode 100644 index 0000000..d0c5fc0 --- /dev/null +++ b/dotfiles/fish/conf.d/quickedit.fish @@ -0,0 +1,31 @@ +set -gx QUICKEDIT_DIR ~/QuickEdit + +function quickedit + set -l prev_dir (pwd) + + cd $QUICKEDIT_DIR + set -l file_path (find -L . -type f -not -path '*/.*' | fzf) + $EDITOR $file_path + + # Go to git toplevel dir (if exists) + cd (dirname $file_path) + set -l git_dir (git rev-parse --show-toplevel 2>/dev/null) + if test $status -eq 0 + cd $git_dir + end + if test -f Makefile + make + end + if test -d .git + git commit -a -m Update + git pull + git push + end + + cd $prev_dir +end + +abbr -a cdquickedit "cd $QUICKEDIT_DIR" +abbr -a ,qe quickedit +abbr -a ,ne quickedit +abbr -a ,qr "ranger $QUICKEDIT_DIR" diff --git a/dotfiles/helix/config.toml b/dotfiles/helix/config.toml index 039cc9a..7a95712 100644 --- a/dotfiles/helix/config.toml +++ b/dotfiles/helix/config.toml @@ -8,7 +8,7 @@ mouse = true cursorline = true [editor.soft-wrap] -enable = false +enable = true [editor.inline-diagnostics] cursor-line = "hint" |
