tmux maintain directory, bash collapse PWD, vi-mode indicator #1
							
								
								
									
										64
									
								
								bashrc
									
									
									
									
									
								
							
							
						
						
									
										64
									
								
								bashrc
									
									
									
									
									
								
							| @ -4,22 +4,11 @@ set -o vi | |||||||
| # If not running interactively, don't do anything | # If not running interactively, don't do anything | ||||||
| [ -z "$PS1" ] && return | [ -z "$PS1" ] && return | ||||||
| 
 | 
 | ||||||
| # shopt -s checkwinsize |  | ||||||
| [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" |  | ||||||
| 
 |  | ||||||
| if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then |  | ||||||
|     debian_chroot=$(cat /etc/debian_chroot) |  | ||||||
| fi |  | ||||||
| 
 |  | ||||||
| # set a fancy prompt (non-color, unless we know we "want" color) |  | ||||||
| case "$TERM" in |  | ||||||
|     xterm-color) color_prompt=yes;; |  | ||||||
| esac |  | ||||||
| # Get our git stuff | # Get our git stuff | ||||||
| source ~/code/dotfiles/git-completion.sh | source ~/code/dotfiles/git-completion.sh | ||||||
| source ~/code/dotfiles/git-prompt.sh | source ~/code/dotfiles/git-prompt.sh | ||||||
| 
 | 
 | ||||||
| force_color_prompt=yes | export PROMPT_DIRTRIM=2 | ||||||
| 
 | 
 | ||||||
| # Prompt colors | # Prompt colors | ||||||
| BGREEN='\[\033[1;32m\]' | BGREEN='\[\033[1;32m\]' | ||||||
| @ -39,62 +28,29 @@ NORMAL='\[\033[00m\]' | |||||||
| # Prompt vars | # Prompt vars | ||||||
| TIME="\@" | TIME="\@" | ||||||
| HOST="\h" | HOST="\h" | ||||||
| USER="\u" |  | ||||||
| CWD="\w" | CWD="\w" | ||||||
| PUID="\$" | PUID="\$" | ||||||
| GIT="\$(__git_ps1)" | GIT="\$(__git_ps1)" | ||||||
| 
 | 
 | ||||||
|  | # Prompt display line | ||||||
|  | PS1="${BLUE}(${GREEN}${CWD}${BLUE}) ${NORMAL}${HOST}${BRED}${GIT}${NORMAL} [$?${NORMAL}]${GREEN} ${PUID}${NORMAL} " | ||||||
| 
 | 
 | ||||||
| if [ -n "$force_color_prompt" ]; then | # Set VI mode display in prompt | ||||||
|     if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then | bind "set vi-cmd-mode-string \"\1\e[1;30m\2:\1\e[0m\2\"" | ||||||
|         color_prompt=yes | bind "set vi-ins-mode-string \"\1\e[0;36m\2+\1\e[0m\2\"" | ||||||
|     else | bind "set show-mode-in-prompt on" | ||||||
|         color_prompt= |  | ||||||
|     fi |  | ||||||
| fi |  | ||||||
| 
 | 
 | ||||||
| if [ "$color_prompt" = yes ]; then | alias ls='ls -G' | ||||||
|     PS1="${BLUE}(${GREEN}${CWD}${BLUE}) ${NORMAL}${HOST}${BRED}${GIT}${NORMAL} [$?${NORMAL}]${GREEN} ${PUID}${NORMAL} " |  | ||||||
| else |  | ||||||
|     PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' |  | ||||||
| fi |  | ||||||
| unset color_prompt force_color_prompt |  | ||||||
| 
 |  | ||||||
| # If this is an xterm set the title to user@host:dir |  | ||||||
| case "$TERM" in xterm*|rxvt*) |  | ||||||
|     PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" |  | ||||||
|     ;; *) |  | ||||||
|     ;; esac |  | ||||||
| 
 |  | ||||||
| # enable color support of ls and also add handy aliases |  | ||||||
| if [ -x /usr/bin/dircolors ]; then |  | ||||||
|     test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" |  | ||||||
|     alias ls='ls -CFX --color=auto' |  | ||||||
|     #alias dir='dir --color=auto' alias vdir='vdir --color=auto' |  | ||||||
| 
 |  | ||||||
|     alias grep='grep --color=auto' |  | ||||||
|     alias fgrep='fgrep --color=auto' |  | ||||||
|     alias egrep='egrep --color=auto'  |  | ||||||
| fi |  | ||||||
| 
 |  | ||||||
| # some more ls aliases |  | ||||||
| alias ll='ls -alF'  |  | ||||||
| alias la='ls -A'  |  | ||||||
| alias l='ls -CF' |  | ||||||
| 
 | 
 | ||||||
| #mah aliases, son | #mah aliases, son | ||||||
| alias atr0phy='ssh br4n@atr0phy.net' | alias atr0phy='ssh -D 3333 -C br4n@atr0phy.net' | ||||||
| alias at0rphy='ssh -L 9050:127.0.0.1:9050 br4n@atr0phy.net' | alias at0rphy='ssh -L 9050:127.0.0.1:9050 br4n@atr0phy.net' | ||||||
| alias evoluent='xinput --set-button-map 14 3 1 1 4 5 7 8 9 0 10 11' | alias evoluent='xinput --set-button-map 14 3 1 1 4 5 7 8 9 0 10 11' | ||||||
| alias cls='clear && ls -X --color=auto' | alias cls='clear && ls' | ||||||
| alias notes="vim +VimwikiIndex" | alias notes="vim +VimwikiIndex" | ||||||
| alias tmpvim="vim /tmp/$(uuid)" | alias tmpvim="vim /tmp/$(uuid)" | ||||||
| alias snip="scrot -s ~/Documents/screenshots/%b%d-%H:%M.png" | alias snip="scrot -s ~/Documents/screenshots/%b%d-%H:%M.png" | ||||||
| 
 | 
 | ||||||
| # Add an "alert" alias for long running commands. Use like so: |  | ||||||
| # sleep 10; alert |  | ||||||
| alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' |  | ||||||
| 
 |  | ||||||
| if [ -f /etc/bash_completion ] && ! shopt -oq posix; then | if [ -f /etc/bash_completion ] && ! shopt -oq posix; then | ||||||
|     . /etc/bash_completion |     . /etc/bash_completion | ||||||
| fi | fi | ||||||
|  | |||||||
							
								
								
									
										40
									
								
								tmux.conf
									
									
									
									
									
								
							
							
						
						
									
										40
									
								
								tmux.conf
									
									
									
									
									
								
							| @ -1,5 +1,4 @@ | |||||||
| set-option -g prefix C-a | set-option -g prefix C-a | ||||||
| bind-key C-a last-window |  | ||||||
| set -g default-terminal "screen-256color" | set -g default-terminal "screen-256color" | ||||||
| setw -g alternate-screen on | setw -g alternate-screen on | ||||||
| 
 | 
 | ||||||
| @ -25,63 +24,32 @@ set -g status-justify left | |||||||
| set -g status-bg default | set -g status-bg default | ||||||
| set -g status-fg colour12 | set -g status-fg colour12 | ||||||
| 
 | 
 | ||||||
| #window mode |  | ||||||
| setw -g mode-bg colour6 |  | ||||||
| setw -g mode-fg colour0 |  | ||||||
| 
 |  | ||||||
