search

Home  >  Q&A  >  body text

Have a problem with vim settings?

nmap <c-s> :w<CR>

In the vimrc file, I added the code shown above, but pressing ctrl+s had no effect when I used vim later. May I ask why?

PHPzPHPz2853 days ago716

reply all(4)I'll reply

  • 迷茫

    迷茫2017-05-16 16:39:18

    The problem has been solved, you need to add the following two lines to the ~/.bashrc file

    bind -r '\C-s'
    stty -ixon

    reply
    0
  • 我想大声告诉你

    我想大声告诉你2017-05-16 16:39:18

    ? ? ? ctrl+s? ?
    What do you want to do, save?
    Save in vim is: w, exit is: q
    The effect is better when combined with the two

    reply
    0
  • 仅有的幸福

    仅有的幸福2017-05-16 16:39:18

    x is to save and exit

    reply
    0
  • 迷茫

    迷茫2017-05-16 16:39:18

    Save and exit isn’t it ZZ?

    reply
    0
  • Cancelreply