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

feature request: make current selection available to shell scripts #592

Closed
herrsimon opened this issue Jan 6, 2020 · 3 comments
Closed
Assignees

Comments

@herrsimon
Copy link

It would be useful to make the current selection (if any) available to shell scripts, for example via $VIMB_SELECTION.

@fanglingsu
Copy link
Owner

@herrsimon That sound interesting! I think we could grab the selection content if a :sh command is started and set it as environment variable.

@fanglingsu fanglingsu self-assigned this Jan 9, 2020
fanglingsu added a commit that referenced this issue Jan 9, 2020
Give current selected text as environment variable $VIMB_SELECTION to
scripts called by `:shellcmd`.
@fanglingsu
Copy link
Owner

@herrsimon I've added setting of the $VIMB_SELECTION env var if :shellcmd is called. Please close this issue if this work for you.

@herrsimon
Copy link
Author

works like a charm, thanks for the super quick implementation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants