remove vimrc from zsh-setup; simplify zshrc

This commit is contained in:
sup39 2021-05-12 21:35:23 +09:00
parent 99d5cb409d
commit a137182b35
3 changed files with 5 additions and 21 deletions

View file

@ -8,7 +8,7 @@ source $HOME/.zshrc
Alternatively, use the shortened url: Alternatively, use the shortened url:
```zsh ```zsh
# Download setup file and execute it # Download setup file and execute it
curl -L 301.sup39.ml/zsh-setup | sh - curl -sL 301.sup39.ml/zsh-setup | sh -
# Finally, source the zshrc file # Finally, source the zshrc file
source $HOME/.zshrc source $HOME/.zshrc
@ -21,12 +21,7 @@ source $HOME/.zshrc
``` ```
## Content ## Content
- `~/.zshenv`
### zshrc
- `~/.zshrc` - `~/.zshrc`
### [vimrc](https://github.com/sup39/vimrc)
- `~/.vim/sup39`
- `~/.vimrc`
:bulb: No overwriting if exists :bulb: No overwriting if exists

View file

@ -3,11 +3,3 @@
[ -f $HOME/.zshrc ] || curl https://raw.githubusercontent.com/sup39/zsh-setup/master/zshrc -o $HOME/.zshrc [ -f $HOME/.zshrc ] || curl https://raw.githubusercontent.com/sup39/zsh-setup/master/zshrc -o $HOME/.zshrc
# .zshenv # .zshenv
[ -f $HOME/.zshenv ] || curl https://raw.githubusercontent.com/sup39/zsh-setup/master/zshenv -o $HOME/.zshenv [ -f $HOME/.zshenv ] || curl https://raw.githubusercontent.com/sup39/zsh-setup/master/zshenv -o $HOME/.zshenv
# .vim/sup39
[ -d $HOME/.vim/sup39 ] || git clone https://github.com/sup39/vimrc $HOME/.vim/sup39
# .vimrc
[ -f $HOME/.vimrc ] || cat >$HOME/.vimrc <<EOF
" source $HOME/.vim/sup39/plug.vim
source $HOME/.vim/sup39/vimrc
EOF

9
zshrc
View file

@ -14,14 +14,12 @@ setopt appendhistory
bindkey -v bindkey -v
# imap jk to <ESC> # imap jk to <ESC>
bindkey -Mviins -s jk '\e' bindkey -Mviins -s jk '\e'
# map ¥ to \
bindkey -Mvicmd -s r¥ 'r\'
bindkey -Mviins -s ¥ '\\'
## Edit ## Edit
# edit zshrc # edit zshrc
vizr() {vi $HOME/.zshrc && source $HOME/.zshrc} vizr() {vi $HOME/.zshrc && source $HOME/.zshrc}
sczr() {source $HOME/.zshrc} # edit zshenv
vize() {vi $HOME/.zshenv && . $HOME/.zshenv}
# edit zprofile # edit zprofile
vizp() {vi $HOME/.zprofile && . $HOME/.zprofile} vizp() {vi $HOME/.zprofile && . $HOME/.zprofile}
# edit vimrc # edit vimrc
@ -55,5 +53,4 @@ zle -N zle-keymap-select
## Alias ## Alias
alias vi='vim' alias vi='vim'
alias curl-json='curl -H"Content-Type:application/json"' alias ls='ls --color=auto'
alias rand-sel='shuf -n1 -e --'