diff --git a/vim/crypted.vim b/vim/crypted.vim new file mode 100644 index 0000000..9bed701 --- /dev/null +++ b/vim/crypted.vim @@ -0,0 +1,20 @@ + + +set cursorline +"hi CursorLine ctermbg=Black ctermfg=White +"hi Normal ctermbg=Black ctermfg=Black + +function! Hide () + hi CursorLine ctermbg=NONE ctermfg=White + hi Normal ctermbg=Black ctermfg=Black +endfunction +function! Nohide () + hi CursorLine ctermbg=NONE ctermfg=White + hi Normal ctermbg=NONE ctermfg=Gray +endfunction + +map h :call Hide() +map H :call Nohide() +set laststatus=2 +set statusline=%f\ %=\ (h/H)\ (%v,%l) +call Nohide() diff --git a/vim/vimcrypted b/vim/vimcrypted index 0588031..40e296f 100755 --- a/vim/vimcrypted +++ b/vim/vimcrypted @@ -37,10 +37,10 @@ then echo "File $1 does not exist. Creating empty file" else gpg --decrypt "$1" > "$unc" fi - +LIB=$( dirname $( readlink -f $0 ) )/crypted.vim edit=`date +%s -r $unc` if [ -s "$unc" ] -then vim -i NONE -n "$unc" +then vim -i NONE -S "$LIB" -n "$unc" else echo Error in decrypting $RM "$unc" exit 1