| # window status | # window status | ||||||
| setw -g window-status-format " #F#I:#W#F " | setw -g window-status-format " #F#I:#W#F " | ||||||
| setw -g window-status-current-format " #F#I:#W#F " | setw -g window-status-current-format " #F#I:#W#F " | ||||||
| setw -g window-status-format "#[fg=magenta]#[bg=black] #I #[bg=cyan]#[fg=colour8] #W " | setw -g window-status-format "#[fg=magenta]#[bg=black] #I #[bg=cyan]#[fg=colour8] #W " | ||||||
| setw -g window-status-current-format "#[bg=brightmagenta]#[fg=colour8] #I #[fg=colour8]#[bg=colour14] #W " | setw -g window-status-current-format "#[bg=brightmagenta]#[fg=colour8] #I #[fg=colour8]#[bg=colour14] #W " | ||||||
| setw -g window-status-current-bg colour0 |  | ||||||
| setw -g window-status-current-fg colour11 |  | ||||||
| setw -g window-status-current-attr dim |  | ||||||
| setw -g window-status-bg green |  | ||||||
| setw -g window-status-fg black |  | ||||||
| setw -g window-status-attr reverse |  | ||||||
| 
 | 
 | ||||||
| # Info on left | # Info on left | ||||||
| set -g status-left '' | set -g status-left '' | ||||||
| 
 | 
 | ||||||
| # The panes { |  | ||||||
| set -g pane-border-fg colour238 |  | ||||||
| set -g pane-active-border-fg colour51 |  | ||||||
| # } |  | ||||||
| 
 |  | ||||||
| # The statusbar { | # The statusbar { | ||||||
| set -g status-position bottom | set -g status-position bottom | ||||||
| set -g status-bg colour234 | set -g status-bg colour234 | ||||||
| set -g status-fg colour137 | set -g status-fg colour137 | ||||||
| set -g status-attr dim |  | ||||||
| set -g status-left '' | set -g status-left '' | ||||||
| set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S ' | set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S ' | ||||||
| set -g status-right-length 50 | set -g status-right-length 50 | ||||||
| set -g status-left-length 20 | set -g status-left-length 20 | ||||||
| 
 | 
 | ||||||
| setw -g window-status-current-fg colour81 |  | ||||||
| setw -g window-status-current-bg colour238 |  | ||||||
| setw -g window-status-current-attr bold |  | ||||||
| setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F ' | setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F ' | ||||||
| 
 | 
 | ||||||
| setw -g window-status-fg colour138 |  | ||||||
| setw -g window-status-bg colour235 |  | ||||||
| setw -g window-status-attr none |  | ||||||
| setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F ' | setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F ' | ||||||
| 
 | 
 | ||||||
| setw -g window-status-bell-attr bold |  | ||||||
| setw -g window-status-bell-fg colour255 |  | ||||||
| setw -g window-status-bell-bg colour1 |  | ||||||
| 
 |  | ||||||
| # } |  | ||||||
| # The messages { |  | ||||||
| 
 |  | ||||||
| set -g message-attr bold |  | ||||||
| set -g message-fg colour232 |  | ||||||
| set -g message-bg colour166 |  | ||||||
| 
 |  | ||||||
| # } |  | ||||||
| 
 |  | ||||||
| bind-key -T copy-mode-vi v send-keys -X begin-selection | bind-key -T copy-mode-vi v send-keys -X begin-selection | ||||||
| bind-key -T copy-mode-vi y send-keys -X copy-selection | bind-key -T copy-mode-vi y send-keys -X copy-selection | ||||||
| bind-key -T copy-mode-vi r send-keys -X rectangle-toggle | bind-key -T copy-mode-vi r send-keys -X rectangle-toggle | ||||||
|  | 
 | ||||||
|  | # When splitting a window, maintain directory | ||||||
|  | bind '"' split-window -c "#{pane_current_path}" | ||||||
|  | bind % split-window -h -c "#{pane_current_path}" | ||||||
|  | |||||||
							
								
								
									
										22
									
								
								vimrc
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								vimrc
									
									
									
									
									
								
							| @ -11,7 +11,6 @@ set t_vb= | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| " aesthetics | " aesthetics | ||||||
