Well, :echo "\x07" (with the double quotes) will issue a beep on most
terminals; but I wouldn't say that it's a commonplace thing to do.
When you do
:verbose au VimLeave
does it mention anything? Those autocommands would be run as the last
thing before exiting Vim.
Best regards,
Tony.
--
The only really good place to buy lumber is at a store where the lumber
has already been cut and attached together in the form of furniture,
finished, and put inside boxes.
-- Dave Barry, "The Taming of the Screw"
Hm, what are the answers to each of the following in Vim running in
gnome-terminal?
:verbose set enc? tenc? term? t_ts? title? titlestring?
:lang cty
:echo has('title')
:echo has('X11')
:echo has('xterm_save')
Does anything change if (assuming bash shell) you do
unset LC_ALL LC_CTYPE
export LANG=uk_UA.utf-8
either before starting gnome-terminal (but in the same shell or a parent
shell), or before starting Vim? You may want to check that
'fileencodings' (plural) is appropriately set, maybe something like
set fencs=ucs-bom,utf-8,koi8-u
or similar. (If you use more than one 8-bit encodings for the files you
edit, let's say koi8-u and Windows-1251, Vim won't be able to recognize
which is which when reading the file — anything after the first 8-bit
charset in 'fileencodings' would be ignored: see ":help ++opt" about how
to open files in whatever charset is not your default.)
>
> How shall we fix this?
I don't know (unless the above helps you); but maybe Bram (or someone)
might have an idea. As a temporary workaround, maybe either
:set notitle
or
:set title titlestring=Термінал
but the latter may fail if 'encoding' is different from the charset
defined by the $LC_CTYPE set by your OS.
Best regards,
Tony.
--
Niklaus Wirth has lamented that, whereas Europeans pronounce his name
correctly (Ni-klows Virt), Americans invariably mangle it into
(Nick-les Worth). Which is to say that Europeans call him by name, but
Americans call him by value.
This sounds very similar to a bug that was reported in Debian[0].
I just had a chance to look through the patch and it looks like the
right fix to me. See if it fixes your problem.
[0]: http://bugs.debian.org/558153
--
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <jame...@jamessan.com>
> On Sat, Jul 24, 2010 at 02:36:50AM -0700, Anatoli Sakhnik wrote:
> > Now I know what happens, and this is a bug either of vim or of gnome-
> > terminal. I traced the code from :quit, and noticed the following
> > calls: mch_exit() -> mch_restore_title() -> mch_settitle(). Beeps are
> > produced by the strings oldtitle and oldicon, which are filled with
> > garbage. So the real evil happens in function get_x11_thing, which
> > can't deal with my LOCALIZED gnome-terminal. I use Ukrainian language
> > in the GUI, so the title is Ukrainian "Термінал".
> >
> > How shall we fix this?
>
> This sounds very similar to a bug that was reported in Debian[0].
> I just had a chance to look through the patch and it looks like the
> right fix to me. See if it fixes your problem.
>
> [0]: http://bugs.debian.org/558153
For me it was not sufficient. I also had to use the other function for
XA_STRING. I added a check for 'encoding' to be a multi-byte encoding,
hopefully that covers all normal use cases.
I also had a problem with ":set titlestring=foo", but that turned out to
be an xterm setting (by default it expects latin1, even when everything
else is utf-8). Setting the utf8Title property fixed that.
--
Living on Earth includes an annual free trip around the Sun.
/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
> On Sat, Jul 24, 2010 at 02:36:50AM -0700, Anatoli Sakhnik wrote:
> > Now I know what happens, and this is a bug either of vim or of gnome-
> > terminal. I traced the code from :quit, and noticed the following
> > calls: mch_exit() -> mch_restore_title() -> mch_settitle(). Beeps are
> > produced by the strings oldtitle and oldicon, which are filled with
> > garbage. So the real evil happens in function get_x11_thing, which
> > can't deal with my LOCALIZED gnome-terminal. I use Ukrainian language
> > in the GUI, so the title is Ukrainian "Термінал".
> >
> > How shall we fix this?
>
> This sounds very similar to a bug that was reported in Debian[0].
> I just had a chance to look through the patch and it looks like the
> right fix to me. See if it fixes your problem.
>
> [0]: http://bugs.debian.org/558153
I'll check it out.
--
If you only have a hammer, you tend to see every problem as a nail.
If you only have MS-Windows, you tend to solve every problem by rebooting.