Alacritty - flow control (turn off)

I use ctrl+s & ctrl+q to save and quit in vim (muscle memory!!).

Cannot get it to work, same configs as used in Manjaro.

Tried stty -ixon and stty -ixoff but baffled, can’t get it to work. Any ideas?

I don’t use vim, but I found this and maybe it can help:

Press the Escape key. The cursor will go to the bottom (the command area)
Press the key sequence: q
Or you can also press: q! to exit the editor without saving changes
Press the Enter key

First we press Esc to place ourselves in the lower buffer in normal mode, and:

: q → exits the file, if we have no changes without saving it just exits.
: q! → exits the file discarding unsaved changes.
: w → saves changes to the file, but does not exit Vim to continue editing the file.
: wq → save changes and exit Vim.
: x → same as the previous one.

Maybe I am misunderstanding something, or maybe @xircon wasn’t clear in his post, but I think the issue is that he has set in his .vimrc to use Ctrl+S to save and Ctrl+Q to quit, but these keyboard shortcuts are in conflict with Alacritty terminal emulator which uses them for pausing and resuming flow.

I’ve never used Alacritty so I don’t know how to configure it.

2 Likes

What @Kresimir said, I use ctrl+s to save (or course :w works) and ctrl+q (ditto :q). See:

This worked fine on Manjaro (I am the guy that says bububut…) :rofl:

" Ctrl+S to save:
:nmap <c-s> :w<CR>
:nmap <c-q> <Esc>:qa<CR>
:imap <c-q> <Esc>:qa<CR>
:nmap <c-f> /                        <---------- Works!!!!!!

:imap <c-s> <Esc>:w<CR>a

What actually happens is ctrl+s freezes, ctrl+q reverts = flow control

Have you tried the other way around?
I mean to change / get rid of Alacritty flow control shortcuts somewhere in it’s settings (maybe you don’t even use this functionality like me) :upside_down_face:

I’d start by looking at Alacritty config file on Manjaro, since that’s not a problem there.

I haven’t yet felt the need to use flow control in a terminal emulator.

Yes, set stty -ixon, which should turn it off, it doesn’t.

If I use Konsole and turn off in settings it works. Alacritty is just a plain yaml and copied straight from Manjaro where it worked - there should be no differences.

2 Likes

There must be some reason why Alacritty is ignoring that config file. Is is the same version of Alacritty?

According to Arch wiki:

Alacritty searches for a configuration file at the following places in this order:

  • $XDG_CONFIG_HOME/alacritty/alacritty.yml
  • $XDG_CONFIG_HOME/alacritty.yml
  • $HOME/.config/alacritty/alacritty.yml
  • $HOME/.alacritty.yml

Copy the example configuration file at /usr/share/doc/alacritty/example/alacritty.yml to one of those places and uncomment the settings you want to change. Most settings take effect as soon as you save the file.

Perhaps one config file is overriding another one. :thinking:

There’s that also, seems there are problems with remapping recently

Nope it is definitely readiing ~/.config/alacritty, because if I change the transparency in that file, it changes it real time in alacritty.

I have been using alacritty for years as well (at least 5!!!).

This works!!!

tmux new-session -s test "stty -ixon; vim"

Going to try to set it in an env.sh file, BRB.

1 Like

The solution:

# .zprofile
stty -ixon

Read before .zshrc and works. Thats 3-4 hours of my life I wont get back :rofl:

1 Like

btw, sine you’re long time user - can you share some benefits of using Alacritty? :slight_smile:

Quick, light and I can change to transparency on the fly with two scripts wot I wrote. Just got used to it when using bspwm, other terminals are just as good.

1 Like