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