File: gnupg.txt

package info (click to toggle)
vim-scripts 20210124.4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,384 kB
  • sloc: perl: 420; xml: 95; makefile: 25
file content (125 lines) | stat: -rw-r--r-- 5,771 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
*gnupg.txt*  transparent editing of gpg encrypted files.

==============================================================================
INTRODUCTION                                    *gnupg*

This plugin implements transparent editing of gpg encrypted files.

When opening an encrypted file, the contents are automatically decrypted into
the buffer.

If the buffer is a new file, the plugin will prompt for the intended
recipients.  When the buffer is saved, the contents will be encrypted for all
the configured recipients.

The plugin turns off |'viminfo'|, |'swapfile'|, and |'undofile'| to avoid
writing unencrypted data to disk.

------------------------------------------------------------------------------
COMMANDS                                        *gnupg-commands*

                                                *gnupg-:GPGEditRecipients*
:GPGEditRecipients      Opens a scratch buffer to change the list of
                        recipients. Recipients that are unknown (not in your
                        public key) are highlighted and have a prepended "!".
                        Closing the buffer makes the changes permanent.

                                                *gnupg-:GPGViewRecipients*
:GPGViewRecipients      Prints the list of recipients.

                                                *gnupg-:GPGEditOptions*
:GPGEditOptions         Opens a scratch buffer to change the options for
                        encryption (symmetric, asymmetric, signing). Closing
                        the buffer makes the changes permanent. WARNING: There
                        is no check of the entered options, so you need to
                        know what you are doing.

                                                *gnupg-:GPGViewOptions*
:GPGViewOptions         Prints the list of options.

------------------------------------------------------------------------------
AUTOCMDS                                        *gnupg-autocmds*

The |User| *GnuPG* event is triggered when an encrypted buffer is loaded.
This happens before any |BufRead| or |BufNewFile| events are triggered so
filetype-specific options are not overridden.
Example: >

        autocmd User GnuPG setlocal textwidth=72

This sets |'textwidth'| to `72` for any encrypted buffer.

------------------------------------------------------------------------------
VARIABLES                                       *gnupg-variables*

                                                *gnupg-g:GPGExecutable*
g:GPGExecutable         If set used as gpg executable, otherwise the system
                        chooses what is run when "gpg" is called. Defaults to
                        "gpg".

                                                *gnupg-g:GPGUseAgent*
g:GPGUseAgent           If set to 0 a possible available gpg-agent won't be
                        used. Defaults to 1.

                                                *gnupg-g:GPGPreferSymmetric*
g:GPGPreferSymmetric    If set to 1 symmetric encryption is preferred for new
                        files. Defaults to 0.

                                                *gnupg-g:GPGPreferArmor*
g:GPGPreferArmor        If set to 1 armored data is preferred for new files.
                        Defaults to 0 unless a "*.asc" file is being edited.

                                                *gnupg-g:GPGPreferSign*
g:GPGPreferSign         If set to 1 signed data is preferred for new files.
                        Defaults to 0.

                                                *gnupg-g:GPGDefaultRecipients*
g:GPGDefaultRecipients  If set, these recipients are used as defaults when no
                        other recipient is defined. This variable is a Vim
                        list. Default is unset.

                                                *gnupg-g:GPGUsePipes*
g:GPGUsePipes           If set to 1, use pipes instead of temporary files when
                        interacting with gnupg. When set to 1, this can cause
                        terminal-based gpg agents to not display correctly
                        when prompting for passwords. Defaults to 0.

                                                *gnupg-g:GPGHomedir*
g:GPGHomedir            If set, specifies the directory that will be used for
                        GPG's homedir. This corresponds to gpg's --homedir
                        option. This variable is a Vim string.

                                                *gnupg-g:GPGFilePattern*
g:GPGFilePattern        If set, overrides the default set of file patterns
                        that determine whether this plugin will be activated.
                        Defaults to `*.{gpg,asc,pgp}`.

------------------------------------------------------------------------------
DEBUGGING                                       *gnupg-debugging*

The plugin honors |'verbose'| and currently has 3 different trace levels:

	1	Plugin and gnupg version, high-level status, and the
		encrypt/decrypt command line/exit status
	2	.. plus triggered autocmds, recipient decoding command
		line/output/exit status, and gnupg's supported algorithms
	3	.. plus values of relevant Vim options, and tracing of which
		plugin functions are called

Example: >

        :verbose edit foo.gpg

The above would trace everything from level 1 into Vim's |:messages| buffer,
as well as display the messages as they happen.

>
        :set verbosefile=debug.log
        :2verbose write foo.gpg
        :set verbosefile=

While this would trace everything from levels 1 and 2 into the |:messages|
buffer as well as saving it to the file `debug.log`.

==============================================================================
vim:tw=78:sw=4:ts=8:ft=help:norl: