GithubHelp home page GithubHelp logo

Comments (4)

jamessan avatar jamessan commented on May 18, 2024

The problem here is that NetRW handles the file retrieval from the remote system and populating Vim's buffer with the contents of the file. Once it has done that, it sets the buffer's "filename" to a special name (e.g., scp://host/path/to/file) and that's the file that vim-gnupg sees when it gets a chance to run. Obviously, this isn't something that gnupg can access, so it fails to do anything useful with that filename.

NetRW doesn't provide any hooks to allow plugins like vim-gnupg to be part of the process, so I don't think there's really much that I can do. You're better off just transferring the file locally and doing the edit or using something like sshfs, although that has its own issues.

from vim-gnupg.

noteed avatar noteed commented on May 18, 2024

Thank you.

Syntax highlighting plugins seem to inspect, say, the shabang line to discover the language a file is written in when the extension is missing. Couldn't vim-gnupg do something similar ?

from vim-gnupg.

jamessan avatar jamessan commented on May 18, 2024

The problem isn't that vim-gnupg doesn't know it needs to run. The plugin is trying to do its job, but there's isn't a local file for it to work with, nor a way to ensure that its BufReadCmd/BufWriteCmd autocommands and NetRW's autocommands are called in the proper order.

Basically, NetRW would need to define an API where other plugins could register themselves as a filter for NetRW's read/write commands. Currently, NetRW hardcodes its own set of filters instead of providing a way for any plugin to hook into the process.

from vim-gnupg.

noteed avatar noteed commented on May 18, 2024

Ok, thank you again for your answer.

from vim-gnupg.

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.