Created
August 24, 2018 12:26
-
-
Save alexshires/10f0b107cd4c70b2569da1b3554e01d7 to your computer and use it in GitHub Desktop.
configfiles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --------------------- | |
# Configuration | |
# --------------------- | |
# use UTF8 unicode | |
set -g utf8 | |
set-window-option -g utf8 on | |
set -g status-utf8 on | |
# make tmux display things in 256 colors | |
# local .bashrc needs to have: export TERM=xterm-256color | |
set -g default-terminal "xterm-256color" | |
# set scrollback history to 10000 (10k) | |
set -g history-limit 10000 | |
# shorten command delay | |
set -sg escape-time 1 | |
# visual notification of activity in other windows | |
setw -g monitor-activity on | |
set -g visual-activity on | |
# set window and pane index to 1 (0 by default) | |
set-option -g base-index 1 | |
setw -g pane-base-index 1 | |
#bind $ rename-session | |
# --------------------- | |
# New Keyboard Bindings | |
# --------------------- | |
# set Ctrl-a as the default prefix key combination | |
# and unbind C-b to free it up | |
set -g prefix C-a | |
unbind C-b | |
# use send-prefix to pass C-a through to application | |
bind C-a send-prefix | |
# rebind clear screen with Ctrl-l | |
bind C-l send-keys 'C-l' | |
# reload ~/.tmux.conf using PREFIX r | |
bind r source-file ~/.tmux.conf \; display "Config reloaded" | |
# use PREFIX | to split window horizontally and PREFIX - to split vertically | |
bind \ split-window -h -c "#{pane_current_path}" | |
bind | split-window -h -c "#{pane_current_path}" | |
bind - split-window -v -c "#{pane_current_path}" | |
bind _ split-window -v -c "#{pane_current_path}" | |
# make the current window the first window | |
bind T swap-window -t 1 | |
#keep directory on new window | |
bind c new-window -c "#{pane_current_path}" | |
# setup tab to switch windows | |
bind tab last-window | |
# map pane switching with ALT+Arrow keys | |
bind -n M-Left select-pane -L | |
bind -n M-Right select-pane -R | |
bind -n M-Up select-pane -U | |
bind -n M-Down select-pane -D | |
# toggle zoom | |
bind b break-pane | |
# join windows | |
bind-key j command-prompt -p "join pane from:" "join-pane -s '%%'" | |
bind-key s command-prompt -p "send pane to:" "join-pane -t '%%'" | |
# toggle mouse on | |
unbind-key -n F8 | |
bind-key -n F8 \ | |
set -g mode-mouse on \;\ | |
set -g mouse-resize-pane on \;\ | |
set -g mouse-select-pane on \;\ | |
set -g mouse-select-window on \;\ | |
display 'Mouse: ON' | |
# 9/16/2014 5:04:08 PMtoggle mouse off | |
unbind-key -n F9 | |
bind-key -n F9 \ | |
set -g mode-mouse off \;\ | |
set -g mouse-resize-pane off \;\ | |
set -g mouse-select-pane off \;\ | |
set -g mouse-select-window off \;\ | |
display 'Mouse: OFF' | |
# --------------------- | |
# Mouse | |
# --------------------- | |
# switch panes by using the mouse (turns off the ability to select text for local clipboard copy!) | |
# setw -g mouse-utf8 on | |
# set -g mode-mouse on | |
# setw -g mode-mouse on | |
# set -g terminal-overrides 'xterm*:smcup@:rmcup@' | |
# set-option -g mouse-select-pane on | |
# setw -g mouse-select-window on | |
# setw -g mouse-resize-pane on | |
# OR explicitly disable mouse control | |
#setw -g mode-mouse off | |
#set -g mouse-select-pane off | |
#set -g mouse-resize-pane off | |
#set -g mouse-select-window off | |
# --------------------- | |
# Copy & Paste | |
# --------------------- | |
# setup reattach-to-user-namespace for copy and paste | |
# set-option -g default-command "reattach-to-user-namespace -l $SHELL" | |
# set-window-option -g automatic-rename on | |
# --------------------- | |
# VIM | |
# --------------------- | |
# use vim keybindings in copy mode | |
# setw -g mode-keys vi | |
# setup 'v' to begin selection as in Vim | |
# bind-key -t vi-copy v begin-selection | |
# bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy" | |
# update default binding of 'Enter' to also use copy-pipe | |
# unbind -t vi-copy Enter | |
# bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy" | |
# bind y run 'tmux save-buffer - | reattach-to-user-namespace pbcopy ' | |
# bind C-y run 'tmux save-buffer - | reattach-to-user-namespace pbcopy ' | |
# set copy-mode settings | |
# bind [ copy-mode | |
# bind -t vi-copy v begin-selection | |
# bind -t vi-copy y copy-selection | |
# bind -t vi-copy V rectangle-toggle | |
# bind ] paste-buffer | |
# map Vi movement keys as pane movement keys | |
# bind h select-pane -L | |
# bind j select-pane -D | |
# bind k select-pane -U | |
# bind l select-pane -R | |
# and use C-h and C-l to cycle thru panes | |
# bind -r C-h select-window -t :- | |
# bind -r C-l select-window -t :+ | |
# resize panes using PREFIX H, J, K, L | |
# bind H resize-pane -L 5 | |
# bind J resize-pane -D 5 | |
# bind K resize-pane -U 5 | |
# bind L resize-pane -R 5 | |
# ---------------------- | |
# Pane Highlighting | |
# ---------------------- | |
# Options: black red yellow green blue magenta cyan white | |
# or write "colour\d+", e.g. "colour5" or "colour170" | |
# | |
# set pane colors - hilight the active pane | |
# inactive border | |
set-option -g pane-border-fg colour235 # dark gray | |
set-option -g pane-border-bg colour233 # super dark gray | |
# active border | |
set-option -g pane-active-border-fg white # white | |
set-option -g pane-active-border-bg colour233 # super dark gray | |
# ---------------------- | |
# Status Bar | |
# ----------------------- | |
set-option -g status on # turn the status bar on | |
set -g status-interval 1 # set update frequencey (default 15 seconds) | |
set -g status-justify centre # center window list for clarity | |
# set-option -g status-position top # position the status bar at top of screen | |
# set color for status bar | |
# set-option -g status-attr dim | |
set-option -g status-bg colour234 | |
set-option -g status-fg white | |
# status left options | |
set-option -g status-left-length 80 | |
set-option -g status-left "#[fg=colour240](#[bg=default,fg=colour255]#H#[fg=colour240])-(#[bg=default,fg=colour39]#S#[fg=colour240])" | |
# window list options | |
setw -g automatic-rename on | |
set-window-option -g window-status-format '#[fg=colour51,dim]#I#[fg=colour32]:#[fg=colour253]#W#[fg=colour253,dim]#F' | |
set-window-option -g window-status-current-format '#[bg=colour25,fg=colour51,bold]#I#[bg=colour25,fg=colour32]:#[fg=colour230]#W#[fg=dim]#F' | |
set -g base-index 1 | |
# status right options | |
set-option -g status-right-length 80 | |
set -g status-right "#[fg=colour240](#[fg=colour39]%a %b %-m %Y#[fg=colour240])-(#[fg=colour255]%-I:%M:%S%P#[fg=colour240])" | |
# ---------------------- | |
# Scripts | |
# ----------------------- | |
# bind h source-file ~/.tmux/myfile | |
# show host name and IP address on left side of status bar | |
set -g status-left-length 70 | |
set -g status-left "#[fg=green]: #h : #[fg=yellow]#(ifconfig en0 | grep 'inet ' | awk '{print \"en0 \" $2}') #(ifconfig en1 | grep 'inet ' | awk '{print \"en1 \" $2}') #[fg=red]#(ifconfig tun0 | grep 'inet ' | awk '{print \"vpn \" $2}') " | |
# show session name, window & pane number, date and time on right side of | |
# status bar | |
set -g status-right-length 60 | |
set -g status-right "#[fg=blue]#S #I:#P #[fg=yellow]:: %d %b %Y #[fg=green]:: %l:%M %p :: #(date -u | awk '{print $4}')::"# | |
run-shell ~/tmux-resurrect/resurrect.tmux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if has('python3') | |
silent! python3 1 | |
endif | |
execute pathogen#infect() | |
syntax on | |
filetype plugin indent on | |
set nocompatible | |
set history=1000 | |
set autoread | |
set so=7 | |
set nu | |
" more natural table completion | |
set wildmode=longest,list,full | |
" Turn on the WiLd menu | |
set wildmenu | |
" Ignore compiled files | |
set wildignore=*.o,*~,*.pyc,*.so,*.d,*.class | |
"Always show current position | |
set ruler | |
" Height of the command bar | |
set cmdheight=1 | |
" A buffer becomes hidden when it is abandoned | |
set hid | |
" Configure backspace so it acts as it should act | |
set backspace=eol,start,indent | |
" Ignore case when searching | |
set ignorecase | |
" When searching try to be smart about cases | |
set smartcase | |
" Highlight search results | |
set hlsearch | |
" Makes search act like search in modern browsers | |
set incsearch | |
" Don't redraw while executing macros (good performance config) | |
set lazyredraw | |
" For regular expressions turn magic on | |
set magic | |
" Show matching brackets when text indicator is over them | |
set showmatch | |
" How many tenths of a second to blink when matching brackets | |
set mat=2 | |
" No annoying sound on errors | |
set noerrorbells | |
set novisualbell | |
set t_vb= | |
set tm=500 | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" => Colors and Fonts | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Enable syntax highlighting | |
syntax enable | |
set background=dark | |
colorscheme solarized | |
let g:solarized_termcolors=256 | |
" set background=dark | |
" Bright CursorLine | |
"hi Cursorline term=bold term=bold | |
"set cursorline | |
" Set utf8 as standard encoding and en_US as the standard language | |
set encoding=utf8 | |
" Use Unix as the standard file type | |
set ffs=unix,mac,dos | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" => Files, backups and undo | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Turn backup off, since most stuff is in SVN, git et.c anyway... | |
set nobackup | |
set nowb | |
set noswapfile | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" => Text, tab and indent related | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Use spaces instead of tabs | |
set expandtab | |
" Be smart when using tabs ;) | |
set smarttab | |
" 1 tab == 4 spaces | |
set shiftwidth=4 | |
set tabstop=4 | |
" Linebreak on 80 characters | |
"#set lbr | |
"#set tw=100 | |
set ai "Auto indent | |
set si "Smart indent | |
"set wrap "Wrap lines | |
"Colourcolumn | |
"if exists('+cc') | |
" set cc=100 | |
"endif | |
" Remember info about open buffers on close | |
set viminfo^=% | |
"""""""""""""""""""""""""""""" | |
" => Status line | |
"""""""""""""""""""""""""""""" | |
" Always show the status line | |
set laststatus=2 | |
" Format the status line | |
set statusline=\ %F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l%4v | |
"set statusline+=%#warningmsg# | |
"set statusline+=%{SyntasticStatuslineFlag()} | |
"set statusline+=%* | |
let g:syntastic_always_populate_loc_list = 1 | |
let g:syntastic_auto_loc_list = 1 | |
let g:syntastic_check_on_open = 0 | |
let g:syntastic_check_on_wq = 0 | |
let g:ycm_global_ycm_extra_conf = '~/.vim/ycm.py' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment