Skip to content

Find commands #5275

Open
Open
@donaldcallen

Description

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions