Page 1 of 1
Midnight Commander editor
Posted: Fri Dec 13, 2019 2:49 pm
by aszabo
Hi,
Regarding an issue with Midnight Commander I would like to turn to this forum. I am an old Linux user and I always use Midnight Commander for file handling and I use the MC editor with key F3 but in case of MX I get a new window with command prompt and not the editor. I tried every possibilities for settings but without success. I have never met this issue, can somebody help me solve it?
Thanks in advance.
Re: Midnight Commander editor
Posted: Fri Dec 13, 2019 3:15 pm
by gosia
That's weird. For me F3 means "View File" and F4 means "Edit File".
But look at the configuration file /etc/mc/mc.default.keymap. There you can define the keys.
Re: Midnight Commander editor
Posted: Fri Dec 13, 2019 3:43 pm
by fehlix
aszabo wrote: Fri Dec 13, 2019 2:49 pm
Regarding an issue with Midnight Commander I would like to turn to this forum. I am an old Linux user and I always use Midnight Commander for file handling and I use the MC editor with key F3 but in case of MX I get a new window with command prompt and not the editor. I tried every possibilities for settings but without success. I have never met this issue, can somebody help me solve it?
Within keyboard shortcut settings F4 is bound to open the Terminal. Just remove the keyboard shortcut, so that F4 will open the editor in Midnight Commander.
Re: Midnight Commander editor
Posted: Fri Dec 13, 2019 3:50 pm
by aszabo
gosia wrote: Fri Dec 13, 2019 3:15 pm
That's weird. For me F3 means "View File" and F4 means "Edit File".
But look at the configuration file /etc/mc/mc.default.keymap. There you can define the keys.
Sorry my fault, I of course meant F4
Re: Midnight Commander editor
Posted: Fri Dec 13, 2019 3:55 pm
by aszabo
OK, thanks but where can set the keyboard bounding? Anyway, so far I did not have this issue, I used MC with default settings and to F4 I have always got the editor.
Re: Midnight Commander editor
Posted: Fri Dec 13, 2019 4:13 pm
by Route99
Under Debian you're always asked at the 1st use to choose for the internal mcedit or another editor.
Now like this?
https://ubuntuforums.org/showthread.php?t=1309409
Re: Midnight Commander editor
Posted: Fri Dec 13, 2019 4:23 pm
by aszabo
Thank you, I changed the default editor to mcedit but after it no change the problem still exists
Re: Midnight Commander editor
Posted: Fri Dec 13, 2019 4:26 pm
by Route99
Maybe you mis the file where the settings are stored, I'n now not able to look.
Try it yourself, use Google to find it.
Re: Midnight Commander editor
Posted: Fri Dec 13, 2019 4:54 pm
by aszabo
One question: do you use MC? And if yes, which editor do you use in terminal in MC?
Re: Midnight Commander editor
Posted: Fri Dec 13, 2019 5:01 pm
by fehlix
aszabo wrote: Fri Dec 13, 2019 4:54 pm
One question: do you use MC? And if yes, which editor do you use in terminal in MC?
I keep F4 bound to mcedit, but use in mc/ terminal also vim and nano ; often also calling geany with the terminal
Re: Midnight Commander editor
Posted: Fri Dec 13, 2019 6:02 pm
by Huckleberry Finn
aszabo wrote: Fri Dec 13, 2019 4:23 pm
Thank you, I changed the default editor to mcedit but after it no change the problem still exists
Aszabo, you need to open this:
http://i.imgur.com/HZm0qUJ.png
Just type
keyboard in the Menu.
And on "Application Shortcuts" tab, find the line of F4 (which is set to drop-down Terminal in MX by default), select and "remove" (or edit and change to some other key).
Then there will be nothing left to conflict with the F4 of the MC :)
(Or of course you can assign that or something else to start MC writing the launcher command)
Re: Midnight Commander editor
Posted: Fri Dec 13, 2019 7:26 pm
by aus9
Hi
EDIT
only just see Huckleberry post....I will leave mine unaltered below in case it helps too
Thank you, I changed the default editor to mcedit but after it no change the problem still exists
It sounds like something has gone wrong lets re-configure assuming you want internal editor
so follow these steps....
delete existing home configs by opening a terminal and run next command.....then run mc as per last command
with mc running..... press F9 -> O (for Options) -> C (for Configuration)
and you are likely to see this image
https://imgur.com/K5x4sml
now press t to toggle ON internal editor (mcedit) or press t to toggle it OFF
(alternative to pressing t is to navigate to that setting and pressing space bar to toggle on or off)
but because you say its not working for you...I want you to toggle it OFF
Now press O (to save as OK)
popup box disappears
exit mc
restart mc
you should now see an option to choose editors
Code: Select all
gordon@box:~$ mc
Select an editor. To change later, run 'select-editor'.
1. /bin/nano <---- easiest
2. /usr/bin/mcedit
3. /usr/bin/vim.tiny
Choose 1-3 [1]:
and I assume you will choose 2....good luck
and retest please
#######################
BTW you can use internal editor direct on any file by running
Re: Midnight Commander editor
Posted: Sat Dec 14, 2019 3:23 pm
by aszabo
Hi,
Thank you for your detailed explanation, I followed it carefully but no success.
You can see the new pop-up window after done in the attachment.
Re: Midnight Commander editor
Posted: Sat Dec 14, 2019 4:07 pm
by Huckleberry Finn
Maybe this works: On "keyboard" application shortcuts delete: xfce4-terminal --hide-menubar --hide-borders --drop-down
Also on that window: Right-click: Preferences => Drop-down tab => uncheck "Use shortcut to focus visible window"
In fact, you can uncheck all under "Behavior".
Re: Midnight Commander editor
Posted: Sat Dec 14, 2019 8:16 pm
by fehlix
aszabo wrote: Sat Dec 14, 2019 3:23 pm
Hi,
Thank you for your detailed explanation, I followed it carefully but no success.
You can see the new pop-up window after done in the attachment.
Within post number #3 was mentioned to remove the F4-keybinding within Keyboard settings, which you find within the Menu under Settings -> Keyboard -> Application Shortcut.
F4.png
Re: Midnight Commander editor
Posted: Sun Dec 15, 2019 7:15 pm
by seaken64
Following the tips in this topic I was able to turn off the F4 keybinding that opens the terminal (which as you are finding interferes with the default MC F4 action to bring up the editor).
In review:
Open Menu by clicking on the MX logo on lower left corner (if you have the standard panel config),
Type "Keyboard",
Select "Keyboard - Edit keyboard settings and applications shortcuts",
When dialog comes on screen click on the "Application Shortcuts" tab,
Scroll down to "xfce4-terminal --hide-menubar --hide-borders --drop-down" and you will see it
is assigned to F4. (I had to click on Edit to see it's assignment),
Remove it.
Close dialog.
Now F4 does not open the terminal and can be used by MC to bring up editor.
I've been wanting to make that change for awhile.
Seaken64
Re: Midnight Commander editor
Posted: Mon Jan 06, 2020 11:24 am
by aszabo
Thank you very much, that was the solution.
Re: Midnight Commander editor
Posted: Tue Jan 07, 2020 3:45 am
by aus9
Hi
as fehlix solved this for you in post 3, maybe you can mark this post as soved.
and thanks for dropping by
Re: Midnight Commander editor
Posted: Tue Jan 07, 2020 3:49 am
by JayM
To do that, edit your first post (#1) at the top of page 1 of this topic using the pencil icon and add the word SOLVED to the subject.
Re: Midnight Commander editor
Posted: Tue Jan 07, 2020 11:54 am
by BV206
I noticed this problem an found out that at least on my system I can have F4 open a terminal in Thunar and also edit files in MC.
They way I fixed it was go to the Xfce4 terminal Preference, Advanced tab, and check all the boxes under Shortcuts which disables shortcut keys in the terminal.
Re: Midnight Commander editor
Posted: Tue Jan 07, 2020 12:14 pm
by Richard
@BV206,
Thanks for the simpler tip.
Been doing it the other way for years. :)