From 5611cdf4c76981205f6a39c5179041c3ab45dbd2 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 6 Jun 2018 16:53:59 +1200 Subject: Factor out password redaction into new plugin --- .gitmodules | 3 +++ vim/bundle/redact_pass | 1 + vim/vimrc | 43 ------------------------------------------- 3 files changed, 4 insertions(+), 43 deletions(-) create mode 160000 vim/bundle/redact_pass diff --git a/.gitmodules b/.gitmodules index 212a4e52..82c358ff 100644 --- a/.gitmodules +++ b/.gitmodules @@ -23,6 +23,9 @@ [submodule "vim/bundle/put_blank_lines"] path = vim/bundle/put_blank_lines url = https://sanctum.geek.nz/code/vim-put-blank-lines.git +[submodule "vim/bundle/redact_pass"] + path = vim/bundle/redact_pass + url = https://sanctum.geek.nz/code/vim-redact-pass.git [submodule "vim/bundle/strip_trailing_whitespace"] path = vim/bundle/strip_trailing_whitespace url = https://sanctum.geek.nz/code/vim-strip-trailing-whitespace.git diff --git a/vim/bundle/redact_pass b/vim/bundle/redact_pass new file mode 160000 index 00000000..97e019db --- /dev/null +++ b/vim/bundle/redact_pass @@ -0,0 +1 @@ +Subproject commit 97e019dbe8459d34108212e905b63142ac194108 diff --git a/vim/vimrc b/vim/vimrc index d6cdc7f3..70f72ed6 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -265,19 +265,6 @@ vnoremap & :&& " this with a 'directory' setting set noswapfile -" Don't keep swap files from temporary directories or shared memory in case -" they're secrets -if has('autocmd') - augroup dotfiles_swap_skip - autocmd! - autocmd BufNewFile,BufReadPre /tmp/* setlocal noswapfile - autocmd BufNewFile,BufReadPre $TMPDIR/* setlocal noswapfile - autocmd BufNewFile,BufReadPre $TMP/* setlocal noswapfile - autocmd BufNewFile,BufReadPre $TEMP/* setlocal noswapfile - autocmd BufNewFile,BufReadPre */shm/* setlocal noswapfile - augroup END -endif - " Options dependent on the syntax feature if has('syntax') && !has('g:syntax_on') @@ -339,37 +326,7 @@ set undolevels=2000 " 'undodir' and 'undofile' settings will be taken care of by the " auto_cache_dirs.vim plugin if applicable/possible if has('persistent_undo') - - " Turn off the option by default set noundofile - - " Don't keep undo files from temporary directories or shared memory in case - " they're secrets - if has('autocmd') - augroup dotfiles_undo_skip - autocmd! - autocmd BufWritePre /tmp/* setlocal noundofile - autocmd BufWritePre $TMPDIR/* setlocal noundofile - autocmd BufWritePre $TMP/* setlocal noundofile - autocmd BufWritePre $TEMP/* setlocal noundofile - autocmd BufWritePre */shm/* setlocal noundofile - augroup END - endif - -endif - -" Don't keep .viminfo information for files in temporary directories or shared -" memory filesystems; this is because they're used as scratch spaces for tools -" like sudoedit(8) and pass(1) and hence could present a security problem -if has('viminfo') && has('autocmd') - augroup dotfiles_viminfo_skip - autocmd! - autocmd BufNewFile,BufReadPre /tmp/* setlocal viminfo= - autocmd BufNewFile,BufReadPre $TMPDIR/* setlocal viminfo= - autocmd BufNewFile,BufReadPre $TMP/* setlocal viminfo= - autocmd BufNewFile,BufReadPre $TEMP/* setlocal viminfo= - autocmd BufNewFile,BufReadPre */shm/* setlocal viminfo= - augroup END endif " When in visual block mode, let me move the cursor anywhere in the buffer; -- cgit v1.2.3