Questions tagged [filetype-sh]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
67 views

Don’t start in insert mode when opening a shell script

How can I prevent vi from starting in insert mode when opening a "test.sh"-like file with the vi-plugin "bash-support" v4.3 ? When I vim test.sh it opens in insert mode When I vim .vimrc it opens in ...
2
votes
2answers
96 views

Highlighting another syntax in a shell heredoc

I edited my original question and title to broaden its scope to any syntax - with SQL used as just an example. You can adapt the examples and the answer to other languages. By adding suitable ...
2
votes
1answer
40 views

Modify `iskeyword` for keyword-local completion only

Context Some time ago, I added the following line to ~/.vim/after/ftplugin/sh.vim to make working with parameter expansions easier: setlocal iskeyword+=$ This is nice to be able to e.g. ysiw" via ...
0
votes
0answers
91 views

indentation different on different computers

If I indent the following script with gg=G: #!/usr/bin/env bash while true; do case "${1}" in -h) usage; exit 0;; -b) branch="${2}"; shift 2;; -t) build="${2}"; shift 2;; ...
2
votes
1answer
302 views

Vim highlights valid shell parameter expansion syntax as an error

#!/bin/bash echo ${2:-"-l -p"} Having some bash parameter-substitution fun and (Neo) Vim complains about it, while the code is perfectly fine. I know I can suppress errors totally by doing sort of ...
2
votes
1answer
83 views

Modify sh.vim to accept (@)_ as part of a variable name for Bash highlighting

I have Bash file in which I have constructs that include (@)_ as part of the variable name. For example: (@)_VariableName ${(@)_VariableName[@]} ${#(@)_VariableName[@]} ${!(@)_VariableName[@]} The ...