summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <florian.pritz@rise-world.com>2019-05-07 09:20:58 +0200
committerFlorian Pritz <bluewind@xinu.at>2019-05-10 18:04:11 +0200
commit4fa61c404abf0f77fc8d93cf9adc4007f9a5b647 (patch)
tree0c70377cd2716e2693386a275b7eda424d6552d0
parent8207051384aeb1aa11966426dbfa543c85bace0b (diff)
downloaddotfiles-4fa61c404abf0f77fc8d93cf9adc4007f9a5b647.tar.gz
dotfiles-4fa61c404abf0f77fc8d93cf9adc4007f9a5b647.tar.xz
conceal passwords in vim
Signed-off-by: Florian Pritz <florian.pritz@rise-world.com>
-rw-r--r--.vimrc7
1 files changed, 7 insertions, 0 deletions
diff --git a/.vimrc b/.vimrc
index 7cae315..939f1b2 100644
--- a/.vimrc
+++ b/.vimrc
@@ -390,6 +390,13 @@ hi SpellCap ctermbg=17
highlight ExtraWhitespace ctermbg=red guibg=red
autocmd Syntax * syn match ExtraWhitespace /\s\+$\| \+\ze\t/ containedin=ALL
+" hide passwords
+autocmd BufReadCmd,FileReadCmd passwords.gpg set ft=gpgpass
+autocmd Syntax yaml syn match MyPassword /\%(^\s*pass\(word\)\?:\s*\)\@<=\S\+/ conceal cchar=*
+autocmd Syntax gpgpass syn match GpgPassword /\%(^\)\@<=\S\+/ conceal cchar=*
+autocmd Syntax gpgpass syn match GpgPasswordQuoted /\%(^\)\@<=".\+"/ conceal cchar=*
+set conceallevel=2 concealcursor=nvc
+
if has("gui_running")
set guifont=Dejavu\ Sans\ Mono\ 10
set guioptions=aegi