dotfiles/.config/nvim/snippets/fish.snippets

45 lines
649 B
Text
Raw Normal View History

# Shebang
snippet #! "shebang"
#!/usr/bin/env fish
snippet if "if ... end"
if $1
${0:${VISUAL}}
end
snippet elif "else if ..."
else if $1
${0:${VISUAL}}
snippet fori "for ... in ... end"
for $1 in $2
${0:${VISUAL}}
end
snippet wh "while ... end"
while $1
${0:${VISUAL}}
end
snippet wht "while true ... end"
while true
${0:${VISUAL}}
end
snippet sw "switch ... case ... end"
switch $1
case $2
${0:${VISUAL}}
end
snippet func "function ... end"
function $1
${0:${VISUAL}}
end
snippet dn "&>/dev/null"
&>/dev/null
snippet abbr "abbr -a ... --position ..."
abbr -a $1 --position ${2:command} "${3:${VISUAL}}"$0