| syntax enable                     " enable syntax processing |  | ||||||
| set scrolloff=4                   " always show 5 lines above/below cursor | set scrolloff=4                   " always show 5 lines above/below cursor | ||||||
| set sidescrolloff=5               " always show 5 chars over | set sidescrolloff=5               " always show 5 chars over | ||||||
| set display=lastline              " show as much as possible, no @s | set display=lastline              " show as much as possible, no @s | ||||||
| @ -47,7 +46,7 @@ set foldmethod=indent             " unless told otherwise, fold on indents | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| " set Vundle runtime path and initialize | " set Vundle runtime path and initialize | ||||||
| set rtp+=~/.vim/bundle/vundle | set rtp+=~/.vim/bundle/Vundle.vim | ||||||
| call vundle#begin() | call vundle#begin() | ||||||
| 
 | 
 | ||||||
| " Plugins for Vundle to handle | " Plugins for Vundle to handle | ||||||
| @ -65,12 +64,15 @@ Plugin 'tmhedberg/SimpylFold' | |||||||
| Plugin 'w0rp/ale' | Plugin 'w0rp/ale' | ||||||
| Plugin 'vimwiki/vimwiki.git' | Plugin 'vimwiki/vimwiki.git' | ||||||
| Plugin 'chrisbra/csv.vim' | Plugin 'chrisbra/csv.vim' | ||||||
| Plugin 'davidhalter/jedi-vim' | "Plugin 'davidhalter/jedi-vim' | ||||||
|  | Plugin 'ejholmes/vim-forcedotcom' | ||||||
| 
 | 
 | ||||||
| " end vundle setup | " end vundle setup | ||||||
| call vundle#end() | call vundle#end() | ||||||
| colorscheme distinguished         " such colours |  | ||||||
| 
 | 
 | ||||||
|  | filetype plugin indent on | ||||||
|  | syntax enable                     " enable syntax processing | ||||||
|  | colorscheme distinguished         " such colours | ||||||
| 
 | 
 | ||||||
| " autocmd check | " autocmd check | ||||||
| if has("autocmd") | if has("autocmd") | ||||||
| @ -79,14 +81,22 @@ if has("autocmd") | |||||||
|     " set filetypes in odd extensions for decent highlighting |     " set filetypes in odd extensions for decent highlighting | ||||||
|     autocmd BufNewFile,BufRead *.djhtml set filetype=html |     autocmd BufNewFile,BufRead *.djhtml set filetype=html | ||||||
|     autocmd BufNewFile,BufRead *.raml set filetype=yaml |     autocmd BufNewFile,BufRead *.raml set filetype=yaml | ||||||
|     autocmd BufNewFile,BufRead *.rst set filetype=rust |     autocmd BufNewFile,BufRead *.cmp set filetype=html | ||||||
|     autocmd BufNewFile,BufRead *.cls set filetype=apexcode |  | ||||||
| 
 | 
 | ||||||
|     " for rainbow parentheses plugin |     " for rainbow parentheses plugin | ||||||
|     autocmd VimEnter * RainbowParenthesesToggle |     autocmd VimEnter * RainbowParenthesesToggle | ||||||
|     autocmd Syntax * RainbowParenthesesLoadRound |     autocmd Syntax * RainbowParenthesesLoadRound | ||||||
|     autocmd Syntax * RainbowParenthesesLoadSquare |     autocmd Syntax * RainbowParenthesesLoadSquare | ||||||
|     autocmd Syntax * RainbowParenthesesLoadBraces |     autocmd Syntax * RainbowParenthesesLoadBraces | ||||||
|  | 
 | ||||||
|  |     let g:python_recommended_style = 0 | ||||||
|  | 
 | ||||||
|  | 	" swap between line number modes | ||||||
|  | 	augroup numbertoggle | ||||||
|  | 		autocmd! | ||||||
|  | 		autocmd BufEnter,FocusGained,InsertLeave * set relativenumber | ||||||
|  | 		autocmd BufLeave,FocusLost,InsertEnter   * set norelativenumber | ||||||
|  | 	augroup END | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| " [COMMANDS] | " [COMMANDS] | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user