From 30f82eddf9a7df571461c548195453a164216b02 Mon Sep 17 00:00:00 2001 From: Dict Xiong Date: Wed, 25 May 2022 19:46:58 +0800 Subject: [PATCH] l show better time; vim return to the last position --- .vimrc2 | 9 +++++++++ .zshrc2 | 1 + 2 files changed, 10 insertions(+) diff --git a/.vimrc2 b/.vimrc2 index 7890204..9618562 100644 --- a/.vimrc2 +++ b/.vimrc2 @@ -31,3 +31,12 @@ au InsertEnter * hi User3 ctermfg=15 ctermbg=5 au InsertLeave * hi User3 ctermfg=15 ctermbg=2 set statusline=%3*\ %{mode()}\ %*[%n][%F](%{\"\".(&fenc==\"\"?&enc:&fenc).((exists(\"+bomb\")\ &&\ &bomb)?\"+\":\"\").\"\"},%{&ff},%Y)%2*%r%1*%m%*%<%=\'0x%B\'\ [Line:%l/%L,Col:%c][%p%%] +" When editing a file, always jump to the last known cursor position. +" Don't do it when the position is invalid, when inside an event handler +" (happens when dropping a file on gvim) and for a commit message (it's +" likely a different one than last time). +" Taken from /usr/share/vim/vim81/defaults.vim +autocmd BufReadPost * + \ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit' + \ | exe "normal! g`\"" + \ | endif diff --git a/.zshrc2 b/.zshrc2 index 95622cd..26fc2c2 100644 --- a/.zshrc2 +++ b/.zshrc2 @@ -95,6 +95,7 @@ alias "se"='sudo -sE' alias "pbd"='ping baidu.com' alias "p114"='ping 114.114.114.114' alias "p666"='ping6 2001:da8::666' +alias l='ls -lah --time-style="+%y-%m-%d %H:%M"' # key bindings bindkey "^b" beginning-of-line