Skip to content

Commit

Permalink
modify find-and-edit to not use vim specifically
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHicks committed Jan 21, 2020
1 parent 140a7c0 commit ebdf6bc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions dotfiles/zsh.nix
Expand Up @@ -7,15 +7,17 @@ let
./zsh/jetpack.zsh
./zsh/jump.zsh
./zsh/kill-process.zsh
./zsh/neovim.zsh
./zsh/find-and-edit.zsh
./zsh/nix.zsh
./zsh/nixify.sh
./zsh/root.zsh
./zsh/rubofix.zsh
./zsh/scripts.zsh
];

extraInitExtra = builtins.foldl' (soFar: new: soFar + "\n" + builtins.readFile new) "" extras;
extraInitExtra =
builtins.foldl' (soFar: new: soFar + "\n" + builtins.readFile new) ""
extras;
in {
home.packages = [
# for shell autocorrections
Expand Down
6 changes: 3 additions & 3 deletions dotfiles/zsh/neovim.zsh → dotfiles/zsh/find-and-edit.zsh
@@ -1,4 +1,4 @@
## neovim shortcuts
## finding files quickly

find_and_edit() {
if test -d .git; then
Expand All @@ -9,7 +9,7 @@ find_and_edit() {

files="$(fzf --preview='bat --color=always --paging=never --style=changes {}' --select-1 --multi --query="$@" <<< "$SOURCE")"
if [[ "$?" != "0" ]]; then return 1; fi
vim $files
$EDITOR $files
}

alias v=find_and_edit
alias e=find_and_edit

0 comments on commit ebdf6bc

Please sign in to comment.