From ff00b234f1a96b46bbf1acb4da9f27cfa2699801 Mon Sep 17 00:00:00 2001 From: flipsidecreations Date: Mon, 19 Feb 2018 07:11:07 -0500 Subject: [PATCH] Removed TMUX special bindings Removed VIM plugins --- .bash_aliases | 10 ++++++ .bash_exports | 22 ++++++++++++ .bash_profile | 6 ++++ .bash_wrappers | 24 +++++++++++++ .tmux.conf | 42 ++++++++++------------ .vimrc | 97 +++++++++++++++++++++++++++++++++----------------- 6 files changed, 144 insertions(+), 57 deletions(-) create mode 100644 .bash_aliases create mode 100644 .bash_exports create mode 100644 .bash_profile create mode 100644 .bash_wrappers diff --git a/.bash_aliases b/.bash_aliases new file mode 100644 index 0000000..bd8a4d4 --- /dev/null +++ b/.bash_aliases @@ -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' diff --git a/.bash_exports b/.bash_exports new file mode 100644 index 0000000..33aa195 --- /dev/null +++ b/.bash_exports @@ -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}')" diff --git a/.bash_profile b/.bash_profile new file mode 100644 index 0000000..010d14a --- /dev/null +++ b/.bash_profile @@ -0,0 +1,6 @@ +if [ -n "$TMUX" ]; then + # called inside tmux session, do tmux things + . ~/.profile +fi +# Trigger ~/.bashrc commands +. ~/.bashrc diff --git a/.bash_wrappers b/.bash_wrappers new file mode 100644 index 0000000..1cec563 --- /dev/null +++ b/.bash_wrappers @@ -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 +} diff --git a/.tmux.conf b/.tmux.conf index 07be356..60e43a3 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -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.. -unbind C-b -set -g prefix C-a +#unbind C-b +#set -g prefix C-a set -g default-terminal "screen-256color" set -g history-limit 50000 +# Tmux mouse mode +set-option -g mouse on # THEME 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 -g status-interval 60 -set-option -g status-utf8 on set -sg escape-time 1000 set-option -g base-index 1 setw -g aggressive-resize on set -g status-justify centre #set -g status-left '#[fg=green]#(whoami)@#H#[default]' 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 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}')::" @@ -35,27 +33,18 @@ set-option -g pane-active-border-fg colour240 #base01 # use PREFIX | to split window horizontally and PREFIX - to split vertically -bind | split-window -h -bind - split-window -v +#bind | split-window -h +#bind - split-window -v # 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 -bind -r C-h select-window -t :- -bind -r C-l select-window -t :+ +#bind -r C-h select-window -t :- +#bind -r C-l select-window -t :+ -bind ` copy-mode -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 +#bind ` copy-mode +#bind p paste-buffer # Resize window with alt arrow keys 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 # 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 set-option -g pane-active-border-fg yellow diff --git a/.vimrc b/.vimrc index 8e8553c..94f3370 100644 --- a/.vimrc +++ b/.vimrc @@ -1,8 +1,14 @@ -execute pathogen#infect() +" execute pathogen#infect() " Allow saving of files as sudo when I forgot to start vim using sudo. 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. set backupskip=/tmp/*,/private/tmp/* set backup " enable backups @@ -21,22 +27,14 @@ if !isdirectory(expand(&directory)) call mkdir(expand(&directory), "p") endif - -" Highlight VCS conflict markers -match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$' - -" Clean trailing whitespace -nnoremap ww mz:%s/\s\+$//:let @/=''`z - " Resize splits when the window is resized au VimResized * :wincmd = -set modelines=0 +set modelines=1 set showmode set history=700 set undofile set undoreload=10000 -set listchars=tab:▸\ ,eol:¬,extends:❯,precedes:❮ set matchtime=3 set splitbelow set splitright @@ -54,6 +52,9 @@ filetype indent on "Always show current position set ruler +"Clipboard stuff +set clipboard=unnamedplus + " Height of the command bar set cmdheight=2 @@ -67,7 +68,7 @@ set whichwrap+=<,>,h,l " Ignore case when searching set ignorecase -" When searching try to be smart about cases +" When searching try to be smart about cases set smartcase " Highlight search results @@ -104,7 +105,9 @@ set t_Co=256 syntax enable 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 encoding=utf8 @@ -156,6 +159,12 @@ vnoremap # :call VisualSelection('b') """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Moving around, tabs, windows and buffers """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Resize splits +map + - +map - + +map > < +map < > + " Close the current buffer map bd :Bclose @@ -175,7 +184,7 @@ map te :tabedit =expand("%:p:h")/ " Switch CWD to the directory of the open buffer map cd :cd %:p:h:pwd -" Specify the behavior when switching between buffers +" Specify the behavior when switching between buffers try set switchbuf=useopen,usetab,newtab set stal=2 @@ -259,19 +268,6 @@ augroup line_return \ endif 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 p "*p -" noremap p mz:r!pbpaste`z -vnoremap y :call g:FuckingCopyTheTextPlease() -nnoremap y VV:call g:FuckingCopyTheTextPlease() - " Reselect last-pasted text nnoremap gp `[v`] @@ -293,18 +289,53 @@ let g:indent_guides_exclude_filetypes = ['nerdtree'] " START Airline let g:airline#extensions#tabline#enabled = 1 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 -function! Clippy() - exe getline('.') - endfunction - command -range Clippy ,call Clippy() -vmap :Clippy - " START windowswap let g:windowswap_map_keys = 0 "prevent default bindings nnoremap yw :call WindowSwap#MarkWindowSwap() nnoremap pw :call WindowSwap#DoWindowSwap() nnoremap ww :call WindowSwap#EasyWindowSwap() " 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 :call ToggleIndentGuidesSpaces() +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