Re: Extending 'VIP' editor

2021-10-27 Thread Erik Gustafson
Hi Alex, What is the best way to programmatically add characters to the current line? The function 'insChar' can replace the character under the cursor, but I'd like to simulate pressing 'i' to enter insert mode, typing e.g. "#{", pressing esc, etc, from code in 'viprc'. Thanks, Erik On Mon, Oct

Re: Extending 'VIP' editor

2021-10-27 Thread Alexander Burger
Hi Erik, > What is the best way to programmatically add characters to the current line? > The function 'insChar' can replace the character under the cursor, but I'd 'insChar' only replaces a single char (or the same char "count" times). More general are 'cutX', 'cutN' and 'paste'. They are the m

Re: Extending 'VIP' editor

2021-10-27 Thread Erik Gustafson
Hi Alex, > More general are 'cutX', 'cutN' and 'paste'. They are the main internal > editing > workhorses, based on 'change'. 'change' takes care of everything, like > maintaning undo/redo stacks, markup and rerfeshing the display. > Yep, this is it. 'paste' does what I need. "simulate ..." was