diff --git a/.tmux.conf b/tmux.conf similarity index 66% rename from .tmux.conf rename to tmux.conf index b539856..11d07e8 100644 --- a/.tmux.conf +++ b/tmux.conf @@ -4,5 +4,10 @@ set -g prefix Home # Keep Ctrl+B available as an alternative. set -g prefix2 C-b +# Hook that runs :q! in all panes before a session is killed +# to avoid Vim swapfiles. +#set-hook -g + + # Reload config. bind M-r source-file ~/.tmux.conf diff --git a/.vimrc b/vimrc similarity index 78% rename from .vimrc rename to vimrc index f5668d4..efacc7b 100644 --- a/.vimrc +++ b/vimrc @@ -30,11 +30,10 @@ set encoding=utf8 filetype plugin indent on " Make tabs as wide as two spaces -set tabstop=2 +set tabstop=2 shiftwidth=0 softtabstop=2 noexpandtab " Copy indentation from previous line -set smartindent -set autoindent +set autoindent nosmartindent nocindent indentexpr= " Show the current mode set showmode @@ -45,11 +44,12 @@ set title " Show the (partial) command as it’s being typed set showcmd -" Centralize backups, swapfiles and undo history -set backupdir=~/.vim/backups -set directory=~/.vim/swaps +" Centralize backups, swapfiles and undo history; +" double slashes enable collision-avoidance. +set backupdir=~/.vim/backups// +set directory=~/.vim/swaps// if exists("&undodir") - set undodir=~/.vim/undo + set undodir=~/.vim/undo// endif " :W sudo saves the file (useful for handling the permission-denied error)