~martanne/devel

4 2

[vis] c/\1/ doesn’t seem to work

Details
Message ID
<D716XLQZ6QPE.WUR4DOFLDBMP@cepl.eu>
Sender timestamp
1736799979
DKIM signature
pass
Download raw message
When I select some code with `:x g/set_word_list/
x/lexer\.([A-Z]+)` I get this nice selection (notice, the use of
group) [1]. I would expect that when running `:c/'\1'` I would
get for each cursor the content of the particular selection. I
don’t, I get [2].

That must be wrong, isn’t it?

Best,

Matěj

[1] https://mcepl.fedorapeople.org/tmp/vis-c-before.png
[2] https://mcepl.fedorapeople.org/tmp/vis-c-after.png
-- 
http://matej.ceplovi.cz/blog/, @mcepl@en.osm.town
GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8
 
There is all the difference in the world between treating people
equally and attempting to make them equal. While the first is the
condition of a free society, the second means as De Tocqueville
describes it, a new form of servitude.
  -- Friedrich Hayek, Individualism and Economic Order
Details
Message ID
<32ZY6K4BFPXKF.3Q89VXDQ2HG61@rnpnr.xyz>
In-Reply-To
<D716XLQZ6QPE.WUR4DOFLDBMP@cepl.eu> (view parent)
Sender timestamp
1736798157
DKIM signature
permerror
Download raw message
Matěj Cepl <mcepl@cepl.eu> wrote:
> When I select some code with `:x g/set_word_list/
> x/lexer\.([A-Z]+)` I get this nice selection (notice, the use of
> group) [1]. I would expect that when running `:c/'\1'` I would
> get for each cursor the content of the particular selection. I
> don’t, I get [2].
>
> That must be wrong, isn’t it?
>
> Best,
>
> Matěj
>
> [1] https://mcepl.fedorapeople.org/tmp/vis-c-before.png
> [2] https://mcepl.fedorapeople.org/tmp/vis-c-after.png

Hi Matěj,

I don't know if its wrong in the sense of the way Martanne
intended for it to be implemented but it has always felt wrong to
me too. Whenever you do a multi selection like this the contents
get collapsed to what I guess is the first selection in the list
(I thought it was the primary selection but your screenshots seem
to indicate otherwise).

One of the reasons I started that RFC is because I plan on
rewriting the entirety of the sam parsing/handling. I have a
couple long flights coming up so I will probably work on it on the
plane.

To me sam is the core feature of vis so I would like if it was a
little more intuitive. I will be keeping in mind how to fix this
issue as well as your other email about `:open`.

--
https://rnpnr.xyz/
GPG Fingerprint: B8F0 CF4C B6E9 415C 1B27 A8C4 C8D2 F782 86DF 2DC5
Details
Message ID
<D727LP8WZV5O.3E4I8LP1BBWZ5@cepl.eu>
In-Reply-To
<32ZY6K4BFPXKF.3Q89VXDQ2HG61@rnpnr.xyz> (view parent)
Sender timestamp
1736903427
DKIM signature
pass
Download raw message
On Tue Jan 14, 2025 at 3:56 AM CET, Randy Palamar wrote:
> One of the reasons I started that RFC is because I plan on
> rewriting the entirety of the sam parsing/handling. I have a
> couple long flights coming up so I will probably work on it on the
> plane.

If you will have a free moment on that flight, could I
ask you (or anybody on this list) for an advice how to
serialize vis.registers(). I have tried to do something in
https://git.sr.ht/~mcepl/vis-session/tree/master/item/init.lua,
but it doesn’t seem to work (that JSON file is empty).

Any ideas?

Matěj

-- 
http://matej.ceplovi.cz/blog/, @mcepl@en.osm.town
GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8
 
Somewhere at the edge of the Bell curve was the girl for me.
    -- Based on https://xkcd.com/314/
Details
Message ID
<D727MES6JVMK.2OFTQWWBVTTX6@cepl.eu>
In-Reply-To
<32ZY6K4BFPXKF.3Q89VXDQ2HG61@rnpnr.xyz> (view parent)
Sender timestamp
1736903482
DKIM signature
pass
Download raw message
On Tue Jan 14, 2025 at 3:56 AM CET, Randy Palamar wrote:
> To me sam is the core feature of vis so I would like if it was a
> little more intuitive.

And yes, I forgot to comment here: I completely agree, sam is
awesome, and I am more liking it.

Best,

Matěj

-- 
http://matej.ceplovi.cz/blog/, @mcepl@en.osm.town
GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8
 
Only one life, ’twill soon be past,
Only what’s done for Christ will last.
  -- C. T. Studd, “Only One Life”

vis-session [Was: Re: [vis] c/\1/ doesn’t seem to work]

Details
Message ID
<D72O0T7TYW7U.35SX7VIS3L5JZ@cepl.eu>
In-Reply-To
<D727LP8WZV5O.3E4I8LP1BBWZ5@cepl.eu> (view parent)
Sender timestamp
1736949749
DKIM signature
pass
Download raw message
On Wed Jan 15, 2025 at 1:10 AM CET, Matěj Cepl wrote:
> If you will have a free moment on that flight, could I
> ask you (or anybody on this list) for an advice how to
> serialize vis.registers(). I have tried to do something in
> https://git.sr.ht/~mcepl/vis-session/tree/master/item/init.lua,
> but it doesn’t seem to work (that JSON file is empty).
>
> Any ideas?

Yes, the idea is that I am an idiot: copying Lua tables is
slightly more involved that a = b.

Script has been fixed and it seems to be working on
https://git.sr.ht/~mcepl/vis-session. The session file is
completely awful with plenty of binary characters, but it seems
to work.

Best,

Matěj Cepl

-- 
http://matej.ceplovi.cz/blog/, @mcepl@en.osm.town
GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8
 
There are two ways of constructing a software design: One way is
to make it so simple that there are obviously no deficiencies,
and the other way is to make it so complicated that there are no
obvious deficiencies.
  -- C. A. R. Hoare
Reply to thread Export thread (mbox)