Closed pbrisbin closed 9 years ago
I can't reproduce this. I updated my gpg to the same version you're using (which I actually expected to cause some issues) and everything is working fine.
Is gpg an alias in your shell? Are you using the latest plugin from Git or a different version?
Yeah, I also suspected the new gpg. Here is the answer to your questions:
% command -v gpg
/usr/bin/gpg
% /bin/sh -c 'command -v gpg'
/usr/bin/gpg
% (cd ~/.vim/bundle/vim-gnupg && g show)
commit dd8e4adb4d1c6c9fda7a1d60cbc863e260687de9
Author: James McCoy <vega.james@gmail.com>
Date: Sat Mar 21 21:46:00 2015 -0400
Silence "No matching autocommands" for TermChanged event
Signed-off-by: James McCoy <vega.james@gmail.com>
diff --git a/plugin/gnupg.vim b/plugin/gnupg.vim
...
I found the issue. If I have file-line enabled, I get this behavior. Without that, it all works fine. I should've known, this plugin seems to do some buffer re-loading in a way that can beak other plugins (it breaks Fugitive in certain ways too).
Sorry for the noise.
Yeah, file-line seems to break a lot of plugins: bogado/file-line#38 (tar.vim), bogado/file-line#39 (vim-gnupg), bogado/file-line#42 (NERDTree), bogado/file-line#44 (fugitive), bogado/file-line#47 (MRU), and bogado/file-line#48 (NetRW).
bogado/file-line#37 is supposed to fix it, but there's apparently a Vim issue too.
I hate to reopen this, but I cannot seem to get this to work. I do not have any other Vim plugins installed. I've tried completely removing my ~/.vimrc as well as the system /etc/vim/vimrc configs, and still no dice. Not sure what I'm missing. Here's my environment:
$ command -v gpg
/usr/bin/gpg
$ command -v vim
/usr/bin/vim
$ gpg --version
gpg (GnuPG) 1.4.20
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Home: ~/.gnupg
Supported algorithms:
Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
$ vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Dec 18 2015 06:18:22)
Included patches: 1-963
Modified by pkg-vim-maintainers@lists.alioth.debian.org
Compiled by pkg-vim-maintainers@lists.alioth.debian.org
Huge version without GUI. Features included (+) or not (-):
+acl +farsi +mouse_netterm +syntax
+arabic +file_in_path +mouse_sgr +tag_binary
+autocmd +find_in_path -mouse_sysmouse +tag_old_static
-balloon_eval +float +mouse_urxvt -tag_any_white
-browse +folding +mouse_xterm -tcl
++builtin_terms -footer +multi_byte +terminfo
+byte_offset +fork() +multi_lang +termresponse
+cindent +gettext -mzscheme +textobjects
-clientserver -hangul_input +netbeans_intg +title
-clipboard +iconv +path_extra -toolbar
+cmdline_compl +insert_expand -perl +user_commands
+cmdline_hist +jumplist +persistent_undo +vertsplit
+cmdline_info +keymap +postscript +virtualedit
+comments +langmap +printer +visual
+conceal +libcall +profile +visualextra
+cryptv +linebreak -python +viminfo
+cscope +lispindent -python3 +vreplace
+cursorbind +listcmds +quickfix +wildignore
+cursorshape +localmap +reltime +wildmenu
+dialog_con -lua +rightleft +windows
+diff +menu -ruby +writebackup
+digraphs +mksession +scrollbind -X11
-dnd +modify_fname +signs -xfontset
-ebcdic +mouse +smartindent -xim
+emacs_tags -mouseshape -sniff -xsmp
+eval +mouse_dec +startuptime -xterm_clipboard
+ex_extra +mouse_gpm +statusline -xterm_save
+extra_search -mouse_jsbterm -sun_workshop -xpm
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lm -ltinfo -lnsl -lselinux -lacl -lattr -lgpm -ldl
$ ls -l ~/.vim/plugins/
total 0
lrwxrwxrwx. 1 aaron aaron 42 Dec 30 07:21 gnupg.vim -> /home/aaron/src/vim-gnupg/plugin/gnupg.vim
$ cat ~/.vimrc
colorscheme hybrid
let g:GPGPreferArmor=1
let g:GPGPreferSign=1
set autoindent
set colorcolumn=80
set expandtab
set guifont=Liberation\ Mono\ 8
set guioptions='aegit'
set laststatus=2
set nobackup
set nocompatible
set nojoinspaces
set nowrap
set number
set relativenumber
set ruler
set shell=/bin/zsh
set shiftwidth=4
set smarttab
set softtabstop=4
set t_Co=256
set tabstop=8
set textwidth=79
syntax enable
The results:
$ vim /tmp/file.pgp
(add 'foo bar baz')
$ cat /tmp/file.pgp # happens with *.asc and *.gpg extensions also
foo bar baz
$ cat /etc/issue
Debian GNU/Linux stretch/sid \n \l
@atoponce Your issue is completely different than the one originally reported here. You don't seem to have the plugin loaded. If you've verified, with :scriptnames
, that it is loaded after vim /tmp/file.pgp
, please open a separate issue.
I got it working after analyzing "vim -V", and verifying that it was looking for "/home/aaron/.vim/plugin/*/.vim", where I had "/home/aaron/.vim/plugins/gnupg.vim", which didn't match. Sorry for the false alarm.
Steps:
Contents in buffer (unreadable gibberish).
Debug log:
The file is valid, and the command works:
What am I doing wrong?