From 0e39019e63f0ba56856f6eacde82f753b810502c Mon Sep 17 00:00:00 2001 From: Autumn Naber Date: Thu, 16 Feb 2023 17:00:39 -0800 Subject: [PATCH] Added better tmux defaults, gitconfig, and vimrc with improved setup script --- gitconfig | 2 ++ setup.sh | 12 +++++++++++- tmux.conf | 29 ++++++++++++++++++----------- vimrc | 15 +++++++++++++++ 4 files changed, 46 insertions(+), 12 deletions(-) diff --git a/gitconfig b/gitconfig index 39d6d91..bc52fdc 100644 --- a/gitconfig +++ b/gitconfig @@ -5,6 +5,8 @@ tool = vimdiff [difftool] prompt = false +[alias] + df = difftool [merge] tool = fugitive [mergetool] diff --git a/setup.sh b/setup.sh index d8440ca..156dfbc 100755 --- a/setup.sh +++ b/setup.sh @@ -13,9 +13,19 @@ fi cat bash_profile_ext >> $HOME/.bash_profile +if [ ! "$(ls -A ./vim/bundle/taglist)" ]; then + echo "Pulling tags, since you're lazy..." + git submodule init + git submodule update +fi + copy_list=(ctags dircolors gitconfig inputrc tmux.conf vim vimrc Xdefaults) for config in ${copy_list[@]}; do - cp -r "$config" $HOME/."$config" + cp -fr "$config" $HOME/."$config" done +echo "==========================================================" +echo "= Be sure to adjust the Git user/email as necessary!!!!! =" +echo "==========================================================" +echo "" echo "Please log out and log back in for changes to take effect." diff --git a/tmux.conf b/tmux.conf index 57fdc07..fd86887 100644 --- a/tmux.conf +++ b/tmux.conf @@ -1,3 +1,9 @@ +# set scrollback size +set -g history-limit 10000 + +# Pass through xterm keys to the terminal +set-window-option -g xterm-keys on + # split panes using | and - bind | split-window -h bind - split-window -v @@ -13,10 +19,11 @@ bind -n M-Right select-pane -R bind -n M-Up select-pane -U bind -n M-Down select-pane -D +# Disable escape timer (don't use on slow networks) +set-option -s escape-time 0 + # Enable mouse control (clickable windows, panes, resizable panes) -set -g mouse-select-window on -set -g mouse-select-pane on -set -g mouse-resize-pane on +set -g mouse on ###################### ### DESIGN CHANGES ### @@ -34,25 +41,25 @@ setw -g clock-mode-colour colour5 setw -g mode-style 'fg=colour1 bg=colour18 bold' # panes -set -g pane-border-style 'fg=colour19 bg=colour0' -set -g pane-active-border-style 'bg=colour0 fg=colour9' +set -g pane-border-style 'fg=colour7 bg=colour0' +set -g pane-active-border-style 'bg=colour0 fg=colour7' # statusbar set -g status-position bottom set -g status-justify left -set -g status-style 'bg=colour18 fg=colour137 dim' +set -g status-style 'bg=colour18 fg=colour7' set -g status-left '' -set -g status-right '#[fg=colour233,bg=colour19] %d/%m #[fg=colour233,bg=colour8] %H:%M:%S ' +set -g status-right '#[fg=colour7,bg=colour237] %H:%M:%S ' set -g status-right-length 50 set -g status-left-length 20 -setw -g window-status-current-style 'fg=colour1 bg=colour19 bold' -setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F ' +setw -g window-status-current-style 'fg=colour43 bg=colour237' +setw -g window-status-current-format ' #I#[fg=colour7]:#[fg=colour7]#W#[fg=colour7]#F ' -setw -g window-status-style 'fg=colour9 bg=colour18' +setw -g window-status-style 'fg=colour9 bg=colour242' setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F ' setw -g window-status-bell-style 'fg=colour255 bg=colour1 bold' # messages -set -g message-style 'fg=colour232 bg=colour16 bold' +set -g message-style 'fg=colour237 bg=colour6 bold' diff --git a/vimrc b/vimrc index 683d87f..86c2202 100644 --- a/vimrc +++ b/vimrc @@ -29,6 +29,14 @@ map :vsp :exec("tag ".expand("")) silent! helptags ALL " +if &term =~ '^screen' + " tmux will send xterm-style keys when its xterm-keys option is on + execute "set =\e[1;*A" + execute "set =\e[1;*B" + execute "set =\e[1;*C" + execute "set =\e[1;*D" +endif + " Nerdtree nnoremap n :NERDTreeFocus nnoremap :NERDTreeToggle @@ -80,6 +88,13 @@ let g:syntastic_check_on_open = 0 let g:syntastic_check_on_wq = 0 nnoremap :SyntasticToggleMode +"" Optional. Configure before enabling +" let g:syntastic_cpp_checkers = ['clang_tidy'] +" let g:syntastic_c_checkers = ['clang_tidy'] +" let g:syntastic_cpp_clang_tidy_post_args = "" +" autocmd FileType cpp if stridx(expand("%:p"), "/home/anaber/work/trenton/") == 0 | +" \ let g:syntastic_cpp_clang_tidy_args = "-p /home/anaber/work/trenton" | endif + " vim-airline let g:airline#extensions#whitespace#enabled = 0 if !exists('g:airline_symbols')