aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Bobov <anton@bobov.name>2023-06-30 15:55:11 +0500
committerAnton Bobov <anton@bobov.name>2023-06-30 15:55:11 +0500
commit82ef876be9b347e7b2182e4ed84188c806150e7d (patch)
treeb8567f6aa24ffaab7d9ed54e5039a9e7a7a4107c
parent12fb847d4e47001103332cd9695afe80f894371f (diff)
vim: Add sh template and snippets
-rw-r--r--files/.vim/UltiSnips/sh.snippets7
-rw-r--r--files/.vim/templates/=template=.sh8
-rw-r--r--files/.vimrc3
3 files changed, 11 insertions, 7 deletions
diff --git a/files/.vim/UltiSnips/sh.snippets b/files/.vim/UltiSnips/sh.snippets
new file mode 100644
index 0000000..e509201
--- /dev/null
+++ b/files/.vim/UltiSnips/sh.snippets
@@ -0,0 +1,7 @@
+snippet ssh "safe shell optsions"
+set -euo pipefail
+endsnippet
+
+snippet scriptdir "get script directory"
+scriptdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
+endsnippet
diff --git a/files/.vim/templates/=template=.sh b/files/.vim/templates/=template=.sh
index 93127fa..a077c53 100644
--- a/files/.vim/templates/=template=.sh
+++ b/files/.vim/templates/=template=.sh
@@ -1,5 +1,3 @@
-#!/bin/bash
-
-set -e
-
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
+#!/bin/bash
+
+set -euo pipefail
diff --git a/files/.vimrc b/files/.vimrc
index 1df0cb4..a8619c8 100644
--- a/files/.vimrc
+++ b/files/.vimrc
@@ -12,7 +12,7 @@ Plug 'vim-scripts/L9'
" Git inside vim
Plug 'tpope/vim-fugitive'
-Plug 'airblade/vim-gitgutter'
+Plug 'airblade/vim-gitgutter', { 'branch': 'main' }
Plug 'tpope/vim-unimpaired'
" Intelligent date inc/dec
@@ -447,7 +447,6 @@ if executable('xmlstarlet')
endif
command Jira %!pandoc --to=jira
-command Mine %!to-html-fragment
" }}}
" Filetype {{{
" Vundle {{{