[vim] back to vim
This commit is contained in:
parent
a1c5f0b62a
commit
94feefebdb
6 changed files with 9 additions and 28 deletions
|
@ -1,8 +0,0 @@
|
||||||
#!/usr/bin/env zsh
|
|
||||||
|
|
||||||
if type "/usr/bin/nvim" > /dev/null; then
|
|
||||||
command /usr/bin/nvim "$@"
|
|
||||||
else
|
|
||||||
command /usr/bin/vim "$@"
|
|
||||||
fi
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
status = auto
|
status = auto
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
editor = select-vim
|
editor = vim
|
||||||
|
|
||||||
[diff]
|
[diff]
|
||||||
compactionHeuristic = true
|
compactionHeuristic = true
|
||||||
|
|
7
install
7
install
|
@ -16,7 +16,6 @@ git submodule update --init --recursive
|
||||||
|
|
||||||
rm -rf \
|
rm -rf \
|
||||||
$HOME/.config/gtk-3.0/gtk.css \
|
$HOME/.config/gtk-3.0/gtk.css \
|
||||||
$HOME/.config/nvim \
|
|
||||||
$HOME/.gemrc \
|
$HOME/.gemrc \
|
||||||
$HOME/.gitconfig \
|
$HOME/.gitconfig \
|
||||||
$HOME/.grcat \
|
$HOME/.grcat \
|
||||||
|
@ -40,10 +39,7 @@ ln -s $DOTFILES/zshrc $HOME/.zshrc
|
||||||
curl -fLo $DOTFILES/vim/autoload/plug.vim --create-dirs \
|
curl -fLo $DOTFILES/vim/autoload/plug.vim --create-dirs \
|
||||||
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||||
|
|
||||||
if [ -x "$(command -v nvim)" ]; then VIM=nvim
|
/usr/bin/env vim +PlugInstall +qa
|
||||||
elif [ -x "$(command -v vim)" ]; then VIM=vim; fi
|
|
||||||
|
|
||||||
if [ -n "$VIM" ]; then /usr/bin/env $VIM +PlugInstall +qa; fi
|
|
||||||
|
|
||||||
if [[ `uname` == 'Darwin' ]]; then
|
if [[ `uname` == 'Darwin' ]]; then
|
||||||
defaults write com.apple.dock autohide-delay -float 86400; killall Dock
|
defaults write com.apple.dock autohide-delay -float 86400; killall Dock
|
||||||
|
@ -53,4 +49,3 @@ fi
|
||||||
cd $HOME
|
cd $HOME
|
||||||
rm -f $HOME/.zcompdump*
|
rm -f $HOME/.zcompdump*
|
||||||
exec zsh
|
exec zsh
|
||||||
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
vimrc
|
|
10
vim/vimrc
10
vim/vimrc
|
@ -1,10 +1,6 @@
|
||||||
if has('nvim')
|
filetype detect
|
||||||
filetype on
|
set nocompatible
|
||||||
else
|
set ttyfast
|
||||||
filetype detect
|
|
||||||
set nocompatible
|
|
||||||
set ttyfast
|
|
||||||
endif
|
|
||||||
|
|
||||||
filetype plugin on
|
filetype plugin on
|
||||||
filetype indent on
|
filetype indent on
|
||||||
|
|
9
zshrc
9
zshrc
|
@ -9,7 +9,7 @@ fpath=($DOTFILES/vendor/zsh-users/zsh-completions/src $fpath)
|
||||||
unalias -m "*"
|
unalias -m "*"
|
||||||
|
|
||||||
export CLICOLOR=1
|
export CLICOLOR=1
|
||||||
export EDITOR=select-vim
|
export EDITOR=vim
|
||||||
export KEYTIMEOUT=1
|
export KEYTIMEOUT=1
|
||||||
export QUOTING_STYLE=literal
|
export QUOTING_STYLE=literal
|
||||||
export TERM=xterm-256color
|
export TERM=xterm-256color
|
||||||
|
@ -159,9 +159,9 @@ alias ts='tmuxinator start'
|
||||||
alias uuid='uuidgen'
|
alias uuid='uuidgen'
|
||||||
|
|
||||||
# Vim aliases
|
# Vim aliases
|
||||||
alias v='select-vim'
|
alias v='env vim'
|
||||||
alias vd='select-vim -d'
|
alias vd='env vim -d'
|
||||||
alias vp='select-vim -p'
|
alias vp='env vim -p'
|
||||||
|
|
||||||
vim() { echo "\033[0;31mWasted 2 keystrokes. Use \`v\` instead.\033[0m" }
|
vim() { echo "\033[0;31mWasted 2 keystrokes. Use \`v\` instead.\033[0m" }
|
||||||
vimdiff() { echo "\033[0;31mWasted 5 keystrokes. Use \`vd\` instead.\033[0m" }
|
vimdiff() { echo "\033[0;31mWasted 5 keystrokes. Use \`vd\` instead.\033[0m" }
|
||||||
|
@ -248,4 +248,3 @@ bindkey '\eOA' history-substring-search-up
|
||||||
bindkey '\eOB' history-substring-search-down
|
bindkey '\eOB' history-substring-search-down
|
||||||
bindkey -M vicmd 'k' history-substring-search-up
|
bindkey -M vicmd 'k' history-substring-search-up
|
||||||
bindkey -M vicmd 'j' history-substring-search-down
|
bindkey -M vicmd 'j' history-substring-search-down
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue