diff options
Diffstat (limited to 'stow')
-rw-r--r-- | stow/vim/.vim/ftplugin/sh/sh.vim | 4 | ||||
-rw-r--r-- | stow/vim/.vim/ftplugin/sh/snippets/case.txt | 11 | ||||
-rw-r--r-- | stow/vim/.vim/ftplugin/sh/snippets/template.txt | 11 |
3 files changed, 20 insertions, 6 deletions
diff --git a/stow/vim/.vim/ftplugin/sh/sh.vim b/stow/vim/.vim/ftplugin/sh/sh.vim index d81ab3c..2aec1f2 100644 --- a/stow/vim/.vim/ftplugin/sh/sh.vim +++ b/stow/vim/.vim/ftplugin/sh/sh.vim @@ -19,5 +19,5 @@ nnoremap <buffer> <leader>e :Errors<CR> let mapleader = "," -inoremap <buffer> <leader>if if <+++>; then<CR><++><CR>fi<++><Esc>?<+++><CR>cf> -"inoremap <buffer> <leader>if <Esc>:read ~/.vim/ftplugin/sh/snippets/if.txt<CR>kdd/<+++><CR>cf> +inoremap <buffer> <leader>if <Esc>:read ~/.vim/ftplugin/sh/snippets/if.txt<CR>kdd/<+++><CR>cf> +inoremap <buffer> <leader>case <Esc>:read ~/.vim/ftplugin/sh/snippets/case.txt<CR>kdd/<+++><CR>cf> diff --git a/stow/vim/.vim/ftplugin/sh/snippets/case.txt b/stow/vim/.vim/ftplugin/sh/snippets/case.txt new file mode 100644 index 0000000..4e203fa --- /dev/null +++ b/stow/vim/.vim/ftplugin/sh/snippets/case.txt @@ -0,0 +1,11 @@ +case <+++> in + + <++> ) + <++> + ;; + + * ) + <++> + ;; + +esac diff --git a/stow/vim/.vim/ftplugin/sh/snippets/template.txt b/stow/vim/.vim/ftplugin/sh/snippets/template.txt index 245ff49..64d3a2e 100644 --- a/stow/vim/.vim/ftplugin/sh/snippets/template.txt +++ b/stow/vim/.vim/ftplugin/sh/snippets/template.txt @@ -7,17 +7,20 @@ usageMessage="Usage: template.sh [-ac] [-b OPTARG] FILE..." # Process options -while getopts ":ab:c" opt; do +while getopts ':ab:c' opt; do case $opt in 'a' ) - echo a ;; + echo a + ;; 'b' ) - echo b $OPTARG ;; + echo b $OPTARG + ;; 'c' ) - echo c ;; + echo c + ;; '?' ) printf "${usageMessage}\n" |