[vim/vim] Change includeexpr for shell? (Issue #11045)

12 views
Skip to first unread message

wzy

unread,
Sep 3, 2022, 4:39:12 AM9/3/22
to vim/vim, Subscribed

An example shell script:

pip install -ihttps://mirrors.bfsu.edu.cn/pypi/web/simple -rrequirements.txt

-rrequirements.txt is a short form for -r requirements.txt. So how about setlocal includeexpr=substitute(v:fname,'^-.','','g') for all shell filetype (sh/bash/zsh/etc)?


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11045@github.com>

Christian Brabandt

unread,
Sep 4, 2022, 10:19:42 AM9/4/22
to vim/vim, Subscribed

this should be discussed with the respective runtime file maintainers for (sh/bash/zsh)


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11045/1236351764@github.com>

wzy

unread,
Sep 4, 2022, 10:45:12 AM9/4/22
to vim/vim, Subscribed

Thanks. Vim filetypes have many shells: sh csh wsh zsh bash fish ps1 .... Any method to contact them all at once?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11045/1236356848@github.com>

Martin Tournoij

unread,
Sep 5, 2022, 12:14:44 PM9/5/22
to vim/vim, Subscribed

Maintainers of different shells may make different decisions, and csh, POSIX sh, bash, zsh, PowerShell, and fish are not the same shells and the syntax highlight implementations are quite different because the syntaxes are quite different.

For example for zsh, it seems to me that using the include and includeexpr for zsh modules makes much more sense than flags, so I'm not sure I'd be in favour of including that there. But bash and sh don't have this feature, so maybe it makes more sense there? Although source / . seems to make more sense than flags to me. Don't know about fish and PowerShell.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11045/1237265951@github.com>

ben.k...@gmail.com

unread,
Sep 6, 2022, 11:17:05 AM9/6/22
to vim_dev
A better idea might be to just use the "long form" with `-r requirements.txt`… then `gf` should work as expected. It is entirely possible for files to start with `/-./`, which shouldn't necessarily be removed?

wzy

unread,
Sep 7, 2022, 12:04:56 AM9/7/22
to vim/vim, Subscribed

Maintainers of different shells may make different decisions

I see. Maybe let them do these decision by themselves is the best method.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11045/1238881961@github.com>

wzy

unread,
Sep 7, 2022, 12:04:56 AM9/7/22
to vim/vim, Subscribed

Closed #11045 as completed.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/11045/issue_event/7335238711@github.com>

Reply all
Reply to author
Forward
0 new messages