Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow mapping feedkeys :exec … to take count into account #712

Open
1 task done
user202729 opened this issue Jan 11, 2025 · 0 comments
Open
1 task done

Allow mapping feedkeys :exec … to take count into account #712

user202729 opened this issue Jan 11, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@user202729
Copy link
Contributor

user202729 commented Jan 11, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Problem

Currently I have a mapping of the following form

map <C-v> feedkeys ":exec xterm -e /home/user202729/useful-sh/zathura-open-in-vim         $PAGE $FILE<Return>"

Ideally I want to write

map <C-v> feedkeys ":exec xterm -e /home/user202729/useful-sh/zathura-open-in-vim         $PAGE $FILE $COUNT<Return>"

so that e.g. 5<C-v> would type :exec xterm ... $PAGE $FILE 5<Return>. It would also be good to have a special place holder for empty.

Expected behavior

For reference: the vim behavior is to map 3: to :.,.+2 (which in vim's context only makes sense as "from current line to 2 lines next"). Alternatively we can implement something similar to vim's v:count.

A potential disadvantage is then existing code that uses $COUNT will break — but I think this is negligible.

@user202729 user202729 added the enhancement New feature or request label Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant