Giter Site home page Giter Site logo

External vim editor on windows about mcwin32 HOT 8 CLOSED

adamyg avatar adamyg commented on May 27, 2024
External vim editor on windows

from mcwin32.

Comments (8)

adamyg avatar adamyg commented on May 27, 2024 2

target build-221

from mcwin32.

adamyg avatar adamyg commented on May 27, 2024 2

Build-222 pending

from mcwin32.

adamyg avatar adamyg commented on May 27, 2024 1

Further work required to quote args

from mcwin32.

silverqx avatar silverqx commented on May 27, 2024

I have tested it, and now the generated command doesn't contain /C, but when the file contains whitespace it fails, the generated command looks like this:

vim E:/some dir/file.txt

So it opens empty file, still doesn't work correctly, it has to be quoted when it contains dangerous characters. @adamyg

from mcwin32.

silverqx avatar silverqx commented on May 27, 2024

Yesterday, before I had gone to the bed, I have little looked at source code on GitHub ( not in an ide, so it might not be accurate ) and it looks like the file paths are passed without quotations for win and also for UNIX systems, on UNIX it works without problems. ( I checked this on my Gentoo install, but I will not describe it here ).

The call chain I have find out is edit_cmd() -> do_edit() -> edit_file_at_line() -> execute_external_editor_or_viewer() ... -> w32_shell(), ..., the path what_vpath which is obtained by fname = vfs_path_from_str (selection (current_panel)->fname); here is unquoted.

This path should be quoted somewhere around execute_external_editor_or_viewer(), I practically don't know anything about mc source code and it was 15min lookup to source code on github, so I can still be wrong. 🙂🤙 @adamyg

from mcwin32.

eugenov avatar eugenov commented on May 27, 2024

At least I was able to set Notepad3 as external editor with env variable EDITOR. It works as it should.

from mcwin32.

eugenov avatar eugenov commented on May 27, 2024

Maybe does one know how to let mc open multiple files with external editor? Now mc panels are blocked (black screen) when file is opened with editor. Something like "&" at the end of command...

from mcwin32.

adamyg avatar adamyg commented on May 27, 2024

Neither options are currently available; open an enhancement ticket and i'll consider

from mcwin32.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.