Tuesday, March 5, 2024

Re: I had to replace gvim with neovim

On 2024-03-05, Steve Litt wrote:
> Rory Campbell-Lange said on Mon, 4 Mar 2024 20:21:38 +0000
>
> >On 28/02/24, Steve Litt wrote:
> >> Gary Johnson said on Wed, 28 Feb 2024 06:45:04 -0800
> >>
> >> >On 2024-02-28, Steve Litt wrote:
> >> >> The gvim program became too much of a hassle because it printed
> >> >> all sorts of GTk errors and warnings to the terminal
> >
> >> > Try starting gvim this way and see if the warnings go away.
> >> >
> >> > $ gvim 2> /dev/null
> >>
> >> Thanks Gary, I should have thought of that. I followed your advice
> >> and renamed /usr/bin/gvim to gvim.warnings, and then made a
> >> shellscript called gvim to call it, piping stderr to /dev/null.
> >
> >Have you considered using console vim (eg vim-nox on Debian)? One is
> >unlikely to get any GTk errors with that.
>
> Thanks Rory,
>
> I got gvim working correctly by piping stderr to /dev/null, but your
> idea has merit. As long as the terminal I use is white background and
> black text, Vim works quite well on it. I could make a shellscript to
> spawn a terminal, make its parent PID1, and run Vim on it. It must be
> a terminal with good copy and paste abilities. As soon as possible I
> will try this. Thank you for the very good idea.

I don't have the details on the vim-nox package, but the name
suggests that is has no support for X as well as no GUI. Suit
yourself, but you could be without support for copy and paste to and
from the X clipboard, except via the terminal itself. I don't know
how support for the mouse might be affected.

Fedora has or had a package (vimx or xvim) that provided a terminal
vim with X11 and xterm_clipboard support. I don't see anything like
that for Ubuntu, though.

You could also build vim yourself, configured just the way you want
it. It's pretty simple.

It seems a shame to give up X11 support just because GTK is
misbehaving.

Launching vim in a new terminal should be as easy as

$ xterm -e vim &

or as a function:

function tvim {
xterm -e vim "$@" &
}

or as a shell script:

#!/bin/sh
exec xterm -e vim "$@" &

Regards,
Gary

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20240305092054.GA2578%40phoenix.

No comments: