Removed TMUX special bindings

Removed VIM plugins
This commit is contained in:
flipsidecreations 2018-02-19 07:11:07 -05:00
parent ef76780c8b
commit ff00b234f1
6 changed files with 144 additions and 57 deletions

10
.bash_aliases Normal file
View file

@ -0,0 +1,10 @@
alias gti='git'
alias tmux='tmux -2'
alias less='less -R'
alias diff='colordiff'
alias dc='cd'
alias nethack-online='ssh nethack@nethack.alt.org ; clear'
alias tron-online='ssh sshtron.zachlatta.com ; clear'
alias yams='find . -type f -name "*.yml*" | sed "s|\./||g" | egrep -v "(\.kitchen/|\[warning\]|\.molecule/)" | xargs yamllint -f parsable'
alias glog='git log --oneline --graph --color --all --decorate'
alias steam-wine='wine ~/.wine/drive_c/Program\ Files\ \(x86\)/Steam/Steam.exe'

22
.bash_exports Normal file
View file

@ -0,0 +1,22 @@
export TERM=xterm-256color
export LESS='-R'
export LESSOPEN='|~/.lessfilter %s'
# perl plenv
# export PATH="$HOME/.plenv/bin:$PATH"
# eval "$(plenv init -)"
# golang
export GOPATH=~/gocode
export PATH="$GOPATH/bin:${PATH}:/usr/local/go/bin"
# ruby rbenv
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"
export EDITOR=/usr/bin/vim
#export AWS_ACCESS_KEY_ID="$(grep -A2 XXXX ~/.aws/credentials | grep "^aws_access_key_id" | awk '{print $3}')"
#export AWS_SECRET_ACCESS_KEY="$(grep -A2 XXXX ~/.aws/credentials | grep "^aws_secret_access_key" | awk '{print $3}')"

6
.bash_profile Normal file
View file

@ -0,0 +1,6 @@
if [ -n "$TMUX" ]; then
# called inside tmux session, do tmux things
. ~/.profile
fi
# Trigger ~/.bashrc commands
. ~/.bashrc

24
.bash_wrappers Normal file
View file

@ -0,0 +1,24 @@
# colored man pages
man() {
env LESS_TERMCAP_mb=$'\E[01;31m' \
LESS_TERMCAP_md=$'\E[01;38;5;74m' \
LESS_TERMCAP_me=$'\E[0m' \
LESS_TERMCAP_se=$'\E[0m' \
LESS_TERMCAP_so=$'\E[01;33;03;40m' \
LESS_TERMCAP_ue=$'\E[0m' \
LESS_TERMCAP_us=$'\E[04;38;5;146m' \
man "$@"
}
whatsgoingon() {
for i in $(find . -maxdepth 1 -type d | sed -e 's/\.\///' -e '/\./d'); do
pushd $i >/dev/null
echo "$(tput bold)$i$(tput sgr0)"
if [ -z "$(git status --porcelain)" ]; then
echo "is clean"
else
git status -s
fi
popd >/dev/null
done
}

View file

@ -1,13 +1,12 @@
# copy and paster
set-option -g default-command "reattach-to-user-namespace -l bash"
# Make it use C-a, similar to screen.. # Make it use C-a, similar to screen..
unbind C-b #unbind C-b
set -g prefix C-a #set -g prefix C-a
set -g default-terminal "screen-256color" set -g default-terminal "screen-256color"
set -g history-limit 50000 set -g history-limit 50000
# Tmux mouse mode
set-option -g mouse on
# THEME # THEME
set -g status-bg colour235 set -g status-bg colour235
@ -18,14 +17,13 @@ set-window-option -g window-status-current-bg colour236
set-window-option -g window-status-current-attr bright set-window-option -g window-status-current-attr bright
set -g status-interval 60 set -g status-interval 60
set-option -g status-utf8 on
set -sg escape-time 1000 set -sg escape-time 1000
set-option -g base-index 1 set-option -g base-index 1
setw -g aggressive-resize on setw -g aggressive-resize on
set -g status-justify centre set -g status-justify centre
#set -g status-left '#[fg=green]#(whoami)@#H#[default]' #set -g status-left '#[fg=green]#(whoami)@#H#[default]'
set -g status-left-length 70 set -g status-left-length 70
set -g status-left "#[fg=yellow]#(ifconfig eth0 | grep 'inet ' | awk '{print \"eth0 \" $2}') #(ifconfig eth1 | grep 'inet ' | awk '{print \"eth1 \" $2}') #[fg=red]#(ifconfig tun0 | grep 'inet ' | awk '{print \"vpn \" $2}') " set -g status-left "#[fg=yellow]#(ifconfig eth0 | grep 'inet ' | awk '{print \"eth0 \" $2}') #(ifconfig eth1 | grep 'inet ' | awk '{print \"eth1 \" $2}') #[fg=red]#(ifconfig tun0 | grep 'inet ' | awk '{print \"vpn \" $2}') #(ifconfig ppp0 | grep 'inet ' | awk '{print \"vpn \" $2}')"
# show session name, window & pane number, date and time on right side of status bar # 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-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}')::" set -g status-right "#[fg=blue]#S #I:#P #[fg=yellow]:: %d %b %Y #[fg=green]:: %l:%M %p :: #(date -u | awk '{print $4}')::"
@ -35,27 +33,18 @@ set-option -g pane-active-border-fg colour240 #base01
# use PREFIX | to split window horizontally and PREFIX - to split vertically # use PREFIX | to split window horizontally and PREFIX - to split vertically
bind | split-window -h #bind | split-window -h
bind - split-window -v #bind - split-window -v
# Make the current window the first window # Make the current window the first window
bind T swap-window -t 1 #bind T swap-window -t 1
# and use C-h and C-l to cycle thru panes # and use C-h and C-l to cycle thru panes
bind -r C-h select-window -t :- #bind -r C-h select-window -t :-
bind -r C-l select-window -t :+ #bind -r C-l select-window -t :+
bind ` copy-mode #bind ` copy-mode
bind p paste-buffer #bind p paste-buffer
bind -t vi-copy v begin-selection
bind -t vi-copy y copy-selection
# after copying to a tmux buffer, hit y again to copy to clipboard
bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
set -g mode-mouse on
set -g mouse-select-pane on
set -g mouse-resize-pane off
set -g mouse-select-window on
# Resize window with alt arrow keys # Resize window with alt arrow keys
bind-key -n C-S-Up resize-pane -U 10 bind-key -n C-S-Up resize-pane -U 10
@ -64,7 +53,12 @@ bind-key -n C-S-Left resize-pane -L 10
bind-key -n C-S-Right resize-pane -R 10 bind-key -n C-S-Right resize-pane -R 10
# Rename window with ctrl a r # Rename window with ctrl a r
bind-key -r r command-prompt 'rename-window %%' #bind-key -r r command-prompt 'rename-window %%'
# Reorder windows
#bind R \
# move-window -r\; \
# display-message "Windows reordered..."
## pane border and colors ## pane border and colors
set-option -g pane-active-border-fg yellow set-option -g pane-active-border-fg yellow

97
.vimrc
View file

@ -1,8 +1,14 @@
execute pathogen#infect() " execute pathogen#infect()
" Allow saving of files as sudo when I forgot to start vim using sudo. " Allow saving of files as sudo when I forgot to start vim using sudo.
cmap w!! w !sudo tee > /dev/null % cmap w!! w !sudo tee > /dev/null %
" Highlight characters over 80
"augroup vimrc_autocmds
" autocmd BufEnter * highlight OverLength ctermbg=darkgrey guibg=#111111
" autocmd BufEnter * match OverLength /\%81v.*/
"augroup END
" Make Vim able to edit crontab files again. " Make Vim able to edit crontab files again.
set backupskip=/tmp/*,/private/tmp/* set backupskip=/tmp/*,/private/tmp/*
set backup " enable backups set backup " enable backups
@ -21,22 +27,14 @@ if !isdirectory(expand(&directory))
call mkdir(expand(&directory), "p") call mkdir(expand(&directory), "p")
endif endif
" Highlight VCS conflict markers
match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$'
" Clean trailing whitespace
nnoremap <leader>ww mz:%s/\s\+$//<cr>:let @/=''<cr>`z
" Resize splits when the window is resized " Resize splits when the window is resized
au VimResized * :wincmd = au VimResized * :wincmd =
set modelines=0 set modelines=1
set showmode set showmode
set history=700 set history=700
set undofile set undofile
set undoreload=10000 set undoreload=10000
set listchars=tab:▸\ ,eol,extends:,precedes:
set matchtime=3 set matchtime=3
set splitbelow set splitbelow
set splitright set splitright
@ -54,6 +52,9 @@ filetype indent on
"Always show current position "Always show current position
set ruler set ruler
"Clipboard stuff
set clipboard=unnamedplus
" Height of the command bar " Height of the command bar
set cmdheight=2 set cmdheight=2
@ -67,7 +68,7 @@ set whichwrap+=<,>,h,l
" Ignore case when searching " Ignore case when searching
set ignorecase set ignorecase
" When searching try to be smart about cases " When searching try to be smart about cases
set smartcase set smartcase
" Highlight search results " Highlight search results
@ -104,7 +105,9 @@ set t_Co=256
syntax enable syntax enable
set nu set nu
colorscheme murphy set background=dark
"let g:solarized_termcolors=256
" colorscheme brogrammer
" Set utf8 as standard encoding and en_US as the standard language " Set utf8 as standard encoding and en_US as the standard language
set encoding=utf8 set encoding=utf8
@ -156,6 +159,12 @@ vnoremap <silent> # :call VisualSelection('b')<CR>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Moving around, tabs, windows and buffers " => Moving around, tabs, windows and buffers
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Resize splits
map + <c-w>-
map - <c-w>+
map > <c-w><
map < <c-w>>
" Close the current buffer " Close the current buffer
map <leader>bd :Bclose<cr> map <leader>bd :Bclose<cr>
@ -175,7 +184,7 @@ map <leader>te :tabedit <c-r>=expand("%:p:h")<cr>/
" Switch CWD to the directory of the open buffer " Switch CWD to the directory of the open buffer
map <leader>cd :cd %:p:h<cr>:pwd<cr> map <leader>cd :cd %:p:h<cr>:pwd<cr>
" Specify the behavior when switching between buffers " Specify the behavior when switching between buffers
try try
set switchbuf=useopen,usetab,newtab set switchbuf=useopen,usetab,newtab
set stal=2 set stal=2
@ -259,19 +268,6 @@ augroup line_return
\ endif \ endif
augroup END augroup END
" For some reason Vim no longer wants to talk to the OS X pasteboard through "*.
" Computers are bullshit.
function! g:FuckingCopyTheTextPlease()
let old_z = @z
normal! gv"zy
call system('pbcopy', @z)
let @z = old_z
endfunction
noremap <leader>p "*p
" noremap <leader>p mz:r!pbpaste<cr>`z
vnoremap <leader>y :<c-u>call g:FuckingCopyTheTextPlease()<cr>
nnoremap <leader>y VV:<c-u>call g:FuckingCopyTheTextPlease()<cr>
" Reselect last-pasted text " Reselect last-pasted text
nnoremap gp `[v`] nnoremap gp `[v`]
@ -293,18 +289,53 @@ let g:indent_guides_exclude_filetypes = ['nerdtree']
" START Airline " START Airline
let g:airline#extensions#tabline#enabled = 1 let g:airline#extensions#tabline#enabled = 1
set laststatus=2 set laststatus=2
let g:airline_theme='behelit' let g:airline_theme='murmur'
let g:airline#extensions#hunks#enabled=0
let g:airline#extensions#branch#enabled=1
" END Airline " END Airline
function! Clippy()
exe getline('.')
endfunction
command -range Clippy <line1>,<line2>call Clippy()
vmap <F4> :Clippy<CR>
" START windowswap " START windowswap
let g:windowswap_map_keys = 0 "prevent default bindings let g:windowswap_map_keys = 0 "prevent default bindings
nnoremap <silent> <leader>yw :call WindowSwap#MarkWindowSwap()<CR> nnoremap <silent> <leader>yw :call WindowSwap#MarkWindowSwap()<CR>
nnoremap <silent> <leader>pw :call WindowSwap#DoWindowSwap()<CR> nnoremap <silent> <leader>pw :call WindowSwap#DoWindowSwap()<CR>
nnoremap <silent> <leader>ww :call WindowSwap#EasyWindowSwap()<CR> nnoremap <silent> <leader>ww :call WindowSwap#EasyWindowSwap()<CR>
" END windowswap " END windowswap
" START ctrlp
set runtimepath^=~/.vim/bundle/ctrlp.vim
" END ctrlp
" START ansible-vim
let g:ansible_extra_keywords_highlight = 1
let g:ansible_name_highlight = 'b'
let g:ansible_extra_syntaxes = "sh.vim"
func! DeleteTrailingWS()
exe "normal mz"
%s/\s\+$//ge
exe "normal `z"
endfunc
autocmd BufWrite * :call DeleteTrailingWS()
" START vim-hclfmt
let g:hcl_fmt_autosave = 1
let g:tf_fmt_autosave = 0
let g:nomad_fmt_autosave = 1
" END vim-hclfmt
nmap <silent> <leader><bslash> :call ToggleIndentGuidesSpaces()<cr>
function! ToggleIndentGuidesSpaces()
if exists('b:iguides_spaces')
call matchdelete(b:iguides_spaces)
unlet b:iguides_spaces
else
let pos = range(1, &l:textwidth, &l:shiftwidth)
call map(pos, '"\\%" . v:val . "v"')
let pat = '\%(\_^\s*\)\@<=\%(' . join(pos, '\|') . '\)\s'
let b:iguides_spaces = matchadd('CursorLine', pat)
endif
endfunction
" START vim-hashicorp-terraform
let g:terraform_align = 1
" END vim-hashicorp-terraform