Re: Advanced text editing commands

2023-05-06 Thread Scott Kostyshak
On Fri, May 05, 2023 at 03:56:38PM +0200, Jean-Marc Lasgouttes wrote:
> Le 05/05/2023 à 13:29, José Matos a écrit :
> > On Wed, 2023-05-03 at 14:49 -0400, Scott Kostyshak wrote:
> > > Because of my jealousy I will make a trite joke: instead of using
> > > Emacs bindings in LyX, why not just implement all of LyX inside of
> > > Emacs?
> > > 
> > > Scott
> > 
> > Because we, at least I, prefer C++ and Python over lisp. :-D
> 
> Implement python in lisp.

Thank you for humoring me, José and JMarc :)

Scott


signature.asc
Description: PGP signature
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Advanced text editing commands

2023-05-05 Thread Jean-Marc Lasgouttes

Le 05/05/2023 à 13:29, José Matos a écrit :

On Wed, 2023-05-03 at 14:49 -0400, Scott Kostyshak wrote:

Because of my jealousy I will make a trite joke: instead of using
Emacs bindings in LyX, why not just implement all of LyX inside of
Emacs?

Scott


Because we, at least I, prefer C++ and Python over lisp. :-D


Implement python in lisp.

JMarc

--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Advanced text editing commands

2023-05-05 Thread José Matos
On Wed, 2023-05-03 at 14:49 -0400, Scott Kostyshak wrote:
> Because of my jealousy I will make a trite joke: instead of using
> Emacs bindings in LyX, why not just implement all of LyX inside of
> Emacs?
> 
> Scott

Because we, at least I, prefer C++ and Python over lisp. :-D
-- 
José Abílio
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Advanced text editing commands

2023-05-03 Thread Scott Kostyshak
On Sun, Apr 30, 2023 at 08:16:06PM -0500, Christopher Menzel wrote:
> On Apr 30, 2023, at 1:20 PM, John Beattie  wrote:
> > On 2023-04-27 12:41 -0400, Scott Kostyshak wrote:
> > 
> >> Out of curiosity, do the emacs users on this list actually use emacs.bind?
> > 
> > Yes. Linux Mint 20.1, also on Windows 10.
> 
> Absolutely, under both MacOS Ventura and Kali Linux 2023.1 (both running Lyx 
> 2.3 7). I do add a number of tweaks of my own, but the default is pretty good.

I can see that a lot of people are using the emacs.bind file. That's great! It 
must work smoothly since (1) from these responses I can tell there are a lot of 
users and (2) I don't see many bugs about it. I'm jealous since I don't think 
we will get Vim-functionality anytime. Because of my jealousy I will make a 
trite joke: instead of using Emacs bindings in LyX, why not just implement all 
of LyX inside of Emacs?

Scott


signature.asc
Description: PGP signature
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Advanced text editing commands

2023-04-30 Thread Christopher Menzel
On Apr 30, 2023, at 1:20 PM, John Beattie  wrote:
> On 2023-04-27 12:41 -0400, Scott Kostyshak wrote:
> 
>> Out of curiosity, do the emacs users on this list actually use emacs.bind?
> 
> Yes. Linux Mint 20.1, also on Windows 10.

Absolutely, under both MacOS Ventura and Kali Linux 2023.1 (both running Lyx 
2.3 7). I do add a number of tweaks of my own, but the default is pretty good.

Chris Menzel
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Advanced text editing commands

2023-04-30 Thread John Beattie
On 2023-04-27 12:41 -0400, Scott Kostyshak wrote:

> Out of curiosity, do the emacs users on this list actually use emacs.bind?

Yes. Linux Mint 20.1, also on Windows 10.

-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Advanced text editing commands

2023-04-29 Thread José Matos
On Thu, 2023-04-27 at 20:07 +0200, Kornel Benko wrote:
> I am using it.
> 
>   Kornel

I have evaluate them and I have been using xemacs bindings for as long
as I remember. :-)
-- 
José Abílio
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Advanced text editing commands

2023-04-28 Thread Pavel Sanda
On Thu, Apr 27, 2023 at 10:57:30AM -0400, Scott Kostyshak wrote:
> I love using 'g;' in Vim. I think the first 'g;' in LyX can be down with 
> "Navigate back" ('Ctrl + shift + <' or something like that) but I would love 
> to go through the entire change list as quickly as with 'g;'.

Navigate back was implemented so it reminds `` in vim. It does not work well
though and I was thinking several times to transform it to vim's g; indeed,
just never got enough time :)

Pavel
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Advanced text editing commands

2023-04-28 Thread Jean-Marc Lasgouttes
Although it requires some care : the positions are relative to the point where 
the cursor was at the time of editing. 

I am not 100% sure of how to do i5, actually.

JMarc 

Le 28 avril 2023 11:49:59 GMT+02:00, Jean-Marc Lasgouttes  
a écrit :
>We have the locations in the undo stack.

-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Advanced text editing commands

2023-04-28 Thread Jean-Marc Lasgouttes

Le 28/04/2023 à 00:15, Richard Kimberly Heck a écrit :
This actually does not sound hard. We would just need (a) to save these 
locations and (b) to make it possible to iterate through the list via 
some LFUNs.


We have the locations in the undo stack.

JMarc

--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Advanced text editing commands

2023-04-27 Thread Richard Kimberly Heck

On 4/27/23 14:54, R. H. van der Gaag wrote:
I would like to be able to select, change, and delete around a word 
and a sentence, like I can in Vim.


Can you explain in more detail how that works?


And to do a ‘light speed’ jump to any part of the visible text by 
typing some shortcut and then typing the first two letters of the word 
I want to jump to; in Vim, and in Obsidian (using a plugin) the 
matches are then marked with a letter, and hitting that letter takes 
me there. 


Something like this could be possible. A first step would be to have a 
'mark all matches' sort of functionality for find. Then we'd need the 
ability to restrict a find to the start of a word. (You could do that 
with the 'advanced' find feature, which permits regular expressions, 
too.) Then one could add the matches to the outliner and figure out some 
way to make the 'hitting a letter' thing work. It's doable, but would 
take work. Perhaps you could file an enhancement request?



On top of that, going back and forward through the locations where my 
cursor has been placed, 


This actually does not sound hard. We would just need (a) to save these 
locations and (b) to make it possible to iterate through the list via 
some LFUNs.



and like you say, persistent undo would be wonderful. 


I've initiated some discussion of a related bug. If we could fix that 
one, then probably it would not be hard to save the undo stack.


Riki


--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Advanced text editing commands

2023-04-27 Thread Richard Kimberly Heck

On 4/27/23 12:41, Scott Kostyshak wrote:

Out of curiosity, do the emacs users on this list actually use emacs.bind?


I think Andre did, and maybe one of the other developers does? Enrico?

Riki


--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Advanced text editing commands

2023-04-27 Thread R. H. van der Gaag

> On 27 Apr 2023, at 16:57, Scott Kostyshak  wrote:
> 
> On Thu, Apr 27, 2023 at 10:01:59AM -0400, Richard Kimberly Heck wrote:
>> On 4/27/23 03:13, R. H. van der Gaag wrote:
>>> Having come from Vim and Obsidian, I find I miss a number of ‘advanced’ 
>>> text editing commands, like jumping to a particular place in the text with 
>>> just a few keystrokes,
>> Such as?
>>> or selecting a sentence.
>> 
>> I don't know how easy this would be to do in a multi-lingual way.
> 
> R. H., to answer your question directly, yes I miss them :). I am used to 
> Vim, and I often wish I could use Vim-like features in LyX. e.g., I love 
> using 'g;' in Vim. I think the first 'g;' in LyX can be down with "Navigate 
> back" ('Ctrl + shift + <' or something like that) but I would love to go 
> through the entire change list as quickly as with 'g;'.
> 
> Also, I've requested persistent undo (https://www.lyx.org/trac/ticket/12578), 
> which I've gotten used to in Vim.
> 
> I imagine Emacs users have similar desires to use Emacs features in LyX.
> 
> That said, without considerable work, I don't see it happening in LyX anytime 
> soon.
> 
> Scott

It’s nice to know I’m not the only one! I guess the number of editing tricks I 
miss isn’t even that large. I would like to be able to select, change, and 
delete around a word and a sentence, like I can in Vim. And to do a ‘light 
speed’ jump to any part of the visible text by typing some shortcut and then 
typing the first two letters of the word I want to jump to; in Vim, and in 
Obsidian (using a plugin) the matches are then marked with a letter, and 
hitting that letter takes me there. On top of that, going back and forward 
through the locations where my cursor has been placed, and like you say, 
persistent undo would be wonderful. 

I have no idea how to do this in LFUN, and no time, frankly, to figure out if 
that is even possible.

I now find myself reverting to Obsidian or Vim to write longer copy, which is 
less than ideal. 

RH


-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Advanced text editing commands

2023-04-27 Thread Kornel Benko
Am Thu, 27 Apr 2023 12:41:47 -0400
schrieb Scott Kostyshak :

