hauleth / hauleth/asyncdo.vim

Cannot use '%' or '#' in cmd arguments

Open
#17 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Vim Script
Stars
28
Forks
8
PR merge metrics
No merged PRs in 30d

Description

Commit b62de9d introduced the nice feature of having % and # automatically expanded. Unfortunately, it makes it impossible to e.g. `:Grep asyncdo#run` (grep for "asyncdo#run" using the `:Grep` command suggested in the docs).

I'm not exactly sure what the best way to handle this situation is, but I feel like % and # substitutions should be more explicit. What about some markers that represent explicit expansion? e.g.:

```vim
" From autoload/asyncdo.vim, expands to:
" :AsyncDo grep asyncdo#run autoload/*
:AsyncDo grep asyncdo#run {{%:h}}/*
```

This makes the expand substitution simpler (just look for `{{...}}`), and more powerful as it doesn't need to specify which things get expanded (currently `%` and `#` with `phrte` filename-modifiers, but not other filename-modifiers or expandable settings).

I can make a PR if this sounds like a sensible approach?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.