r/neovim•
613style

Linux terminal emulator recommendation for cursor shape

Does anyone have a terminal emulator for linux that supports NVIM_TUI_ENABLE_CURSOR_SHAPE? On Windows, I found mintty supports it through a ssh connection, which is great. But on linux, from an Ubuntu desktop, I'm having a lot of trouble.

I've tried gnome-terminal, terminator, xfce4-terminal, and rxvt. I've also tried swapping my $TERM between xterm/xterm-256color/screen-256color for each, without any difference. In all cases, there's just a high ascii character displayed when I swap insert modes: "<something>5 q"

Can anyone recommend a setup that works? Thanks!

Posted Apr 24, 2015, 5:01 PM UTC

78
viccuad•

I know that xterm has cursor shape support for vim and nvim, and that urxvt does not have the '|' shape until v9.21.

If you want to go with xterm, i have my .Xresources config on my dotfiles, if you want to look at it.

Edit:

I went with xterm because of this:

https://www.reddit.com/r/linux/comments/1nmmbn/almost_every_terminal_is_slow_seriously/

TL:DR: run for i in {0..9999}; do echo -n "------$i-"; done , maximize the terminal and scroll. Gnome-terminal hungs up for me. Urxvt and xterm didn't hang up, and xterm has caret support.

With one of the sane terminals listed there, Vim will scroll and act more snappier.

3
critiqjo•

What is caret support?

Xterm doesn't reflow text when resized... Urxvt doesn't have any font rendering issues (the post is more than one year old), is as fast (if not faster), and reflows text when the window is resized (no lags). It also supports changing cursor shape and is a lot more configurable (+plugins) than Xterm AFAIK...

The only disadvantage I know of Urxvt is that you have to emulate Xterm keycodes for key-combinations involving extended keys (e.g. Meta-PageUp, Meta-F4 etc.) for (n)vim to correctly identify them (see Xdefaults).

2
viccuad•

I have always heard caret as interchangeable with cursor, when talking about terminals and so(eg). But yeah, maybe not the best use of that word.

When I looked into it, urxvt had no '|' cursor support, but now, from v9.21, it should have. Maybe I should move myself to urxvt.

edit: also, xterm has true colour support (useful for neovim), urxvt is listed as not having it

1
critiqjo•

True! You can't use all 24-bit colors at once... But you can map any 24-bit color to any of those 256 colors... I'm using a palette called euphrasia, and was satisfied with it...

1
613styleOP•

Thank you! I don't know why I didn't just try xterm. I think I associated it with being archaic, but with the right ~/.Xdefaults it looks good and supports neovim very well.

1
jessesherlock•

I'm currently using st and it works there.

That's a very minimal terminal emulator, it might not be for everyone. I was using rxvt-unicode previously and cursor shape worked there as well.

2
613styleOP•

Thanks, I'll give st a shot. It looks like a cool project and I've never seen it before.

1
gaijin_101•

It works with termite too.

2