Skip to content

Instantly share code, notes, and snippets.

@lukepighetti
Last active August 29, 2024 14:19
Show Gist options
  • Save lukepighetti/1e56ef6e870931bfe28b57098df84c1c to your computer and use it in GitHub Desktop.
Save lukepighetti/1e56ef6e870931bfe28b57098df84c1c to your computer and use it in GitHub Desktop.
My helix config plus commands I use every day in my Helix / Flutter workflows
*.lock
android
ios
linux
macos
web
windows
# helix
function hx-find(){
hx $(ag . | fzf | cut -d : -f 1,2)
}
# general
function notes(){
hx ~/Documents/NOTES.md
}
function config-open(){
hx ~/.zshrc
}
function config-reload(){
source ~/.zshrc
echo "Reloaded ~/.zshrc"
}
# flutter
function flutter-watch(){
tmux new-session \;\
send-keys 'flutter run --pid-file=/tmp/tf1.pid' Enter \;\
split-window -v \;\
send-keys 'npx -y nodemon -e dart -x "cat /tmp/tf1.pid | xargs kill -s USR1"' Enter \;\
resize-pane -y 5 -t 1 \;\
select-pane -t 0 \;
}
function flutter-coverage(){
flutter test --coverage
genhtml coverage/lcov.info -o coverage/html
open coverage/html/index.html
}
# git
function gh-repo(){
gh repo view -w
}
function gh-pr(){
gh pr view -w
}
function gh-prune(){
npx -y @teppeis/git-delete-squashed
}

Setup

brew install helix
brew install lazygit
brew install the_silver_searcher # ag
brew install fzf
theme = "tokyonight_storm"
[editor]
line-number = "relative"
mouse = false
rulers = [80]
shell = ["zsh", "-c"]
[keys.normal]
C-p = ["move_line_up", "scroll_up"]
C-n = ["move_line_down", "scroll_down"]
esc = ["collapse_selection", "keep_primary_selection"]
[editor.cursor-shape]
insert = "bar"
normal = "block"
select = "underline"
[editor.file-picker]
hidden = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment