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

Find commands #5275

Open
donaldcallen opened this issue Jan 16, 2025 · 4 comments
Open

Find commands #5275

donaldcallen opened this issue Jan 16, 2025 · 4 comments

Comments

@donaldcallen
Copy link

I am a very experienced vi and vim user. In the last year or two, I've gotten interested in Kakoune and have used it a fair amount. I've also read the arguments in favor of select first, operate second. I want to mention something here that I have not seen discussed.

In vim, I use the find (f and t) commands for two purposes:

  1. I want to perform an operation on everything between where the cursor is currently and the character to be found, e.g., 'dt,'.
  2. I simply want to navigate to the found character and once there, do a local operation, e.g., an insert or a replace.

To do 2. in Kakoune, I need to be very careful. If, for example, after a find I press 'i' with the intention of inserting at the target character, the insertion takes place where I came from, not where I'm at. I have to remember to collapse the selection that I didn't want in this case. So it's more mental effort and an extra keystroke than the same situation in vim.

In vim, I can run the find command by itself, not preceded by an operator, which gets me to my target character, where I can do whatever operation I want at that site. If I want 1. above, then I can precede the find with an operator. I have not found a way to separate these two cases easily in Kakoune. It would help if there were non-selecting versions of the find commands. I haven't figured out a way to achieve that myself.

@krobelus
Copy link
Contributor

krobelus commented Jan 16, 2025 via email

@donaldcallen
Copy link
Author

Thanks -- that works.

@donaldcallen
Copy link
Author

Though there is an issue. After using the non-selecting find, alt-. repeats the selecting find.

@krobelus
Copy link
Contributor

krobelus commented Jan 16, 2025 via email

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