Make fvim alias for vim with fzf
This commit is contained in:
parent
3a9b2c05e1
commit
8a4b7f94e6
1 changed files with 4 additions and 8 deletions
|
@ -42,14 +42,10 @@ if [ -x /usr/bin/nvim ]; then
|
|||
alias vim='nvim'
|
||||
fi
|
||||
|
||||
# "fuzzy" open a file
|
||||
fvim() {
|
||||
if [ -x /usr/bin/nvim ]; then
|
||||
find . -name "$1" -exec /usr/bin/nvim {} \;
|
||||
else
|
||||
find . -name "$1" -exec /usr/bin/vim {} \;
|
||||
fi
|
||||
}
|
||||
# fuzzy open a file
|
||||
if [ -x /usr/bin/fzf ]; then
|
||||
alias fvim='vim $(fzf)'
|
||||
fi
|
||||
|
||||
# For common errors
|
||||
alias :q=' exit'
|
||||
|
|
Loading…
Add table
Reference in a new issue