Thursday, March 4, 2021

Re: " -> \(lq ... " -> \(rq

On 2021-03-04 14:36, tuxic@posteo.de wrote:
> Troff distinquishes between the "opening"
> double-quote and the "closing" double
> quote by using \(lq nad \(rq instead.
>
> Is their a function or anything else,
> which would allow me to write someting
> which get closer to 100% error free
> detection of opening and closing "
> in vim?

If you want the actual characters, this will take you to the next
occurrence:

/[""]/

In other words, put the two quote marks within square brackets.

If you want the troff sequences, use

/\\([lr]q/

The help text is at

:h /[]

--
Stan Brown
Tehachapi, CA, USA
https://BrownMath.com
https://OakRoadSystems.com

--
--
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/cda161d8-3ee0-2ed7-9ca2-3879dc3dab75%40fastmail.fm.

" -> \(lq ... " -> \(rq

Hi,

The troff has infected me! :)

Troff distinquishes between the "opening"
double-quote and the "closing" double
quote by using \(lq nad \(rq instead.

I could think of a non-100% safe regex
to detect opening and closing ", but
this would miss in one or the other
case.

Is their a function or anything else,
which would allow me to write someting
which get closer to 100% error free
detection of opening and closing "
in vim?

...or may be, my regex fu isn't that
bright?

Cheers!
mcc


--
--
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/20210304223607.coipp5tjkxkzob4j%40solfire.

Re: vim-mnemonics for hjkl.

On Tue, Mar 02, 2021 at 02:14:29AM -0800, hongy...@gmail.com wrote:
>
>
>I noticed the following mnemonics for vim shortcut keys from
><https://gist.github.com/iambrj/1e4de522ef5dcf13f530bb4b58cd9b32>:
>
><quote>
>
>h: left
>
>j: down
>
>k: up
>
>l: right
>
></quote>
>
>But I still can't figure out the correspondence between their literal
>representation and the operations of them. Any hints will be highly
>appreciated.

The big advantage of hjkl navigation is that it leverages
the home keys for touch typing on a QWERTY keyboard for
what is for many people the dominant right hand. Under
this system and with right hand at the home key positions:

index finger (j)umps down,
middle finger (k)limbs ups,
slide index finger left and (h)urtle left--(h) hangs near (j),
ringer finger to (l)eft of middle finger (l)urches left

Others have already said that "j" looks a bit like an
arrow down symbol, so I used to use this to remind myself
when it was new to me.

Honestly for me, the big reason I learned to rely on hjkl
navigation, had naught to do with being an old-timer
before marked arrow keys and everything to do with playing
Roguelike games such as Angband and UMoria using the
roguelike key command set:
https://rephial.org/help/playing
In such games the arrow keys work, but it saves time not
needing to reach for the arrow keys then hunt and peck for
the letter keys. Essentially, this is the same reason to
use hjkl navigation for text editing.

There is certain elegance to being able to call legacy
game play "training" with a modicum of seriousness. :)

--
--
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/20210304211735.GB5562%40linux.site.

Re: vim-mnemonics for hjkl.

Csaba Hoch wrote:
> Some years ago I read a mnemonic from the perspective of Japan:
>
> Kamchatka
> ^
> |
> Hong Kong <----o -----> Los Angeles
> |
> V
> Java/Jakarta

That is the funniest memory trick for that I've ever seen.

> Maybe not all four place names were exactly these.
>
> I thought I read it in the Vim documentation, but I cannot find it either
> there or on the web.

I have never seen any use-a-world-map mnemonic tricks for vi / vim
before. It really is very where-you-are centric. For me, Jakarta and
Hong Kong are roughly the same direction, and Los Angeles is south.
Kamchatka is very much north-west instead of north. I could substitute
Klondike, Alaska, and Jalisco, Mexico for north / south. Maybe Lithuania
for east. Hong Kong works fine for west, even though it is really
south-west.

Elijah

--
--
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/4Drzhr6Z0czfYm%40panix5.panix.com.

Wednesday, March 3, 2021

Re: vim-mnemonics for hjkl.

Some years ago I read a mnemonic from the perspective of Japan:

                Kamchatka
                    ^
                    |
    Hong Kong  <----o -----> Los Angeles
                    |
                    V
                Java/Jakarta

Maybe not all four place names were exactly these.

I thought I read it in the Vim documentation, but I cannot find it either there or on the web.

Csaba

On Tuesday, March 2, 2021 at 11:14:29 AM UTC+1 hongy...@gmail.com wrote:

I noticed the following mnemonics for vim shortcut keys from <https://gist.github.com/iambrj/1e4de522ef5dcf13f530bb4b58cd9b32>:

<quote>

h: left

j: down

k: up

l: right

</quote>

But I still can't figure out the correspondence between their literal representation and the operations of them. Any hints will be highly appreciated.


Regards,

HY

--
--
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/ac4b916d-d864-4c2b-a932-eccb63c00cbdn%40googlegroups.com.

Re: vim-mnemonics for hjkl.

On Tue, Mar 2, 2021 at 11:12 PM 'JB' via vim_use
<vim_use@googlegroups.com> wrote:
>
> The mnemonic I used for J and K when I first started was J[ump] and K[ite]. H is on the left and L is on the right as pointed out by another user.
>
>
> Sent with ProtonMail Secure Email.
>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Tuesday, March 2, 2021 2:14 AM, hongy...@gmail.com <hongyi.zhao@gmail.com> wrote:
>
> I noticed the following mnemonics for vim shortcut keys from <https://gist.github.com/iambrj/1e4de522ef5dcf13f530bb4b58cd9b32>:
>
> <quote>
>
> h: left
>
> j: down
>
> k: up
>
> l: right
>
> </quote>
>
>
>
> But I still can't figure out the correspondence between their literal representation and the operations of them. Any hints will be highly appreciated.
>
>
> Regards,
>
> HY

As others pointed out, whatever memory trick works for you, use it.
With the h j k l keys near the middle of the most used Latin keyboard
layouts, not only QWERTY but also AZERTY and QWERTZ, h is the leftmost
of them and l the rightmost. For the other two, what I use is this:
lowercase j has a downward-pointing tail and lowercase k has an
upward-pointing one.

Also, now that all keyboards have arrow keys, Vim supports them; but
this means that in Normal mode, j and ↓, k and ↑ are synonymous. I
defined the following mappings to have ↓ and ↑ move by screen lines
while j and k move by file lines (which is different when 'wrap' is
on):

" move by screen lines with ↑ ↓, by file lines (Vim default) with k j
" but not in Insert mode, where hjkl insert a letter
:map <Up> gk
:map <Down> gj

Best regards,
Tony.

--
--
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/CAJkCKXutm-3849YD-mRG8xpd2F1B_wR31M0dDisHX8oJohZTmw%40mail.gmail.com.

Tuesday, March 2, 2021

Re: vim-mnemonics for hjkl.

The mnemonic I used for J and K when I first started was J[ump] and K[ite]. H is on the left and L is on the right as pointed out by another user.


Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Tuesday, March 2, 2021 2:14 AM, hongy...@gmail.com <hongyi.zhao@gmail.com> wrote:

I noticed the following mnemonics for vim shortcut keys from <https://gist.github.com/iambrj/1e4de522ef5dcf13f530bb4b58cd9b32>:

<quote>

h: left

j: down

k: up

l: right

</quote>



But I still can't figure out the correspondence between their literal representation and the operations of them. Any hints will be highly appreciated.


Regards,

HY


--
--
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.

--
--
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/sZxgpaye1S78aaQUBFWBoHQi2qzFyL3JwIeBZ5lsUW3uJdp4NL1uyvrsZni-6BAx_OEK0gw03k2Gp19o3EU9ReHA6mi6kGkOYxbIadOpYWM%3D%40protonmail.com.