-
Notifications
You must be signed in to change notification settings - Fork 35
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
FR: Start in visual mode #174
Comments
#163 was actually mostly unrelated. It was about removing I'm fine with a refactor that replaces the This is already configurable on a case-by-case basis, see |
I only meant it was similar idealogically in that people want to be able to perform normal mode operations. Sorry, I should have been more clear. Sounds good. I will look into it. Do you care about backwards compatibility to Thanks for |
Let's make sure it's backwards compatible, but I'm not yet convinced it should be the default. We should add it first, wait to see how it goes, and later we can evaluate changing the defaults. |
This is fixed in #175 |
The way I understand #163 is that people want to perform normal mode operations on the input. I would like to propose that in this case it's better to start in visual mode (a visual selection over the initial value).
Let's take
vim.lsp.buf.rename
as an example:ciw
ciw
c
Uiw
Uiw
U
I
i
I
A
A
crs
crs
crs
Starting in insert only wins for "Append to name".
The only case I considered where starting in visual is worse is using vim-abolish coersion. Even then, you only have to press esc one time.
I propose to add a configuration option like:
This should obviously only apply if the input has some initial value, like
vim.lsp.buf.rename
. I guess this would mean that it's valid to set bothstart_in_insert
andstart_in_visual
to both be true: If there is an initial value, start in visual. Otherwise, start in insert.It would be cool to make this more configurable on a case by case basis. There is already
override
, but that's only forwinopt
. It would be cool to have a function that takes as inputs for example{ action = "vim.lsp.buf.rename", initial_value = "old_name" }
and you can returnstart_in_insert
,start_in_visual
(or anything else in the config). I'm not sure exactly how to encode it, but you get the idea.I'd argue that the default should be insert mode if there is no initial value, and visual if there is an initial value.
If you think it's a good idea, I'm happy to try to make a PR.
The text was updated successfully, but these errors were encountered: