mirror of
https://github.com/DictXiong/dotfiles.git
synced 2024-11-24 11:07:00 +08:00
Dev (#7)
* install more packages * msys2/unzip * l show better time; vim return to the last position
This commit is contained in:
parent
5de5acc6c4
commit
439ef015e5
9
.vimrc2
9
.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
|
||||
|
|
1
.zshrc2
1
.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
|
||||
|
|
31
tools/msys2.sh
Executable file
31
tools/msys2.sh
Executable file
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [[ $USER != "root" ]]; then
|
||||
echo "must run as root!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set_mirror()
|
||||
{
|
||||
# MIRROR=${1:-"mirrors.tuna.tsinghua.edu.cn"}
|
||||
# MIRROR=${MIRROR//\//\\\/}
|
||||
# sed -i 's/(archive|security).ubuntu.com/${MIRROR}/g' /etc/apt/sources.list
|
||||
echo "to do ..."
|
||||
}
|
||||
|
||||
pacman_S()
|
||||
{
|
||||
pacman -Syu
|
||||
pacman -S tmux git zsh curl vim wget base-devel mingw-w64-x86_64-toolchain make cmake gcc zip unzip
|
||||
}
|
||||
|
||||
router()
|
||||
{
|
||||
case $1 in
|
||||
pacman-S ) pacman_S ;;
|
||||
set-mirror ) set_mirror $2 ;;
|
||||
* ) echo unknown command "$1". available: pacman-S, set-mirror ;;
|
||||
esac
|
||||
}
|
||||
|
||||
router $@
|
|
@ -19,13 +19,8 @@ apt_install()
|
|||
for i in {man-db,vim,ca-certificates}; do apt install $i -y; done
|
||||
|
||||
# mass installation
|
||||
apt update
|
||||
apt install git tmux zsh curl wget dialog net-tools dnsutils netcat traceroute sudo python3 python3-pip cron inetutils-ping openssh-client openssh-server htop gcc g++ cmake make
|
||||
apt install git tmux zsh curl wget dialog net-tools dnsutils netcat traceroute sudo python3 python3-pip cron inetutils-ping openssh-client openssh-server htop gcc g++ cmake make zip
|
||||
for i in {fzf,ripgrep}; do apt install $i -y; done
|
||||
|
||||
# who am i
|
||||
git config --global user.email "me@beardic.cn"
|
||||
git config --global user.name "Dict Xiong"
|
||||
}
|
||||
|
||||
set_timezone()
|
||||
|
|
Loading…
Reference in New Issue
Block a user