Comments (4)
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.
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.
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.
Ok, thank you again for your answer.
from vim-gnupg.
Related Issues (20)
- Error While Opening File - Unknown Function: gnupg#init HOT 3
- Implement g:GPGReplaceKeys to automatically replace keys HOT 2
- contents of main buffer are parsed as recipients HOT 2
- gpg#init doesn't exist HOT 3
- 'tty' is not recognized as an internal or external command
- Already encrypted file "File is not encrypted, all GPG functions disabled!" HOT 2
- Missing first 2 symbols on line 2 after opening file HOT 3
- Error when doing ':wq' with newer vim version HOT 2
- Please add /doc/tags to .gitignore
- Decryption failures in nvim HOT 1
- The cipher AES.CFB is not known by the local gpg command. Using default! HOT 4
- Need to type passphrase on every :w ? HOT 4
- Docs: Include warning that other processes can read plaintext with default config HOT 2
- Start vim without to create a buffer to edit recipients (GPGEditRecipients) HOT 1
- Not decrypting after upgrade to GnuPG 2.3.4 HOT 12
- Add the ability to use age? HOT 2
- Unable to write to encrypted file. Error: Message could not be encrypted! (Press ENTER) HOT 4
- [Bug] Neovim compatability of vim-gnupg with pinentry-mac - only get encrypted file HOT 5
- Recipients lost after opening file. HOT 7
- Error detected while processing BufReadCmd Autocommands for "*.{gpg,asc,pgp}" HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-gnupg.