Open files FAST from zsh | or bash if thats your thing

I am often in a set of tmux splits flying back and forth, accidentally close my editor, so when I come back to that split and hit my keybinds to edit files I enter them into zsh rather than into nvim like I intended. Today I am going to
sand off t…


This content originally appeared on DEV Community and was authored by Waylon Walker

I am often in a set of tmux splits flying back and forth, accidentally close my editor, so when I come back to that split and hit my keybinds to edit files I enter them into zsh rather than into nvim like I intended. Today I am going to
sand off that rough edge and get as similar behavior to nvim as I can with a couple of aliases.

Make sure you check out the YouTube video to see all of my improvements.

what's an alias

If you have never heard of an alias before it's essentially a shortcut to a given command. You can pass additional flags to the underlying command and they will get passed in. Most of the time they are just shorter versions of commands that you run often or even like in this case a common muscle memory typo that occurs for you.

My new alias's for fuzzy editing files from zsh

Here are the new aliases that I came up with to smooth out my workflow. These give me a similar feel to how these keys work in neovim but from zsh.

# fuzzy select file to edit
alias p='nvim `fzf --preview="bat --color always {}"`'

# give me the same syntax as edit while in neovim
alias :e='nvim '

Follow the YouTube channel or the rss
feed
to stay up to date.

Related links


This content originally appeared on DEV Community and was authored by Waylon Walker


Print Share Comment Cite Upload Translate Updates
APA

Waylon Walker | Sciencx (2021-12-03T03:12:20+00:00) Open files FAST from zsh | or bash if thats your thing. Retrieved from https://www.scien.cx/2021/12/03/open-files-fast-from-zsh-or-bash-if-thats-your-thing/

MLA
" » Open files FAST from zsh | or bash if thats your thing." Waylon Walker | Sciencx - Friday December 3, 2021, https://www.scien.cx/2021/12/03/open-files-fast-from-zsh-or-bash-if-thats-your-thing/
HARVARD
Waylon Walker | Sciencx Friday December 3, 2021 » Open files FAST from zsh | or bash if thats your thing., viewed ,<https://www.scien.cx/2021/12/03/open-files-fast-from-zsh-or-bash-if-thats-your-thing/>
VANCOUVER
Waylon Walker | Sciencx - » Open files FAST from zsh | or bash if thats your thing. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/12/03/open-files-fast-from-zsh-or-bash-if-thats-your-thing/
CHICAGO
" » Open files FAST from zsh | or bash if thats your thing." Waylon Walker | Sciencx - Accessed . https://www.scien.cx/2021/12/03/open-files-fast-from-zsh-or-bash-if-thats-your-thing/
IEEE
" » Open files FAST from zsh | or bash if thats your thing." Waylon Walker | Sciencx [Online]. Available: https://www.scien.cx/2021/12/03/open-files-fast-from-zsh-or-bash-if-thats-your-thing/. [Accessed: ]
rf:citation
» Open files FAST from zsh | or bash if thats your thing | Waylon Walker | Sciencx | https://www.scien.cx/2021/12/03/open-files-fast-from-zsh-or-bash-if-thats-your-thing/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.