cat > ~/.tmux.conf << EOF
# -- general -------------------------------------------------------------------
set -g default-terminal "screen-256color" # colors!
setw -g xterm-keys on
set -s escape-time 10 # faster command sequences
set -sg repeat-time 600 # increase repeat timeout
set -q -g status-utf8 on # expect UTF-8 (tmux < 2.2)
setw -q -g utf8 on
set -g history-limit 5000 # boost history
# -- display -------------------------------------------------------------------
set -g base-index 1 # start windows numbering at 1
setw -g pane-base-index 1 # make pane numbering consistent with windows
setw -g automatic-rename on # rename window to reflect current program
set -g renumber-windows on # renumber windows when a window is closed
set -g set-titles on # set terminal title
set -g display-panes-time 800 # slightly longer pane indicators display time
set -g display-time 1000 # slightly longer status messages display time
set -g status-interval 10 # redraw status line every 10 seconds
# clear both screen and history
bind -n C-l send-keys C-l \; run 'sleep 0.1' \; clear-history
# activity
set -g monitor-activity on
set -g visual-activity off
# -- nvigation ----------------------------------------------------------------
# create session
bind C-c new-session
# find session
bind C-f command-prompt -p find-session 'switch-client -t %%'
# split current window horizontally
bind - split-window -v
# split current window vertically
bind _ split-window -h
# pane navigation
bind -r h select-pane -L # move left
bind -r j select-pane -D # move down
bind -r k select-pane -U # move up
bind -r l select-pane -R # move right
bind > swap-pane -D # swap current pane with the next one
bind < swap-pane -U # swap current pane with the previous one
#pane resizing
bind -r H resize-pane -L 2
bind -r J resize-pane -D 2
bind -r K resize-pane -U 2
bind -r L resize-pane -R 2
# window navigation
unbind n
unbind p
bind -r C-h previous-window # select previous window
bind -r C-l next-window # select next window
bind Tab last-window # move to last active window
EOF
cat > ~/.vimrc << EOF
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
" Open file type detection
filetype on
" Load the corresponding plugin according to the detected different types
filetype plugin on
" Always show the status bar
set laststatus=2
" Display the current position of the cursor
set ruler
" Turn on line number display
set number
" Highlight current row/column
set cursorline
" set cursorcolumn
" Highlight search results
set hlsearch
" Prohibition of folding
set nowrap
" Turn on syntax highlighting
syntax enable
" Allows replacement of default schemes with the specified syntax highlighting scheme
syntax on
" Adaptive smart indentation in different languages
filetype indent on
" Extend tabs to spaces
set expandtab
" Set tabs to occupy spaces when editing
set tabstop=2
" Set the number of spaces occupied by tabs when formatting
set shiftwidth=2
" Let vim treat a continuous number of spaces as a tab
set softtabstop=2
" Code folding based on indentation or grammar
"set foldmethod=indent
set foldmethod=syntax
" Turn off folding code when starting vim
set nofoldenable
EOF