From 2518057febf15cbefd49ca42ec0b42e51a4850b4 Mon Sep 17 00:00:00 2001 From: Phil Date: Mon, 29 Jun 2015 22:13:57 -0400 Subject: [PATCH] Tons of changes! --- .tmux.conf | 4 +-- .vimrc | 97 +++++++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 87 insertions(+), 14 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index 353739b..96dc523 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -22,7 +22,7 @@ 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 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}') " +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}') " # 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}')::" @@ -40,7 +40,7 @@ bind T swap-window -t 1 bind -r C-h select-window -t :- bind -r C-l select-window -t :+ # explicitly disable mouse control -setw -g mode-mouse off +setw -g mode-mouse on set -g mouse-select-pane off set -g mouse-resize-pane off set -g mouse-select-window off diff --git a/.vimrc b/.vimrc index 6dc3682..03ad6ad 100644 --- a/.vimrc +++ b/.vimrc @@ -1,3 +1,8 @@ +execute pathogen#infect() + +" Allow saving of files as sudo when I forgot to start vim using sudo. +cmap w!! w !sudo tee > /dev/null % + set history=700 " Enable filetype plugins @@ -44,25 +49,24 @@ set mat=2 set noerrorbells set novisualbell set t_vb= -set tm=500 +"http://sunaku.github.io/vim-256color-bce.html +set t_ut= +set tm=500 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Colors and Fonts """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Sets 256 color mode if the terminal supports it +set t_Co=256 + " Enable syntax highlighting syntax enable set nu -colorscheme elflord - -" Set extra options when running in GUI mode -if has("gui_running") - set guioptions-=T - set guioptions+=e - set t_Co=256 - set guitablabel=%M\ %t -endif +let base16colorspace=256 " Access colors present in 256 colorspace +colorscheme base16-shapeshifter +set background=dark " Set utf8 as standard encoding and en_US as the standard language set encoding=utf8 @@ -105,10 +109,10 @@ vnoremap # :call VisualSelection('b') " => Status line """""""""""""""""""""""""""""" " Always show the status line -set laststatus=1 +"set laststatus=1 " Format the status line -set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l +"set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -148,6 +152,18 @@ autocmd BufReadPost * " Remember info about open buffers on close set viminfo^=% +" Vim split options +" Remaps ctrl w + $key to ctrl $key +" ctrl j = move right +nnoremap +" ctrl k = move up +nnoremap +" ctrl l = move down +nnoremap +" ctrl h = move left +nnoremap + + """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Helper functions """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" @@ -186,3 +202,60 @@ function! HasPaste() en return '' endfunction + + +"""""""""""""""""""" +" PATHOGEN PLUGINS " +"""""""""""""""""""" + +" START Syntastic Plugin +" https://github.com/scrooloose/syntastic +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 = 1 +let g:syntastic_check_on_wq = 1 +" END Syntastic Plugin + +" START NERDTree if no files are specified +autocmd StdinReadPre * let s:std_in=1 +autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif + +" Close NERDTree if it's the only window left open +autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif + +" https://github.com/nathanaelkane/vim-indent-guides/issues/20 +let g:indent_guides_exclude_filetypes = ['nerdtree'] +" END NERDTree + +" START Airline +let g:airline#extensions#tabline#enabled = 1 +set laststatus=2 +let g:airline_theme='base16' +" END Airline + +" START webdevicons +let g:WebDevIconsUnicodeDecorateFolderNodes = 1 +let WebDevIconsUnicodeDecorateFolderNodesExactMatches = 1 +set guifont=Anonymice\ Powerline\ Plus\ Nerd\ File\ Types\ Mono\ 10 +" END webdevicons + +" START gitgutter +" If you have grep aliased to something like grep --color=auto, tell gitgutter to use raw grep +let g:gitgutter_escape_grep = 1 +" git diff ignore whitespace +let g:gitgutter_diff_args = '-w' +let g:gitgutter_max_signs = 500 " default value +" Accuracy for speed +"let g:gitgutter_realtime = 0 +"let g:gitgutter_eager = 0 +" END gitgutter + +function! Clippy() + exe getline('.') + endfunction + command -range Clippy ,call Clippy() +vmap :Clippy +