Questions tagged [vi-mode]
Theses questions are about GNU Readline's vi mode providing vi-like commands inside your terminal. Use this tag for questions about configuring or operating vi mode (e.g., Bash integration, setting keybindings).
                58 questions
            
            
            
                0
            
            votes
        
        
            
                2
            
            answers
        
        
            
                87
            
            views
        
        
            
            
        remap '-' key in BASH vi normal mode to "cd .."
                    I just discovered vi mode in bash that I enable with
set -o vi
in my .bashrc.
Now I was quite excited to remap the "normal mode" equivalents to some handy functionality. First and foremost I ...
                
            
       
        
            
                0
            
            votes
        
        
            
                0
            
            answers
        
        
            
                52
            
            views
        
        
            
        vi command line edit mode - an odd observation
                    This is not a real problem, but something that I'm curious about - and maybe somebody knows the explanation. I work on several servers, mostly Ubuntu 20.04 and 22.04, plus a few Debian 11.
I always ...
                
            
       
        
            
                1
            
            vote
        
        
            
                1
            
            answer
        
        
            
                484
            
            views
        
        
            
            
        Colorful cursor to indicate vi mode in zsh, but fail to reset color
                    I am trying to have cursor color in zsh to indicate normal/insert mode, but once enter normal mode, the color of cursor don't reset to default color in insert mode.
The source are:
# color cursor
zle-...
                
            
       
        
            
                1
            
            vote
        
        
            
                1
            
            answer
        
        
            
                199
            
            views
        
        
            
            
        Anyway to bind keyboard to dash (Debian Almquist Shell)?
                    Specifically Up/Down for history navigation.
What I already know
I understand dash is a minimalistic, no bloat, (somewhat) strict POSIX shell.
I understand the philosophy behind it, and the reason ...
                
            
       
        
            
                1
            
            vote
        
        
            
                1
            
            answer
        
        
            
                35
            
            views
        
        
            
        Is it possible to make readline ignore compspec when expanding matches in VI mode?
                    I use VI mode when using bash and I sometimes find that some of the standard compspec definitions don't do what I want.  For example, java doesn't appear to know that you have been able to do java ...
                
            
       
        
            
                2
            
            votes
        
        
            
                1
            
            answer
        
        
            
                172
            
            views
        
        
            
            
            
        Zsh goes into command mode on unbound key
                    I like vi mode in Zsh, set with bindkey -v.
Pressing escape triggers command mode as it should, but it irks me that unbound keychords trigger command mode, for example, Alt+1 and F1.
Any way to stop ...
                
            
       
        
            
                2
            
            votes
        
        
            
                0
            
            answers
        
        
            
                529
            
            views
        
        
            
        How to paste selection from vi-mode to clipboard
                    I want to access the content of what I copied in the buffer with the vi-mode of the clipboard via the command ctrl + v or ctrl + shift + v in the terminal.
I copied in my .zshrc the following: (from ...
                
            
       
        
            
                6
            
            votes
        
        
            
                2
            
            answers
        
        
            
                1k
            
            views
        
        
            
            
        How to use `Alt + .` in zsh with Vim bindings
                    I am using zsh with bindkeys -v.
Alt + . does not work as expected. It seems to repeat what is currently typed in stdin, but not entered, on the next line.
This post seems to imply it does work as it ...
                
            
       
        
            
                3
            
            votes
        
        
            
                1
            
            answer
        
        
            
                535
            
            views
        
        
            
            
            
        Fish shell vi-mode is missing "repeat" command (dot/period/. key in Zsh)
                    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 ...
                
            
       
        
            
                3
            
            votes
        
        
            
                1
            
            answer
        
        
            
                776
            
            views
        
        
            
        How to have gdb start in vi mode by default?
                    I know that I can use CTRL+ALT+J in gdb to get vim keybindings but how do I get gdb to start in vi mode by default ?
                
            
       
        
            
                0
            
            votes
        
        
            
                1
            
            answer
        
        
            
                183
            
            views
        
        
            
            
            
        assign letters to jump forward and backward in bash
                    My default shell is tcsh.   In my .cshrc file. I have bindkey -v, so that at the command line,  the letters b and w jump backwards and forwards a word, respectively.  I'd like to set up bash so that ...
                
            
       
        
            
                3
            
            votes
        
        
            
                1
            
            answer
        
        
            
                374
            
            views
        
        
            
            
            
        Make one normal mode command while in insert mode in zsh's vi mode
                    Zsh vi mode doesn't have ctrl-o behavior set by default how do I get to work like in vim ?
                
            
       
        
            
                1
            
            vote
        
        
            
                0
            
            answers
        
        
            
                559
            
            views
        
        
            
        Seeking alternative to KeyNav(drive mouse with keyboard, for X)
                    as described in the title, I am seeking user-friendly alternatives to KeyNav.
I am a fan of CLI&TUI applications and stay on the terminal emulator most of the time,
where I can use the keyboard to ...
                
            
       
        
            
                0
            
            votes
        
        
            
                0
            
            answers
        
        
            
                668
            
            views
        
        
            
            
        Using vim keybindings in bash, is there a way to start in Normal mode?
                    I just started using the vim key bindings in my bash terminal because I was constantly switching between the two and I just want to stick with one editing mode. Hence, I added the line bash set -o vi ...
                
            
       
        
            
                7
            
            votes
        
        
            
                2
            
            answers
        
        
            
                325
            
            views
        
        
            
            
            
        Insert the last argument in bash in vi mode without inserting a leading space
                    Using bash in the default (emacs) mode I get the following behavior when I hit Esc, ..
$ echo hello
hello
$ hello  # I hit `<ESC>.` to insert this
Note there is no space before the word hello ...
                
            
       
         
         
         
         
         
        