> On Thu, Apr 27, 2023 at 11:27:45AM -0400, Richard Kimberly Heck wrote:
> > On 4/27/23 10:57, Scott Kostyshak wrote:  
> > > I imagine Emacs users have similar desires to use Emacs features in LyX.  
> > 
> > In the case of Emacs, there is the file emacs.bind, which implements some of
> > the Emacs key bindings. The problem with vi is the modes, which would take
> > work to implement. But you could certainly implement some kind of 'trigger'
> > keystroke (something you don't use much, say the pipe), and then implement
> > some vi key bindings as key sequences. I.e., in effect the pipe would
> > 'switch modes' momentarily. This would not work well for character-type
> > navigation, but for other commands it might work.
> > 
> > It may be that the things some key bindings do is not yet implemented. But
> > you can do a lot with sequences of LyX commands (via the command-sequence
> > LFUN).  
> 
> Ah that makes sense. I didn't realize that key difference which I can see 
> makes it more
> difficult to have Vim-like functionality in LyX.
> 
> Out of curiosity, do the emacs users on this list actually use emacs.bind?
> 
> Scott

I am using it.

Kornel


pgpX9Wy4PAeWN.pgp
Description: Digitale Signatur von OpenPGP
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Advanced text editing commands

2023-04-27 Thread Scott Kostyshak
On Thu, Apr 27, 2023 at 11:27:45AM -0400, Richard Kimberly Heck wrote:
> On 4/27/23 10:57, Scott Kostyshak wrote:
> > I imagine Emacs users have similar desires to use Emacs features in LyX.
> 
> In the case of Emacs, there is the file emacs.bind, which implements some of
> the Emacs key bindings. The problem with vi is the modes, which would take
> work to implement. But you could certainly implement some kind of 'trigger'
> keystroke (something you don't use much, say the pipe), and then implement
> some vi key bindings as key sequences. I.e., in effect the pipe would
> 'switch modes' momentarily. This would not work well for character-type
> navigation, but for other commands it might work.
> 
> It may be that the things some key bindings do is not yet implemented. But
> you can do a lot with sequences of LyX commands (via the command-sequence
> LFUN).

Ah that makes sense. I didn't realize that key difference which I can see makes 
it more difficult to have Vim-like functionality in LyX.

Out of curiosity, do the emacs users on this list actually use emacs.bind?

Scott


signature.asc
Description: PGP signature
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Advanced text editing commands

2023-04-27 Thread Richard Kimberly Heck

On 4/27/23 10:57, Scott Kostyshak wrote:
I imagine Emacs users have similar desires to use Emacs features in LyX. 


In the case of Emacs, there is the file emacs.bind, which implements 
some of the Emacs key bindings. The problem with vi is the modes, which 
would take work to implement. But you could certainly implement some 
kind of 'trigger' keystroke (something you don't use much, say the 
pipe), and then implement some vi key bindings as key sequences. I.e., 
in effect the pipe would 'switch modes' momentarily. This would not work 
well for character-type navigation, but for other commands it might work.


It may be that the things some key bindings do is not yet implemented. 
But you can do a lot with sequences of LyX commands (via the 
command-sequence LFUN).


Riki


--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Advanced text editing commands

2023-04-27 Thread Scott Kostyshak
On Thu, Apr 27, 2023 at 10:01:59AM -0400, Richard Kimberly Heck wrote:
> On 4/27/23 03:13, R. H. van der Gaag wrote:
> > Having come from Vim and Obsidian, I find I miss a number of ‘advanced’ 
> > text editing commands, like jumping to a particular place in the text with 
> > just a few keystrokes,
> Such as?
> > or selecting a sentence.
> 
> I don't know how easy this would be to do in a multi-lingual way.

R. H., to answer your question directly, yes I miss them :). I am used to Vim, 
and I often wish I could use Vim-like features in LyX. e.g., I love using 'g;' 
in Vim. I think the first 'g;' in LyX can be down with "Navigate back" ('Ctrl + 
shift + <' or something like that) but I would love to go through the entire 
change list as quickly as with 'g;'.

Also, I've requested persistent undo (https://www.lyx.org/trac/ticket/12578), 
which I've gotten used to in Vim.

I imagine Emacs users have similar desires to use Emacs features in LyX.

That said, without considerable work, I don't see it happening in LyX anytime 
soon.

Scott


signature.asc
Description: PGP signature
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Advanced text editing commands

2023-04-27 Thread Richard Kimberly Heck

On 4/27/23 03:13, R. H. van der Gaag wrote:

Having come from Vim and Obsidian, I find I miss a number of ‘advanced’ text 
editing commands, like jumping to a particular place in the text with just a 
few keystrokes,

Such as?

or selecting a sentence.


I don't know how easy this would be to do in a multi-lingual way.

Riki


--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Advanced text editing commands

2023-04-27 Thread R. H. van der Gaag
Having come from Vim and Obsidian, I find I miss a number of ‘advanced’ text 
editing commands, like jumping to a particular place in the text with just a 
few keystrokes, or selecting a sentence. Am I the only one who would be happy 
to have such commands in LyX? 

Kind regards, RH
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users