Newest version of dotfiles with Ghostty, Fish, kickstart vim and zsh updates
This commit is contained in:
34
.config/fish/conf.d/nvim.fish
Normal file
34
.config/fish/conf.d/nvim.fish
Normal file
@@ -0,0 +1,34 @@
|
||||
# Enhanced nvim with project detection
|
||||
function v
|
||||
if test (count $argv) -eq 0
|
||||
# Open nvim in project root or current dir
|
||||
if test -f package.json; or test -f go.mod; or test -f requirements.txt; or test -f Dockerfile; or test -f docker-compose.yml
|
||||
nvim .
|
||||
else
|
||||
nvim
|
||||
end
|
||||
else
|
||||
nvim $argv
|
||||
end
|
||||
end
|
||||
|
||||
# Quick config edit
|
||||
function vconfig
|
||||
nvim ~/.config/nvim/
|
||||
end
|
||||
|
||||
# Edit dockerfile
|
||||
function vdocker
|
||||
if test -f Dockerfile
|
||||
nvim Dockerfile
|
||||
else if test -f docker-compose.yml
|
||||
nvim docker-compose.yml
|
||||
else
|
||||
echo "No Docker files found"
|
||||
end
|
||||
end
|
||||
|
||||
# Edit kubernetes manifests
|
||||
function vk8s
|
||||
find . -name "*.yaml" -o -name "*.yml" | grep -E "(k8s|kubernetes|deploy)" | head -5 | xargs nvim
|
||||
end
|
||||
Reference in New Issue
Block a user