diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-06-06 16:53:59 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-06-06 16:53:59 +1200 |
commit | 5611cdf4c76981205f6a39c5179041c3ab45dbd2 (patch) | |
tree | 5d3403f26edabe684a7fdd93f784fdf26864b5d4 | |
parent | Spacing adjustments (diff) | |
download | dotfiles-5611cdf4c76981205f6a39c5179041c3ab45dbd2.tar.gz dotfiles-5611cdf4c76981205f6a39c5179041c3ab45dbd2.zip |
Factor out password redaction into new plugin
-rw-r--r-- | .gitmodules | 3 | ||||
m--------- | vim/bundle/redact_pass | 0 | ||||
-rw-r--r-- | vim/vimrc | 43 |
3 files changed, 3 insertions, 43 deletions
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 +Subproject 97e019dbe8459d34108212e905b63142ac19410 @@ -265,19 +265,6 @@ vnoremap <silent> & :<C-U>&&<CR> " 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; |