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

rc.mappings.lua: document briefly how to get major and minor mode #3118

Closed
matu3ba opened this issue Sep 15, 2022 · 1 comment
Closed

rc.mappings.lua: document briefly how to get major and minor mode #3118

matu3ba opened this issue Sep 15, 2022 · 1 comment

Comments

@matu3ba
Copy link

matu3ba commented Sep 15, 2022

For lua scripting purposes, a user (eg. you) might want to distinguish visual mode in terminal from regular visual mode.
Or define autocommands with it.

This can be done with

vim.api.nvim_get_mode().mode

See also nanotee/nvim-lua-guide#116

@yutkat
Copy link
Owner

yutkat commented Sep 15, 2022

Thanks for the info.

@yutkat yutkat closed this as completed Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants