Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Space is to place as eternity is to time. -- Joseph Joubert


computers / comp.editors / Re: Vim remap and langmap

SubjectAuthor
* Re: Vim remap and langmapAnton Shepelev
`* Re: Vim remap and langmapSpiros Bousbouras
 `* Re: Vim remap and langmapAnton Shepelev
  `* Re: Vim remap and langmapSpiros Bousbouras
   `* Re: Vim remap and langmapAnton Shepelev
    `* Re: Vim remap and langmapSpiros Bousbouras
     `* Re: Vim remap and langmapAnton Shepelev
      `* Re: Vim remap and langmapSpiros Bousbouras
       `* Re: Vim remap and langmapAnton Shepelev
        `* Re: Vim remap and langmapDrunkenThon
         `- Re: Vim remap and langmapAnton Shepelev

1
Re: Vim remap and langmap

<20230909162330.26a99ff3d18f9b57f3237a9f@gmail.moc>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=54&group=comp.editors#54

  copy link   Newsgroups: comp.misc comp.editors
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton.txt@gmail.moc (Anton Shepelev)
Newsgroups: comp.misc,comp.editors
Subject: Re: Vim remap and langmap
Date: Sat, 9 Sep 2023 16:23:30 +0300
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <20230909162330.26a99ff3d18f9b57f3237a9f@gmail.moc>
References: <20230909140326.c6db640ebbbbd85bdfb21a2c@gmail.moc>
<udhkjc$1cao$6@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="e2401a843d738dcce6359c697c7d4b64";
logging-data="99574"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+gt7FN9l5Hfi1YSl72w7xOsqPM6H5cf5w="
Cancel-Lock: sha1:wfhuL3JtHWldN+Y8LNRCrKNwX2k=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
 by: Anton Shepelev - Sat, 9 Sep 2023 13:23 UTC

Marco Moock to Anton Shepelev:

> > The following question having received no answers in the
> > Vim mailing lists (too stupid?), I ask it here:
>
> I recommend comp.editors.

Let us see what we shall see there:

I have made the following experiment in Vim:

:nnoremap b w
:set nolangremap
:set langmap=qb

Now, when successively pressing `q' in normal mode I get a
very strange behavior, alternating between word-forward and
word-backward motions. Can someone please explain what it going
on?

P.S.: I was shocked to learn that Bram Moolenaar had died, the
author and maintaier of Vim. Rest it peace, Bram.
--
() ascii ribbon campaign -- against html e-mail
/\ www.asciiribbon.org -- against proprietary attachments

Re: Vim remap and langmap

<W47fBYONKiXpzgmtK@bongo-ra.co>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=55&group=comp.editors#55

  copy link   Newsgroups: comp.editors
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: spibou@gmail.com (Spiros Bousbouras)
Newsgroups: comp.editors
Subject: Re: Vim remap and langmap
Date: Sat, 9 Sep 2023 16:10:02 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <W47fBYONKiXpzgmtK@bongo-ra.co>
References: <20230909140326.c6db640ebbbbd85bdfb21a2c@gmail.moc> <udhkjc$1cao$6@dont-email.me> <20230909162330.26a99ff3d18f9b57f3237a9f@gmail.moc>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 9 Sep 2023 16:10:02 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7f8b920deab604f518a01827926a0c5d";
logging-data="160125"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Tkd912MJCQAYkscADdfvo"
Cancel-Lock: sha1:LePmB55QOCkIFjcV4Aqszv1/DzA=
X-Server-Commands: nowebcancel
In-Reply-To: <20230909162330.26a99ff3d18f9b57f3237a9f@gmail.moc>
X-Organisation: Weyland-Yutani
 by: Spiros Bousbouras - Sat, 9 Sep 2023 16:10 UTC

On Sat, 9 Sep 2023 16:23:30 +0300
Anton Shepelev <anton.txt@gmail.moc> wrote:
> Spiros { Just as a matter of interest ; he learned of Moolenaar's death
> even later than when I did (A5 24-8-2023) .It's also interesting that he
> didn't know of comp.editors . }
>
> Marco Moock to Anton Shepelev:
>
> > > The following question having received no answers in the
> > > Vim mailing lists (too stupid?), I ask it here:
> >
> > I recommend comp.editors.
>
> Let us see what we shall see there:
>
> I have made the following experiment in Vim:
>
> :nnoremap b w
> :set nolangremap
> :set langmap=qb
>
> Now, when successively pressing `q' in normal mode I get a
> very strange behavior, alternating between word-forward and
> word-backward motions. Can someone please explain what it going
> on?

I don't know what's going on. I'm sure your question isn't stupid.
If you do
:nnoremap b w
:set langmap=qb

does it work as expected ?

Re: Vim remap and langmap

<20230909210959.edc13acfa3ae936ac6cbfbac@gmail.moc>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=56&group=comp.editors#56

  copy link   Newsgroups: comp.editors
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton.txt@gmail.moc (Anton Shepelev)
Newsgroups: comp.editors
Subject: Re: Vim remap and langmap
Date: Sat, 9 Sep 2023 21:09:59 +0300
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <20230909210959.edc13acfa3ae936ac6cbfbac@gmail.moc>
References: <20230909140326.c6db640ebbbbd85bdfb21a2c@gmail.moc>
<udhkjc$1cao$6@dont-email.me>
<20230909162330.26a99ff3d18f9b57f3237a9f@gmail.moc>
<W47fBYONKiXpzgmtK@bongo-ra.co>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="e2401a843d738dcce6359c697c7d4b64";
logging-data="190120"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19HD+X33+/+n6QBgpjlUkFp15v4yMJFrHk="
Cancel-Lock: sha1:PqlC2x1ujQR8ManiYhAS1tLV3T8=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
 by: Anton Shepelev - Sat, 9 Sep 2023 18:09 UTC

Spiros Bousbouras to Anton Shepelev:

> > I have made the following experiment in Vim:
> >
> > :nnoremap b w
> > :set nolangremap
> > :set langmap=qb
> >
> > Now, when successively pressing `q' in normal mode I get
> > a very strange behavior, alternating between word-
> > forward and word-backward motions. Can someone please
> > explain what it going on?
>
> I don't know what's going on. I'm sure your question isn't
> stupid. If you do
>
> :nnoremap b w
> :set langmap=qb
>
> does it work as expected ?

Strange as it may seem, yes. If I then :set nolangremap, the
oscillating behavior returns. And I need that `nolangremap'
in my real case, to keep my mappings working regardless of
keyboard layout. I am trying to cofigure Vim for biligual
input.

P.S.: You silently dropped comp.misc, so I missed you
followup there. Was it intentional?
--
() ascii ribbon campaign -- against html e-mail
/\ www.asciiribbon.org -- against proprietary attachments

Re: Vim remap and langmap

<XspWbC4+Xf5Rh8ar0@bongo-ra.co>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=57&group=comp.editors#57

  copy link   Newsgroups: comp.editors
Path: i2pn2.org!i2pn.org!paganini.bofh.team!not-for-mail
From: spibou@gmail.com (Spiros Bousbouras)
Newsgroups: comp.editors
Subject: Re: Vim remap and langmap
Date: Sat, 9 Sep 2023 18:58:47 -0000 (UTC)
Organization: To protect and to server
Message-ID: <XspWbC4+Xf5Rh8ar0@bongo-ra.co>
References: <20230909140326.c6db640ebbbbd85bdfb21a2c@gmail.moc> <udhkjc$1cao$6@dont-email.me> <20230909162330.26a99ff3d18f9b57f3237a9f@gmail.moc>
<W47fBYONKiXpzgmtK@bongo-ra.co> <20230909210959.edc13acfa3ae936ac6cbfbac@gmail.moc>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 9 Sep 2023 18:58:47 -0000 (UTC)
Injection-Info: paganini.bofh.team; logging-data="2178607"; posting-host="9H7U5kayiTdk7VIdYU44Rw.user.paganini.bofh.team"; mail-complaints-to="usenet@bofh.team"; posting-account="9dIQLXBM7WM9KzA+yjdR4A";
Cancel-Lock: sha256:SpjSwf1XwwoqlTZiLg4SeV8LxaIrnAxFiZVsl3qPhC8=
X-Server-Commands: nowebcancel
X-Organisation: Weyland-Yutani
X-Notice: Filtered by postfilter v. 0.9.3
 by: Spiros Bousbouras - Sat, 9 Sep 2023 18:58 UTC

On Sat, 9 Sep 2023 21:09:59 +0300
Anton Shepelev <anton.txt@gmail.moc> wrote:
> Spiros Bousbouras to Anton Shepelev:
>
> > > I have made the following experiment in Vim:
> > >
> > > :nnoremap b w
> > > :set nolangremap
> > > :set langmap=qb
> > >
> > > Now, when successively pressing `q' in normal mode I get
> > > a very strange behavior, alternating between word-
> > > forward and word-backward motions. Can someone please
> > > explain what it going on?
> >
> > I don't know what's going on. I'm sure your question isn't
> > stupid. If you do
> >
> > :nnoremap b w
> > :set langmap=qb
> >
> > does it work as expected ?
>
> Strange as it may seem, yes. If I then :set nolangremap, the
> oscillating behavior returns. And I need that `nolangremap'
> in my real case, to keep my mappings working regardless of
> keyboard layout. I am trying to cofigure Vim for biligual
> input.

Are you sure you need langmap ? Because I've never set langmap
(in fact , I didn't even know it existed until I read your post)
and I can switch vim between English and Greek input and it doesn't
affect the behaviour in normal mode.

Anyway , my best guess is a bug. Try the order

:set nolangremap
:nnoremap b w
:set langmap=qb

and see if that makes a difference.

> P.S.: You silently dropped comp.misc, so I missed you
> followup there. Was it intentional?

Yes. Since you had been informed which was the correct newgroup ,
I figured you'd check it.

--
The result is the same though: Calculus of the Central Nervous System is far
& away the most deeply unrewarding listening experience i have had for a very
long time. One of the quotations in the score states, "truth is austere"; it
certainly is, & the austere truth about this piece is that it's an absolute
stinker.
http://5against4.com/2012/08/27/proms-2012-emily-howard-calculus-of-the-central-nervous-system-uk-premiere

Re: Vim remap and langmap

<20230909221631.072a9f206e0f74b25c5b13ea@gmail.moc>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=58&group=comp.editors#58

  copy link   Newsgroups: comp.editors
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton.txt@gmail.moc (Anton Shepelev)
Newsgroups: comp.editors
Subject: Re: Vim remap and langmap
Date: Sat, 9 Sep 2023 22:16:31 +0300
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <20230909221631.072a9f206e0f74b25c5b13ea@gmail.moc>
References: <20230909140326.c6db640ebbbbd85bdfb21a2c@gmail.moc>
<udhkjc$1cao$6@dont-email.me>
<20230909162330.26a99ff3d18f9b57f3237a9f@gmail.moc>
<W47fBYONKiXpzgmtK@bongo-ra.co>
<20230909210959.edc13acfa3ae936ac6cbfbac@gmail.moc>
<XspWbC4+Xf5Rh8ar0@bongo-ra.co>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="e2401a843d738dcce6359c697c7d4b64";
logging-data="201552"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1//k8Ob9pCv9nxlVEPqphGHzfldAaGg93o="
Cancel-Lock: sha1:Gr7Nw1/jjOo2jIEwt4RewW+MdwY=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
 by: Anton Shepelev - Sat, 9 Sep 2023 19:16 UTC

Spiros Bousbouras to Anton Shepelev:

> Are you sure you need langmap ? Because I've never set
> langmap (in fact , I didn't even know it existed until I
> read your post) and I can switch vim between English and
> Greek input and it doesn't affect the behaviour in normal
> mode.

I should be glad to set up bilingual input without it. How
did you configure your Vim to have a functional normal mode
while in Greek keyboard layout?

> Anyway , my best guess is a bug. Try the order
>
> :set nolangremap
> :nnoremap b w
> :set langmap=qb
>
> and see if that makes a difference.

Same thing, the order does not seem to matter.

> > P.S.: You silently dropped comp.misc, so I missed you
> > followup there. Was it intentional?
>
> Yes. Since you had been informed which was the correct
> newgroup , I figured you'd check it.

OK.

--
() ascii ribbon campaign -- against html e-mail
/\ www.asciiribbon.org -- against proprietary attachments

Re: Vim remap and langmap

<QCvzRG3Dy+6a+K4Sb@bongo-ra.co>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=59&group=comp.editors#59

  copy link   Newsgroups: comp.editors
Path: i2pn2.org!i2pn.org!paganini.bofh.team!not-for-mail
From: spibou@gmail.com (Spiros Bousbouras)
Newsgroups: comp.editors
Subject: Re: Vim remap and langmap
Date: Sat, 9 Sep 2023 19:43:21 -0000 (UTC)
Organization: To protect and to server
Message-ID: <QCvzRG3Dy+6a+K4Sb@bongo-ra.co>
References: <20230909140326.c6db640ebbbbd85bdfb21a2c@gmail.moc> <udhkjc$1cao$6@dont-email.me> <20230909162330.26a99ff3d18f9b57f3237a9f@gmail.moc>
<W47fBYONKiXpzgmtK@bongo-ra.co> <20230909210959.edc13acfa3ae936ac6cbfbac@gmail.moc> <XspWbC4+Xf5Rh8ar0@bongo-ra.co>
<20230909221631.072a9f206e0f74b25c5b13ea@gmail.moc>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 9 Sep 2023 19:43:21 -0000 (UTC)
Injection-Info: paganini.bofh.team; logging-data="2183273"; posting-host="9H7U5kayiTdk7VIdYU44Rw.user.paganini.bofh.team"; mail-complaints-to="usenet@bofh.team"; posting-account="9dIQLXBM7WM9KzA+yjdR4A";
Cancel-Lock: sha256:8W1B6zV32kgkzMG6WrPq1aPtzQRQbIEH2x9rJI10AIU=
X-Notice: Filtered by postfilter v. 0.9.3
X-Server-Commands: nowebcancel
X-Organisation: Weyland-Yutani
 by: Spiros Bousbouras - Sat, 9 Sep 2023 19:43 UTC

On Sat, 9 Sep 2023 22:16:31 +0300
Anton Shepelev <anton.txt@gmail.moc> wrote:
> Spiros Bousbouras to Anton Shepelev:
>
> > Are you sure you need langmap ? Because I've never set
> > langmap (in fact , I didn't even know it existed until I
> > read your post) and I can switch vim between English and
> > Greek input and it doesn't affect the behaviour in normal
> > mode.
>
> I should be glad to set up bilingual input without it. How
> did you configure your Vim to have a functional normal mode
> while in Greek keyboard layout?

For example

execute "lnoremap <buffer> a \Xce\Xb1"
execute "lnoremap <buffer> A \Xce\X91"

achieves upper and lower case alpha but the keys a and A still work
as normal in normal mode.

How did you decide that you need langmap ? What wasn't working correctly
without it ?

Re: Vim remap and langmap

<20230909225811.bbcb5c9303a2790e7888d771@gmail.moc>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=60&group=comp.editors#60

  copy link   Newsgroups: comp.editors
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton.txt@gmail.moc (Anton Shepelev)
Newsgroups: comp.editors
Subject: Re: Vim remap and langmap
Date: Sat, 9 Sep 2023 22:58:11 +0300
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <20230909225811.bbcb5c9303a2790e7888d771@gmail.moc>
References: <20230909140326.c6db640ebbbbd85bdfb21a2c@gmail.moc>
<udhkjc$1cao$6@dont-email.me>
<20230909162330.26a99ff3d18f9b57f3237a9f@gmail.moc>
<W47fBYONKiXpzgmtK@bongo-ra.co>
<20230909210959.edc13acfa3ae936ac6cbfbac@gmail.moc>
<XspWbC4+Xf5Rh8ar0@bongo-ra.co>
<20230909221631.072a9f206e0f74b25c5b13ea@gmail.moc>
<QCvzRG3Dy+6a+K4Sb@bongo-ra.co>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="e2401a843d738dcce6359c697c7d4b64";
logging-data="217652"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+4b31WhC8Scgqgc8Z/DKItp8mL+ACcAQs="
Cancel-Lock: sha1:BoqJ36H9n6hThux7NZZZnFjyPjk=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
 by: Anton Shepelev - Sat, 9 Sep 2023 19:58 UTC

Spiros Bousbouras to Anton Shepelev:

> > How did you configure your Vim to have a functional
> > normal mode while in Greek keyboard layout?
>
> For example
>
> execute "lnoremap <buffer> a \Xce\Xb1"
> execute "lnoremap <buffer> A \Xce\X91"
>
> achieves upper and lower case alpha but the keys a and
> A still work as normal in normal mode.

So, you manually implement a (presumably switchable) Greek
keyboard layout inside Vim using lnoremap?

> How did you decide that you need langmap? What wasn't
> working correctly without it?

Almost everything -- no normal-mode commands involving the
letters of the English alphabet work while I am in the
Russian keyboard layout (activated globally, in the OS).

--
() ascii ribbon campaign -- against html e-mail
/\ www.asciiribbon.org -- against proprietary attachments

Re: Vim remap and langmap

<ritKOUwpKuUsqLOv+@bongo-ra.co>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=61&group=comp.editors#61

  copy link   Newsgroups: comp.editors
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: spibou@gmail.com (Spiros Bousbouras)
Newsgroups: comp.editors
Subject: Re: Vim remap and langmap
Date: Sun, 10 Sep 2023 10:21:27 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 49
Message-ID: <ritKOUwpKuUsqLOv+@bongo-ra.co>
References: <20230909140326.c6db640ebbbbd85bdfb21a2c@gmail.moc> <udhkjc$1cao$6@dont-email.me> <20230909162330.26a99ff3d18f9b57f3237a9f@gmail.moc>
<W47fBYONKiXpzgmtK@bongo-ra.co> <20230909210959.edc13acfa3ae936ac6cbfbac@gmail.moc> <XspWbC4+Xf5Rh8ar0@bongo-ra.co>
<20230909221631.072a9f206e0f74b25c5b13ea@gmail.moc> <QCvzRG3Dy+6a+K4Sb@bongo-ra.co> <20230909225811.bbcb5c9303a2790e7888d771@gmail.moc>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 10 Sep 2023 10:21:27 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b1edd11d25778e5965521fd7a2d5750c";
logging-data="582769"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18DOZVwOke/envzMkjV5ZOx"
Cancel-Lock: sha1:MzaaRXH5MxMJIfL+OWzZaWV3MXA=
X-Organisation: Weyland-Yutani
In-Reply-To: <20230909225811.bbcb5c9303a2790e7888d771@gmail.moc>
X-Server-Commands: nowebcancel
 by: Spiros Bousbouras - Sun, 10 Sep 2023 10:21 UTC

On Sat, 9 Sep 2023 22:58:11 +0300
Anton Shepelev <anton.txt@gmail.moc> wrote:
> Spiros Bousbouras to Anton Shepelev:
>
> > > How did you configure your Vim to have a functional
> > > normal mode while in Greek keyboard layout?
> >
> > For example
> >
> > execute "lnoremap <buffer> a \Xce\Xb1"
> > execute "lnoremap <buffer> A \Xce\X91"
> >
> > achieves upper and lower case alpha but the keys a and
> > A still work as normal in normal mode.
>
> So, you manually implement a (presumably switchable) Greek
> keyboard layout inside Vim using lnoremap?

Yes , I have a file full of commands as above and also

setlocal encoding=utf-8
setlocal fileencoding=utf-8
setlocal iminsert=1

I'm not sure what you mean "manually" but yes , it's switchable
by pressing Ctrl-^ in insert mode ; which you could have
easily tested yourself using the example above. It's also switchable
in search mode and command mode. But in normal mode nothing changes.

> > How did you decide that you need langmap? What wasn't
> > working correctly without it?
>
> Almost everything -- no normal-mode commands involving the
> letters of the English alphabet work while I am in the
> Russian keyboard layout (activated globally, in the OS).

"OS" as in "operating system" ? Earlier you said

And I need that `nolangremap' in my real case, to keep my mappings
working regardless of keyboard layout.

..Can you give an actual example ? As in , what byte sequence will vim
receive by the operating system when pressing what key and what do you
want that to be mapped to in normal mode ?

--
I know some who hand-wrote their comments on the punch card (working
around the holes). This seemed to work quiet well for them.
Paul E. Bennett

Re: Vim remap and langmap

<20230910233359.1ab27186e95e29fa417f5b66@gmail.moc>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=62&group=comp.editors#62

  copy link   Newsgroups: comp.editors
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton.txt@gmail.moc (Anton Shepelev)
Newsgroups: comp.editors
Subject: Re: Vim remap and langmap
Date: Sun, 10 Sep 2023 23:33:59 +0300
Organization: A noiseless patient Spider
Lines: 73
Message-ID: <20230910233359.1ab27186e95e29fa417f5b66@gmail.moc>
References: <20230909140326.c6db640ebbbbd85bdfb21a2c@gmail.moc>
<udhkjc$1cao$6@dont-email.me>
<20230909162330.26a99ff3d18f9b57f3237a9f@gmail.moc>
<W47fBYONKiXpzgmtK@bongo-ra.co>
<20230909210959.edc13acfa3ae936ac6cbfbac@gmail.moc>
<XspWbC4+Xf5Rh8ar0@bongo-ra.co>
<20230909221631.072a9f206e0f74b25c5b13ea@gmail.moc>
<QCvzRG3Dy+6a+K4Sb@bongo-ra.co>
<20230909225811.bbcb5c9303a2790e7888d771@gmail.moc>
<ritKOUwpKuUsqLOv+@bongo-ra.co>
MIME-Version: 1.0
Content-Type: text/plain; charset=KOI8-R
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="b679b7dd1b639d3c9f159790492bb539";
logging-data="756349"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+N9XrZt16GEb7qumY9DOFeECe4H+Ry4k4="
Cancel-Lock: sha1:CdKxyXFuiwtl22V4ZuUx2uTky+k=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
 by: Anton Shepelev - Sun, 10 Sep 2023 20:33 UTC

Spiros Bousbouras to Anton Shepelev:

> execute "lnoremap <buffer> a \Xce\Xb1"
> execute "lnoremap <buffer> A \Xce\X91"
> [...]
> Yes, I have a file full of commands as above and also
>
> setlocal encoding=utf-8
> setlocal fileencoding=utf-8
> setlocal iminsert=1
>
> I'm not sure what you mean "manually" but yes, it's
> switchable by pressing Ctrl-^ in insert mode; hich you
> could have easily tested yourself using the example above.
> It's also switchable in search mode and command mode. But
> in normal mode nothing changes.

Now I understand what you did: you registered mappings for
the Greek keyboard and are switching it on and off with
i_CTRL-^. You have made a really low-level customisation
with Vim-specific way of switching input language. I will
have to do the same if I fail to find a simpler solution
using the OS-level input language.

> > no normal-mode commands involving the letters of the
> > English alphabet work while I am in the Russian keyboard
> > layout (activated globally, in the OS).
>
> "OS" as in "operating system" ?

Yes, Windows here. I switch between English and Russian
with Alt+Shift, and it has a global effect.

> Earlier you said
>
> And I need that `nolangremap' in my real case, to keep
> my mappings working regardless of keyboard layout.

Yes. `langremap' let me map the Russian chacters back to
English ones in normal mode to avoid swtiching keyboard
layout whenever a leave input mode while typing Russian.
According to the documentation, this is exactly what I need:

This option allows switching your keyboard into a special
language mode. When you are typing text in Insert mode
the characters are inserted directly. When in Normal
mode the 'langmap' option takes care of translating these
special characters to the original meaning of the key.
This means you don't have to change the keyboard mode to
be able to execute Normal mode commands.

> Can you give an actual example ? As in , what byte
> sequence will vim receive by the operating system when
> pressing what key and what do you want that to be mapped
> to in normal mode ?

I never dug so deep as intercepting byte sequences, alway
thinking in terms of Russian and English characters. When
the Russian input language is activated in the OS, it works
in Vim's insert mode as well (because it is global), but in
normal mode Vim naturally ignores most of the commands,
because, for example, when I press `w', Vim receives the
Russian letter `ц'. `langmap' is used to map `ц' back to
`w' in normal mode.

Looks like I shall have to emuilate langmap by lower-leverl
commands, e.g.:

:nmap ц w

--
() ascii ribbon campaign -- against html e-mail
/\ www.asciiribbon.org -- against proprietary attachments

Re: Vim remap and langmap

<udqhga$1niuh$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=65&group=comp.editors#65

  copy link   Newsgroups: comp.editors
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: drunkenthon@gmail.com (DrunkenThon)
Newsgroups: comp.editors
Subject: Re: Vim remap and langmap
Date: Tue, 12 Sep 2023 20:25:46 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <udqhga$1niuh$1@dont-email.me>
References: <20230909140326.c6db640ebbbbd85bdfb21a2c@gmail.moc> <udhkjc$1cao$6@dont-email.me> <20230909162330.26a99ff3d18f9b57f3237a9f@gmail.moc> <W47fBYONKiXpzgmtK@bongo-ra.co> <20230909210959.edc13acfa3ae936ac6cbfbac@gmail.moc> <XspWbC4+Xf5Rh8ar0@bongo-ra.co> <20230909221631.072a9f206e0f74b25c5b13ea@gmail.moc> <QCvzRG3Dy+6a+K4Sb@bongo-ra.co> <20230909225811.bbcb5c9303a2790e7888d771@gmail.moc> <ritKOUwpKuUsqLOv+@bongo-ra.co> <20230910233359.1ab27186e95e29fa417f5b66@gmail.moc>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 12 Sep 2023 20:25:46 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ff46035fdaa8f6c923cfe49cec93b949";
logging-data="1821649"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/FpT+vN7/kODrZUd7/tKytuiXIKSZ6O1A="
User-Agent: tin/2.6.1-20211226 ("Convalmore") (Linux/5.15.0-83-generic (x86_64))
Cancel-Lock: sha1:tB/ud/lMOk1v8h1MzEQOZk8nZss=
 by: DrunkenThon - Tue, 12 Sep 2023 20:25 UTC

Anton Shepelev <anton.txt@gmail.moc> wrote:

> Yes. `langremap' let me map the Russian chacters back to
> English ones in normal mode to avoid swtiching keyboard
> layout whenever a leave input mode while typing Russian.

Are you confusing 'langremap' with 'langmap'? If I understand
it correctly, you'll have to set those mappings yourself
*manually* using 'langmap'. Like this:

:set langmap=ΑA,ΒB,ΨC,ΔD,ΕE,ΦF,ΓG,ΗH,ΙI,ΞJ...<snip>

> According to the documentation, this is exactly what I need:
>
> This option allows switching your keyboard into a special
> language mode. When you are typing text in Insert mode
> the characters are inserted directly. When in Normal
> mode the 'langmap' option takes care of translating these
> special characters to the original meaning of the key.
> This means you don't have to change the keyboard mode to
> be able to execute Normal mode commands.

That is for 'langmap' option.

--
Best regards,
DrunkenThon.

Re: Vim remap and langmap

<20230917004013.4523bbb7a81c3052393e2571@gmail.moc>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=66&group=comp.editors#66

  copy link   Newsgroups: comp.editors
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton.txt@gmail.moc (Anton Shepelev)
Newsgroups: comp.editors
Subject: Re: Vim remap and langmap
Date: Sun, 17 Sep 2023 00:40:13 +0300
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <20230917004013.4523bbb7a81c3052393e2571@gmail.moc>
References: <20230909140326.c6db640ebbbbd85bdfb21a2c@gmail.moc>
<udhkjc$1cao$6@dont-email.me>
<20230909162330.26a99ff3d18f9b57f3237a9f@gmail.moc>
<W47fBYONKiXpzgmtK@bongo-ra.co>
<20230909210959.edc13acfa3ae936ac6cbfbac@gmail.moc>
<XspWbC4+Xf5Rh8ar0@bongo-ra.co>
<20230909221631.072a9f206e0f74b25c5b13ea@gmail.moc>
<QCvzRG3Dy+6a+K4Sb@bongo-ra.co>
<20230909225811.bbcb5c9303a2790e7888d771@gmail.moc>
<ritKOUwpKuUsqLOv+@bongo-ra.co>
<20230910233359.1ab27186e95e29fa417f5b66@gmail.moc>
<udqhga$1niuh$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="d2ebfe979734f6b8359231ac9a3bded0";
logging-data="12906"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19VMvgBMjbPzcsSr1sKDC47r8xaljskgP4="
Cancel-Lock: sha1:XuDPJ6Ujp8s0TZD7Wu5IHKvQjek=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
 by: Anton Shepelev - Sat, 16 Sep 2023 21:40 UTC

DrunkenThon to Anton Shepelev:

> > Yes. `langremap' let me map the Russian chacters back
> > to English ones in normal mode to avoid swtiching
> > keyboard layout whenever a leave input mode while typing
> > Russian.
>
> Are you confusing 'langremap' with 'langmap'?

No, I use both. I beg pardon for the typo above, where I
meant `langmap'.

> If I understand it correctly, you'll have to set those
> mappings yourself *manually* using 'langmap'. Like this:
>
> :set langmap=?A,?B,?C,?D,?E,?F,?G,?H,?I,?J...<snip>

Correct, I have a similar mapping in my .vimrc, plus
`nolangremap' to guard it, as the documenation
advices -- see my example in the OP.

--
() ascii ribbon campaign -- against html e-mail
/\ www.asciiribbon.org -- against proprietary attachments


computers / comp.editors / Re: Vim remap and langmap

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor