Ticket #4299 (closed defect: invalid)

Opened 3 years ago

Last modified 3 years ago

external vim editor on windows

Reported by: silverqx Owned by:
Priority: major Milestone:
Component: mc-core Version: 4.8.24
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

Hi, I'm not able to setup up an external vim editor on windows. I'm using mc 4.8.24.

mc correctly picks up EDITOR env. variable, but the final command looks like this:

vim /C E:/another_dir/file.txt

So vim tries to open two files:

  • first file or in this case it tries to open /C folder at a current drive
  • and second file E:/another_dir/file.txt

The second problem is that file is not quoted, so when the command line looks like this:

vim /C E:/some dir/file.txt

Then it tries to open two folders and one file dir/file.txt.

I have also tried to add External parameters as is described in man pages:

[External editor or viewer parameters]
vim=%filename +%lineno

But without success, it looks like mc ignores this section, in the manpages is written: "The option name should be equal to the name (full pathname) of external editor or viewer."

I have tried various combinations.

The problem is also described here:
https://superuser.com/questions/1119591/defining-midnight-commanders-external-editor-on-windows

Anyway, it is not crucial whether [External editor or viewer parameters] works or not on windows, would be absolutely enough to correctly generate external editor command on windows.
That means remove that /C parameter from the beginning or replace it with -C because startup parameters for vim have to start with a dash and quote filepaths.

Change History

comment:1 Changed 3 years ago by andrew_b

  • Status changed from new to closed
  • Resolution set to invalid
  • Milestone Future Releases deleted

Windows is not supported.

comment:2 Changed 3 years ago by silverqx

Ok thank you for your reply @andrew_b

comment:3 Changed 3 years ago by zaytsev

I wanted to answer on StackOverflow?, but I need reputation to comment. Your answer is wrong - you just contacted the wrong people. We are the maintainers of mc for Unix - there is a separate project to port mc to Windows. We do not provide support for Windows port. You should have contacted the author of this port instead. Maybe he can fix it.

comment:4 Changed 3 years ago by silverqx

Ok, thx for the clarification, I didn't know that there is a dedicated project for windows support, I'm going to post it there, I'm supposing that this is the right location https://github.com/adamyg/mcwin32.

Note: See TracTickets for help on using tickets.