summaryrefslogtreecommitdiff
path: root/contrib/vim/noplaintext.vim
blob: 9493194e1e9ab2a3a5abc8f0a9920bee2f1ad9c9 (plain)
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
"
" Prevent various Vim features from keeping the contents of pass(1) password
" files (or any other purely temporary files) in plaintext on the system.
"
" Either append this to the end of your .vimrc, or install it as a plugin with
" a plugin manager like Tim Pope's Pathogen.
"
" Author: Tom Ryder <tom@sanctum.geek.nz>
"

" Don't backup files in temp directories or shm
if exists('&backupskip')
    set backupskip+=/tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*,*/shm/*
endif

" Don't keep swap files in temp directories or shm
if has('autocmd')
    augroup swapskip
        autocmd!
        silent! autocmd BufNewFile,BufReadPre
            \ /tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*,*/shm/*
            \ setlocal noswapfile
    augroup END
endif

" Don't keep undo files in temp directories or shm
if has('persistent_undo') && has('autocmd')
    augroup undoskip
        autocmd!
        silent! autocmd BufWritePre
            \ /tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*,*/shm/*
            \ setlocal noundofile
    augroup END
endif

" Don't keep viminfo for files in temp directories or shm
if has('viminfo')
    if has('autocmd')
        augroup viminfoskip
            autocmd!
            silent! autocmd BufNewFile,BufReadPre
                \ /tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*,*/shm/*
                \ setlocal viminfo=
        augroup END
    endif
endif
>Simplify exports.Jason A. Donenfeld1-4/+3 2014-03-19Copyright noticeJason A. Donenfeld1-1/+1 2014-03-19Team pass: enable multiple keys and per directoryJason A. Donenfeld2-40/+75 The .gpg-id file may now have multiple keys in it, one per line. If a .gpg-id file exists inside a subdirectory, passwords inside that directory are encrypted to that/those ids. The init command has learned a -p/--path option for writing such a sub directory .gpg-id and now can take several arguments for ids. 2014-03-18Shred shm files.Jason A. Donenfeld3-1/+4 2014-03-18Do not compress passwords.Jason A. Donenfeld1-1/+1 According to a forthcoming paper by Alfredo Pironti, OpenPGP compression can reveal entropy levels. We thus disable compression. Existing password stores can be reencrypted without compression using the "--reencrypt" flag for "init". Reported-by: Alfredo Pironti <alfredo.pironti@inria.fr> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> 2013-09-14Use a glob in the pattern match instead of using two comparisons for [yY].Chris Down1-1/+1 2013-09-14Rephrase awkward/confusing message about enabling echo during password entry.Chris Down1-3/+3 2013-09-14Fix directory traversal for reencryption when $PREFIX is a symlinkBrian Shore1-1/+1 2013-08-26Makefile: Do not install bash completion to /etcLukas Fleischer1-3/+2 `make install` should never install anything to /etc. "/usr/share/bash-completion/completions/" is the right place for completions that are installed by software packages. Signed-off-by: Lukas Fleischer <info@cryptocrack.de> 2013-05-22check if a passfile exists before checking for directoryBrian Mattern1-13/+12