mcedit: Is there a way to tell mcedit to start in window mode instead of full screen?

2021-01-15 Thread Bob Currey via mc
 I looked on the --help screen but didn't see an option to open in window mode
$ mcedit --help
Usage:
  mcedit [OPTION…] [+lineno] file1[:lineno] [file2[:lineno]...]


GNU Midnight Commander 4.8.25-154-g33c84e75e


Help Options:
  -h, --help    Show help options
  --help-all    Show all help options
  --help-terminal   Terminal options
  --help-color  Color options

Application Options:
  -V, --version Displays the current version
  -f, --datadir Print data directory
  -F, --datadir-info    Print extended info about used data directories
  --configure-options   Print configure options
  -P, --printwd=  Print last working directory to specified file
  -U, --subshell    Enables subshell support (default)
  -u, --nosubshell  Disables subshell support
  -l, --ftplog=   Log ftp dialog to specified file
  -v, --view= Launches the file viewer on a file
  -e, --edit= ... Edit files


Please send any bug reports (including the output of 'mc -V')
as tickets at www.midnight-commander.org

Midnight Commander is my favorite "mst have" program on my Linux machines. 

Thanks for all your efforts :)
Bob Currey


___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc


Re: mcedit: Center current line in middle of screen

2021-01-15 Thread Sebastian Gniazdowski via mc
On Fri, 15 Jan 2021 at 10:58, Yury V. Zaytsev  wrote:
> Sebastian, if you are motivated and have time to do some serious work on
mc, maybe we should talk about a vision first?

Thanks for the invite! Yes I'm motivated, I find it very entertaining to
work on mc.

I wish someone had taken the time instead to integrate the Lua fork by
> mooffie. Unfortunately he wasn't up to maintaining his work of a genius
> (no kidding) and we don't have resources to take it over.


I think that he had one initial mistake, if I can say so – he scripted mc
and not mcedit. I think that it's an editor that can gain most of a
scripting engine, not a filemanager.


> In as far as S-Lang scripting is concerned, it's definitively easy to bolt
> it on, but I really wouldn't want to live with the resulting mess. Our
> code base is already in a shape bad enough...
>

I have a very pleasant experience with S-Lang. I've ran my first script
displaying a listbox from script after ~2 hours of hacking – thanks to
Slirp, the S-Lang version of Swig. It works very, surprisingly well! And it
has all the advanced features of Swig (take a look at
examples/kitchensink/slirprc if you have time). It looks solid.

Basically, to simply export a function to S-Lang, all that is required is
to run: slirp header.h, with the declaration in that file and to compile
and link the resulting header_glue.c (that slirp automatically creates)!

What concerns me about S-Lang is that it's not an object oriented language
and that it doesn't have a bool type. However, that might be a good thing,
as the engine and the vision will be light thanks to this, maybe…

It doesn't make sense to me for you invest your valuable time only to get
> your patches criticized or rejected or just rotting on the tracker without
> any feedback. If we can agree on a direction, then I think it will be good
> for all of us, if we can't - at least it will be good for you, because
> then you can spare your time arguing with us and directly setup a fork
> instead... :-)
>

Yes, I had such hunches too. So my intentions are:
– to make the gem, that mcedit is, more popular,
– to make it grow and flourish mainly by the light scripting engine, but
also by regular C work (like e.g.: the tags objects in listboxes patch –
really, I don't know how I was using the various Vim tags plugins for
years, as it's the mcedit's way – a simple listbox (which can be just built
in) – that is the right way to do tags :)
– then to utilize the scripting also in regular mc and see what ideas will
come up.

