1

Small tweaks to make vim behave on macos

This commit is contained in:
Evan Pratten 2024-05-29 16:44:56 -04:00
parent 1c9befe065
commit cab300cfd4
2 changed files with 8 additions and 1 deletions

View File

@ -105,6 +105,7 @@ alias cls=clear
alias snvim="sudoedit" alias snvim="sudoedit"
alias genuuid="python -c 'import uuid; print(uuid.uuid4())'" alias genuuid="python -c 'import uuid; print(uuid.uuid4())'"
alias nvim-tmp="$EDITOR $(mktemp)" alias nvim-tmp="$EDITOR $(mktemp)"
alias vim-tmp="$EDITOR $(mktemp)"
# Some aliases only make sense if their parent command exists # Some aliases only make sense if their parent command exists
[[ -x "$(command -v wg)" ]] && alias wg-easykeys="wg genkey | tee >(wg pubkey)" [[ -x "$(command -v wg)" ]] && alias wg-easykeys="wg genkey | tee >(wg pubkey)"
@ -212,7 +213,9 @@ fi
if [ -n "$ZSH_VERSION" ]; then if [ -n "$ZSH_VERSION" ]; then
# Ctrl + Arrow # Ctrl + Arrow
bindkey "\e[1;5C" forward-word bindkey "\e[1;5C" forward-word
bindkey "^[[1;5C" forward-word
bindkey "\e[1;5D" backward-word bindkey "\e[1;5D" backward-word
bindkey "^[[1;5D" backward-word
# Ctrl + Delete # Ctrl + Delete
bindkey "\e[3;5~" kill-word bindkey "\e[3;5~" kill-word

View File

@ -28,7 +28,11 @@ inoremap <C-Del> <Esc>lcw
nnoremap <C-Del> cw<Esc>l nnoremap <C-Del> cw<Esc>l
" Force VIM to use system clipboard " Force VIM to use system clipboard
set clipboard=unnamedplus if has("macunix")
set clipboard=unnamed
else
set clipboard=unnamedplus
endif
" Enable per-project vimrc files " Enable per-project vimrc files
set exrc set exrc