mirror of
https://github.com/olexsmir/dotfiles.git
synced 2026-01-15 16:51:34 +02:00
Addd snippets for vim, update i3 hotkeys
This commit is contained in:
parent
f7c0cef79f
commit
25b4e80c8d
10 changed files with 195 additions and 47 deletions
39
config/nvim/UltiSnips/sh.snippets
Normal file
39
config/nvim/UltiSnips/sh.snippets
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
snippet !sh "SH Shebang"
|
||||
#!/bin/sh
|
||||
${1}
|
||||
endsnippet
|
||||
|
||||
snippet !bash "BASH Shebang"
|
||||
#!/bin/bash
|
||||
${1}
|
||||
endsnippet
|
||||
|
||||
snippet if "If declaration"
|
||||
if [ ${1} ]; then
|
||||
${2}
|
||||
fi
|
||||
endsnippet
|
||||
|
||||
snippet for "For loop"
|
||||
for (( i=0; i < ${1:10}; i++ )); do
|
||||
${2}
|
||||
done
|
||||
endsnippet
|
||||
|
||||
snippet while "While loop"
|
||||
while ${1:true}; do
|
||||
${2}
|
||||
done
|
||||
endsnippet
|
||||
|
||||
snippet case "Case"
|
||||
case "${1:$variable}" in
|
||||
"${2}") ${3} ;;
|
||||
esac
|
||||
endsnippet
|
||||
|
||||
snippet fn "Function declaration"
|
||||
function ${1:name}(${2}) {
|
||||
${3}
|
||||
}
|
||||
endsnippet
|
||||
Loading…
Add table
Add a link
Reference in a new issue