I'm constantly having ideas on mcedit improvements. I'm saving them to a
file… It had like 80 entries, but I've just accidentally deleted it hours
ago via a miserable rm -f **/*.#* glob (it expands to all files, not just
those with hash in them, so look out) :( however I have a backup that has
~50 entries, uf … So maybe I could do a wish list on the wiki out of it?

PS. This gives an idea for an improvement – a saving of the backup file to
a predefined directory outside the current tree… Could be done as a script
plugin, maybe.

-- 
> Sincerely yours,
> Yury V. Zaytsev
>


-- 
Sebastian Gniazdowski
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zinit
Blog: http://zdharma.org
___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc


Re: mcedit: Center current line in middle of screen

2021-01-15 Thread Yury V. Zaytsev

On Fri, 15 Jan 2021, Sebastian Gniazdowski via mc wrote:

I'm also working on adding a S-Lang scripting to it :) It already works 
on my machine. It was really simple, just invoking SLang_init_all() and 
that was it, as libslang is already linked :) I have a plugin in it that 
implements adding and subtracting from number under cursor, for example. 
When I improve the support (e.g.: add some more S-Lang interface 
functions that would allow e.g.: moving the vie`w) I submit the patch.


I wish someone had taken the time instead to integrate the Lua fork by 
mooffie. Unfortunately he wasn't up to maintaining his work of a genius 
(no kidding) and we don't have resources to take it over.


In as far as S-Lang scripting is concerned, it's definitively easy to bolt 
it on, but I really wouldn't want to live with the resulting mess. Our 
code base is already in a shape bad enough...


Sebastian, if you are motivated and have time to do some serious work on 
mc, maybe we should talk about a vision first?


It doesn't make sense to me for you invest your valuable time only to get 
your patches criticized or rejected or just rotting on the tracker without 
any feedback. If we can agree on a direction, then I think it will be good 
for all of us, if we can't - at least it will be good for you, because 
then you can spare your time arguing with us and directly setup a fork 
instead... :-)


--
Sincerely yours,
Yury V. Zaytsev
___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc


Re: mcedit: Center current line in middle of screen

2021-01-15 Thread Sebastian Gniazdowski via mc
I've finished coding the support, see
https://midnight-commander.org/ticket/4175 for a patch.

I'm thinking that such feature has a minor drawback which can be
additionally addressed – it is little offensive, IMO, to human brain to
observe such jumps. I feel this way basing on the relief that I've noticed
when I moved from Vim to MCEdit recently. I was doing "zz" command very
often there. I would guess that this has something to do with "rapidly
changing pictures" topic in neurobiology.

To address this, I propose an enhancement: to move display little slowly,
gradually, just to not rudely cut the states of before and after the move.
I could use the timers but I've noticed that timer.c has been removed
recently. Why?
___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc


Re: mcedit: Center current line in middle of screen

2021-01-15 Thread Sebastian Gniazdowski via mc
PS. There's one more patch that I hope will be accepted (after I improve it
according to style guide): https://midnight-commander.org/ticket/4160

On Fri, 15 Jan 2021 at 11:05, Sebastian Gniazdowski 
wrote:

> On Thu, 14 Jan 2021 at 15:24,  wrote:
>
>> Hi there,
>>
>> to me, mcedit is a hidden gem.
>
>
> For me too. It is so good that I've started to improve it recently. See my
> pending patches:
>
> - https://midnight-commander.org/ticket/4165
> - http://midnight-commander.org/ticket/4169
> - http://midnight-commander.org/ticket/4174
> - http://midnight-commander.org/ticket/4171
>
> I'm also working on adding a S-Lang scripting to it :) It already works on
> my machine. It was really simple, just invoking SLang_init_all() and that
> was it, as libslang is already linked :) I have a plugin in it that
> implements adding and subtracting from number under cursor, for example.
> When I improve the support (e.g.: add some more S-Lang interface functions
> that would allow e.g.: moving the view) I submit the patch.
>
> It struck the right balance between ease of use, advanced features and
>> simplicity.
>
>
> Exactly. And IMO with a light scripting engine it could shine even more
> and be able to compete with other main editors.
>
> However, I miss an important
>> function: The ability to center the current line in the middle of the
>> screen.  I could not find it anywhere, maybe someone from the community
>> can help?
>>
>
> This is one of the most missed features by me and it was one of the main
> things that drove me to contribute to mc. Seeing that someone shares my
> view, I'll not wait until the scripting engine will be ready and I'll
> implement the centering in C ("CenterView", perhaps, for the name of the
> command?). It'll be there soon :)
>
> --
> Sebastian Gniazdowski
> IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zinit
> Blog: http://zdharma.org
>


-- 
Sebastian Gniazdowski
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zinit
Blog: http://zdharma.org
___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc


Re: mcedit: Center current line in middle of screen

2021-01-15 Thread Sebastian Gniazdowski via mc
On Thu, 14 Jan 2021 at 15:24,  wrote:

> Hi there,
>
> to me, mcedit is a hidden gem.


For me too. It is so good that I've started to improve it recently. See my
pending patches:

- https://midnight-commander.org/ticket/4165
- http://midnight-commander.org/ticket/4169
- http://midnight-commander.org/ticket/4174
- http://midnight-commander.org/ticket/4171

I'm also working on adding a S-Lang scripting to it :) It already works on
my machine. It was really simple, just invoking SLang_init_all() and that
was it, as libslang is already linked :) I have a plugin in it that
implements adding and subtracting from number under cursor, for example.
When I improve the support (e.g.: add some more S-Lang interface functions
that would allow e.g.: moving the view) I submit the patch.

It struck the right balance between ease of use, advanced features and
> simplicity.


Exactly. And IMO with a light scripting engine it could shine even more and
be able to compete with other main editors.

However, I miss an important
> function: The ability to center the current line in the middle of the
> screen.  I could not find it anywhere, maybe someone from the community
> can help?
>

This is one of the most missed features by me and it was one of the main
things that drove me to contribute to mc. Seeing that someone shares my
view, I'll not wait until the scripting engine will be ready and I'll
implement the centering in C ("CenterView", perhaps, for the name of the
command?). It'll be there soon :)

-- 
Sebastian Gniazdowski
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zinit
Blog: http://zdharma.org
___
mc mailing list
https://mail.gnome.org/mailman/listinfo/mc