0

I wanted to remap <C-s> to save a file. It works fine in normal mode. But when I'm in Insert Mode and I press Ctrl+S, it just send the character ^S (as a single character).

I'm using Windows 10 and Powershell to open NeoVim. Is there a way that I can map Ctrl+S to save the file in my current situation? Also should I stick to Powershell or should I switch to another terminal?

romainl
  • 186,200
  • 21
  • 280
  • 313

1 Answers1

1

I would try remapping it to something like

  • leave insert mode
  • save
  • return to insert mode, after the cursor
inoremap <C-s> <Esc>:w<cr>a
Igbanam
  • 5,904
  • 5
  • 44
  • 68