mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 14:12:41 +00:00
Adds zsh functions, needs work on moving some items
This commit is contained in:
17
zsh/config/functions/n
Executable file
17
zsh/config/functions/n
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
# Open's neovim.
|
||||
#
|
||||
# If the argument passed in is a directory or not supplied, then
|
||||
# open neovim with telescope find files opened. Otherwise open the
|
||||
# file that is supplied.
|
||||
#
|
||||
|
||||
function n() {
|
||||
[ -d "$1" ] || [ -z "$1" ] \
|
||||
&& nvim -c ":Telescope find_files" \
|
||||
&& return 0
|
||||
|
||||
nvim "$1"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user