Re: Use both mcedit and vim as mc editors from keyboard shortcuts

jimmyg521--- via mc <[email protected]> Sat, 03 Jun 2023 11:45:53 -0500
Newsgroups gmane.comp.gnome.apps.mc.general
Message-ID <[email protected]>
You can, in a sense, already do this - highlight file in MC pane, press 
F2, @, type editor name, press RETURN (just confirmed that this works 
for me). No need, this way, to modify MC files/settings.

Alternatively you can edit the User Menu file (that's the F2 menu). To 
get there I use: F9 to open the menu, cursor to the Command menu, 
select the "Edit menu file" entry, select "User" from the dialog that 
appears. The User file will open in the default editor. Add an entry 
such that you open whatever file is highlighted with the editor of your 
choice. MC uses /bin/sh as its shell for this file. Hopefully you can 
can figure out the syntax simply by looking at the existing entries 
though Google can help you find more information about the substitution 
variables used (%u, etc.) that what's shown at the top of the file 
itself.

Regards.

On Sat, Jun 3, 2023 at 12:07, Nikolay Shaplov via mc 
<[email protected]> wrote:
> Hi!
> 
> I am painfully moving from mcedit to vim. And still can't finish this 
> shift...
> 
> Partly because I do not dare to set vim as default editor for mc.
> 
> This brought me to a thought, is there any way to set vim as default 
> editor,
> for pressing F4, but set some other key binding for mcedit, so I can 
> still
> call when I need specifically mcedit for this file?
> 
> Are there any suggestions how to do it in a better way?
> 
> --
> Nikolay Shaplov aka Nataraj
> Fuzzing Engineer at Postgres Professional
> Matrix IM: @dhyan:nataraj.su
> --
> mc mailing list
> [email protected] 
> <mailto:[email protected]>
> <https://lists.midnight-commander.org/mailman/listinfo/mc>

-- 
mc mailing list
[email protected]
https://lists.midnight-commander.org/mailman/listinfo/mc