I recently moved from Zsh to Fish, and I'm having a problem with vi-mode in Fish. There doesn't seem to be a "repeat" keybinding, like in Zsh's vi-mode (bound to the "dot" .). I think this is one of the most useful commands in vi-mode since it can prevent you from repeating commands.

Is there a way to add this command to vi-mode in the Fish shell. Any idea how am I supposed to do this? Thanks.

  • 1
    Welcome to the Unix & Linux Stack. I'm assuming you mean the Zsh vi-repeat-change keybinding, which is bound to . by default? Could you provide some examples of how you used it? Be as specific as possible - Provide an example command-line, the change you made (with keystrokes) and then how you used . to repeat that change? We might be able to come up with some alternatives for that workflow in Fish. Thanks! Sep 23, 2021 at 21:38
  • the "dot command" that i mentioned is actually a native built-in command in vi or vim, but in this case, when I am in vi mode, I am not able to use that command, but back when I used it in zsh it worked. The use case that could happened for this command: - after dd or dw commnad, the dot command will delete another line/word Sep 24, 2021 at 8:59
  • I'm familiar with the "repeat" . command, and that's the vi-repeat-change binding in Zsh. Been using it for (literally) decades in vi itself. But I'm struggling to think when I'd use it on the command-line in a shell. dd doesn't seem to apply, since there's only one line in the shell (so what would you be repeating?). And I've never had the need to edit a command-line where I've done a dw and then needed to repeat the operation in a separate location. And that would just be a one-character savings in typing anyway. Sep 24, 2021 at 18:04
  • 1
    And in case it helps, remember you can always move the command-line to "real" vim with Alt+e or Alt+V, assuming that VISUAL=vim. Sep 24, 2021 at 18:20
  • 1
    @NotTheDr01ds One thing I frequently run into is wanting to repeat a command like dtd where I'm trying to clear some segment of a previous line. There is no dtd.. and no d3td, no search with /, so the easiest way is often dtddtddtd
    – spro
    Nov 2, 2021 at 2:54

1 Answer 1


It appears the vi-redo command is not implemented (yet?). There's an open issue here: https://github.com/fish-shell/fish-shell/issues/8319

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.