This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Check_readonly() | |
if &readonly | |
highlight Normal ctermfg=white ctermbg=gray | |
else | |
highlight Normal ctermfg=white ctermbg=black | |
endif | |
endfunction | |
autocmd BufEnter * :call Check_readonly() | |
autocmd BufReadPost * :call Check_readonly() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [[ -f "$SSH_AGENT_FILE" ]]; then | |
source "$SSH_AGENT_FILE" > /dev/null | |
ssh-add -l > /dev/null | |
if [[ "$?" -gt 1 ]]; then | |
if ssh-agent -t "${sshagent_time:-2d}" > "$SSH_AGENT_FILE"; then | |
source "$SSH_AGENT_FILE" > /dev/null | |
else | |
echo "Can't start ssh-agent or write ${SSH_AGENT_FILE}: $?" | |
fi | |
fi |
OlderNewer