macOS ◆ xterm-256color ◆ fish 56 views

Rather than using something like fugitive, I like to CTRL-Z out of vim to commit from the command line.

But then I often forget whether I suspended vim or quit it altogether, leading to an awkward dance when I guess wrong, hitting either fg: There are no suitable jobs when I hadn’t suspended or Swap file ... already exists!when I open a file a backgrounded vim already had open.

This seems like a good job for a prompt!

Bash and Zsh both offer PS1 interpolations for the number of jobs the shell is controlling, but I don’t find anything like that for Fish – and ideally, for my common case, I’d like to see the name of some backgrounded job anyway.

More by matthewtodd

Trying out TCR 00:24

by matthewtodd

See all