-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
save to 0600 permission #68
Comments
What about doing this? autocmd BufWritePost * if get(b:, 'GPGEncrypted', 0) | call setfperm(expand('%'), 'rw-------') | endif |
Hi jamessan, I am not really know how to use it.
Thanks. |
This would go in your augroup johnwmail
autocmd!
autocmd BufWritePost * if getbufvar(expand('<abuf>'), 'b:GPGEncrypted', 0)) | call setfperm(expand('%'), 'rw-------') | endif
augroup END Alternatively, instead of having a augroup johnwmail
autocmd!
autocmd User GnuPG autocmd BufWritePost <buffer=abuf> call setfperm(expand('%'), 'rw-------')
augroup END When vim-gnupg has opened a buffer, it triggers the |
Yeah, I see that now. That's a trickier issue to solve, since the filename the auto-command is triggering is actually the filename minus the encrypted extension. There isn't an easy way to get the real filename. I guess the most robust way to solve it is to have the plugin do it. |
Hi, after addedaugroup my.email@gmail.com
|
Ok, thank you. |
Would you please add the feature, let vim-gnupg plugin save file at 0600 permission?
I dont want let other people read my secret file, even it is encrypted one.
Thank you.
The text was updated successfully, but these errors were encountered: