Major vim, tmux, zsh cleanup

master
Dustin Swan 8 years ago
parent 7602ed8db2
commit 790d807c87

@ -30,11 +30,6 @@ set -g status on
# Escape delay # Escape delay
set -s escape-time 1 set -s escape-time 1
# Open new windows in current directory
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# Plugins # Plugins
set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible' set -g @plugin 'tmux-plugins/tmux-sensible'
@ -45,30 +40,23 @@ set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-open' set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-pain-control' set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'jbnicolai/tmux-urlview' set -g @plugin 'jbnicolai/tmux-urlview'
# set -g @plugin 'tmux-plugins/tmux-battery' set -g @plugin 'christoomey/vim-tmux-navigator'
# set -g @plugin 'tmux-plugins/tmux-maildir-counter'
# set -g @plugin 'seebi/tmux-colors-solarized'
# set -g @maildir_counters '~/Mail/FastMail/INBOX/new|~/Mail/IOCOM/INBOX/new'
# set -g status-right '#{battery_icon} #{battery_percentage} | ✉ F:#{maildir_counter_1} I:#{maildir_counter_2} | %a %h-%d %H:%M ' set -g status-right ''
set -g status-right '' # '%a %h-%d %H:%M '
set -g status-left '' set -g status-left ''
# default statusbar colors # default statusbar colors
set-option -g status-bg default # '#222222' set-option -g status-bg default
set-option -g status-fg '#666666' set-option -g status-fg '#666666'
set-option -g status-attr default set-option -g status-attr default
# default window title colors # default window title colors
set-window-option -g window-status-fg '#666666' set-window-option -g window-status-fg '#666666'
set-window-option -g window-status-bg default set-window-option -g window-status-bg default
# set-window-option -g window-status-attr dim
# active window title colors # active window title colors
set-window-option -g window-status-current-fg white set-window-option -g window-status-current-fg white
set-window-option -g window-status-current-bg default set-window-option -g window-status-current-bg default
#set-window-option -g window-status-current-attr bright
set-window-option -g window-status-format ' #I #W' set-window-option -g window-status-format ' #I #W'
set-window-option -g window-status-current-format ' #I #W' set-window-option -g window-status-current-format ' #I #W'
@ -77,8 +65,8 @@ set-window-option -g window-status-separator ' '
set-window-option -g base-index 1 set-window-option -g base-index 1
# pane border # pane border
set-option -g pane-border-fg default set-option -g pane-border-fg '#666666'
set-option -g pane-active-border-fg default set-option -g pane-active-border-fg '#666666'
# message text # message text
set-option -g message-bg black set-option -g message-bg black

264
vimrc

@ -2,86 +2,79 @@ set nocompatible
call plug#begin('~/.vim/plugged') call plug#begin('~/.vim/plugged')
Plug 'sheerun/vim-polyglot' " Plug 'bling/vim-airline'
Plug 'terryma/vim-multiple-cursors' " Plug 'vim-airline/vim-airline-themes'
Plug 'szw/vim-dict'
Plug 'burnettk/vim-angular'
Plug 'jQuery'
Plug 'tpope/vim-rails'
Plug 'tpope/vim-repeat' Plug 'tpope/vim-repeat'
Plug 'tpope/vim-surround' Plug 'tpope/vim-surround'
Plug 'tpope/vim-fugitive' Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-endwise' Plug 'tpope/vim-endwise'
Plug 'tpope/vim-vinegar' Plug 'tpope/vim-vinegar'
Plug 'tpope/vim-unimpaired' Plug 'tpope/vim-unimpaired'
Plug 'tpope/vim-characterize' " Plug 'tpope/vim-characterize'
Plug 'tpope/vim-speeddating' Plug 'tpope/vim-speeddating'
Plug 'tpope/vim-jdaddy' Plug 'tpope/vim-jdaddy'
Plug 'tpope/vim-eunuch' " Plug 'w0rp/ale' " previously 'neomake/neomake, 'scrooloose/syntastic'
"Plug 'tpope/vim-unimpared' Plug 'SirVer/ultisnips'
Plug 'mileszs/ack.vim' Plug 'honza/vim-snippets'
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } " previously YouCompleteMe
Plug 'carlitux/deoplete-ternjs', { 'do': 'npm install -g tern' }
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
Plug 'christoomey/vim-tmux-navigator'
Plug 'terryma/vim-multiple-cursors'
Plug 'easymotion/vim-easymotion'
Plug 'justinmk/vim-sneak' Plug 'justinmk/vim-sneak'
Plug 'bkad/CamelCaseMotion'
Plug 'majutsushi/tagbar' Plug 'majutsushi/tagbar'
Plug 'scrooloose/syntastic'
Plug 'scrooloose/nerdcommenter' Plug 'scrooloose/nerdcommenter'
"Plug 'w0ng/vim-hybrid' Plug 'gregsexton/MatchTag' " highlight matching HTML tag
"Plug 'sickill/vim-monokai'
Plug 'tomasr/molokai'
"Plug 'ervandew/supertab'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': 'yes \| ./install' }
Plug 'junegunn/fzf.vim'
Plug 'gregsexton/MatchTag'
"Plug 'kana/vim-smartinput'
Plug 'Raimondi/delimitMate' Plug 'Raimondi/delimitMate'
Plug 'rstacruz/sparkup', {'rtp': 'vim/'} Plug 'rstacruz/sparkup', {'rtp': 'vim/'}
Plug 'mbbill/undotree' Plug 'mbbill/undotree'
Plug 'coderifous/textobj-word-column.vim' Plug 'coderifous/textobj-word-column.vim'
Plug 'benmills/vimux'
Plug 'searchfold.vim'
Plug 'godlygeek/tabular'
Plug 'tommcdo/vim-lion'
Plug 'kshenoy/vim-signature' Plug 'kshenoy/vim-signature'
"Plug 'SirVer/ultisnips' Plug 'junegunn/vim-easy-align'
Plug 'honza/vim-snippets' Plug 'qstrahl/vim-matchmaker' " highlight matching word under cursor
"Plug 'Valloric/YouCompleteMe', { 'do': './install.sh' }
Plug 'eagletmt/ghc-mod'
"Plug 'eagletmt/neco-ghc'
"Plug 'lukerandall/haskellmode-vim'
Plug 'bitc/vim-hdevtools'
Plug 'idris-hackers/idris-vim'
Plug 'qstrahl/vim-matchmaker'
" Plug 'bling/vim-airline'
Plug 'matze/vim-move'
Plug 'bruno-/vim-vertical-move' Plug 'bruno-/vim-vertical-move'
Plug 'itchyny/calendar.vim'
Plug 'lfilho/cosco.vim' Plug 'lfilho/cosco.vim'
Plug 'ntpeters/vim-better-whitespace' Plug 'ntpeters/vim-better-whitespace'
Plug 'sbdchd/neoformat'
Plug 'sdanielf/vim-stdtabs' Plug 'sdanielf/vim-stdtabs'
Plug 'airblade/vim-gitgutter' Plug 'mhinz/vim-signify' " previously 'airblade/vim-gitgutter'
Plug 'gcmt/wildfire.vim' Plug 'terryma/vim-expand-region' " previously 'gcmt/wildfire.vim'
Plug 'lambdatoast/elm.vim' Plug 'tommcdo/vim-exchange'
Plug 'argtextobj.vim'
Plug 'matchit.zip' " % will match more things
Plug 'AndrewRadev/splitjoin.vim' Plug 'AndrewRadev/splitjoin.vim'
Plug 'kien/rainbow_parentheses.vim' Plug 'utl.vim'
Plug 'nathanaelkane/vim-indent-guides'
Plug 'junegunn/goyo.vim' Plug 'junegunn/goyo.vim'
Plug 'EinfachToll/DidYouMean' Plug 'EinfachToll/DidYouMean'
Plug 'jceb/vim-orgmode' Plug 'jceb/vim-orgmode'
Plug 'raichoo/purescript-vim'
Plug 'ctrlpvim/ctrlp.vim' " Languages & Syntax
Plug 'sheerun/vim-polyglot'
Plug 'idris-hackers/idris-vim'
Plug 'eagletmt/ghc-mod'
Plug 'bitc/vim-hdevtools'
"Plug 'eagletmt/neco-ghc'
"Plug 'lukerandall/haskellmode-vim'
" Themes
"Plug 'w0ng/vim-hybrid'
"Plug 'sickill/vim-monokai'
Plug 'tomasr/molokai'
call plug#end() call plug#end()
" general goodness " general goodness
set shell=/bin/bash " Syntastic breaks when trying to write to /var/folders "set shell=/bin/bash " Syntastic breaks when trying to write to /var/folders
syntax enable syntax enable
let mapleader="," let mapleader="\<Space>"
" let mapleader=","
let maplocalleader="\\" let maplocalleader="\\"
set hidden " allow hidden unsaved buffers set hidden " allow hidden unsaved buffers
set history=1000 " longer history set history=1000 " longer history
set noswapfile " turn off swapfiles set noswapfile " turn off swapfiles
set number " line numbers set number " line numbers
" set relativenumber " TODO make a command to toggle this. <leader>n maybe..
set showcmd " show the command as it is typed set showcmd " show the command as it is typed
set showmode set showmode
set wildmenu set wildmenu
@ -100,15 +93,11 @@ set scrolloff=5 " Give us a few lines before and after the cursor
set wrap set wrap
set formatoptions=rqn1 set formatoptions=rqn1
set textwidth=80 set textwidth=80
if version > 702 " set colorcolumn=80
"" set colorcolumn=80
endif
" persistent undo " persistent undo
if v:version > 703 set undodir=~/.vim/undodir
set undodir=~/.vim/undodir set undofile
set undofile
endif
" indentation " indentation
set autoindent set autoindent
@ -123,10 +112,10 @@ set smartcase " if we include uppercase, it will be case sensitive
set showmatch " matching brackets set showmatch " matching brackets
set matchtime=2 " blink brackets set matchtime=2 " blink brackets
" turn off highlighting " clear highlighting
nnoremap <silent><leader><space> :noh<cr> nnoremap <silent><leader>/ :noh<cr>
" regex " thanks stevelosh " regex
set magic set magic
" tab stops " tab stops
@ -137,21 +126,18 @@ set expandtab
set smarttab set smarttab
" so we get html goodies in php files " so we get html goodies in php files
au BufRead *.php set ft=php.html "au BufRead *.php set ft=php.html
au BufNewFile *.php set ft=php.html "au BufNewFile *.php set ft=php.html
set thesaurus+=~/.wordlists/mthesaur.txt " set thesaurus+=~/.wordlists/mthesaur.txt
set dictionary+=/usr/share/dict/words set dictionary+=/usr/share/dict/words
" hide toolbar in macvim, etc " hide toolbar, etc.
if has("gui_running") if has("gui_running")
set gfn=Terminus\ 8 set gfn=Terminus\ 8
set go=-t set go=-t
endif endif
" Git Gutter
let g:gitgutter_override_sign_column_highlight = 0
" Colors " Colors
" colorscheme monokai " colorscheme monokai
colorscheme molokai colorscheme molokai
@ -162,21 +148,6 @@ highlight LineNr ctermbg=NONE ctermfg=darkgrey
" Tagbar " Tagbar
nnoremap <silent><leader>t :TagbarToggle <cr> nnoremap <silent><leader>t :TagbarToggle <cr>
" disable tagbar in old Vim
if v:version < 703
let g:loaded_tagbar=1
endif
" Syntastic
if v:version > 700
let g:syntastic_enable_signs=1
let g:syntastic_auto_loc_list=1
let g:syntastic_html_tidy_ignore_errors=[" proprietary attribute \"ng-"]
else
let g:loaded_syntastic_plugin=1
endif
nnoremap <leader>S :SyntasticToggleMode<cr>
" Supertab " Supertab
" let g:SuperTabDefaultCompletionType="context" " let g:SuperTabDefaultCompletionType="context"
@ -189,19 +160,9 @@ let g:UltiSnipsJumpBackwardTrigger="<s-tab>"
" open the current file for edit in Perforce " open the current file for edit in Perforce
nnoremap <silent><leader>4 :! p4 edit %<cr> nnoremap <silent><leader>4 :! p4 edit %<cr>
" open vsplit and switch to it " open split and switch to it
nnoremap <leader>v <c-w>v<c-w>l nnoremap <leader>v <c-w>v<c-w>l
nnoremap <leader>s <c-w>s<c-w>j
" Buffer selection
nnoremap <leader>l :ls<cr>:b<space>
" Vimux
nnoremap <Leader>vp :VimuxPromptCommand<CR>
nnoremap <Leader>vl :VimuxRunLastCommand<CR>
nnoremap <Leader>vi :VimuxInspectRunner<CR>
nnoremap <Leader>vq :VimuxCloseRunner<CR>
nnoremap <Leader>vx :VimuxInterruptRunner<CR>
nnoremap <Leader>vz :call VimuxZoomRunner()<CR>
" Haskellmode " Haskellmode
"let g:ghc = "/usr/bin/ghc" "let g:ghc = "/usr/bin/ghc"
@ -209,77 +170,82 @@ nnoremap <Leader>vz :call VimuxZoomRunner()<CR>
"let g:haddock_browser_callformat = "%s %s" "let g:haddock_browser_callformat = "%s %s"
" hdevtools " hdevtools
nnoremap <leader>ht :HdevtoolsType<cr> " nnoremap <leader>ht :HdevtoolsType<cr>
nnoremap <leader>hc :HdevtoolsClear<cr> " nnoremap <leader>hc :HdevtoolsClear<cr>
nnoremap <leader>hi :HdevtoolsInfo<cr> " nnoremap <leader>hi :HdevtoolsInfo<cr>
" autocmd BufEnter *.hs set formatprg=pointfree
autocmd BufEnter *.hs set formatprg=pointfree
"let g:necoghc_enable_detailed_browse = 1
" automatically open and close the popup menu / preview window " automatically open and close the popup menu / preview window
au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif " au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif
set completeopt=menu,preview,longest " set completeopt=menu,preview,longest
" Undotree " Undotree
nnoremap <leader>u :UndotreeToggle<cr> nnoremap <leader>u :UndotreeToggle<cr>
" Move between splits " Matchmaker
map <c-l> <c-w>l<c-w>_
map <c-h> <c-w>h<c-w>_
" Vim-move
let g:move_key_modifier = 'C'
" Matchmaker on
let g:matchmaker_enable_startup = 1 let g:matchmaker_enable_startup = 1
" Dict word under cursor
nnoremap <leader>d :Dict
" Cosco " Cosco
autocmd FileType javascript,css nnoremap <silent> ,; :call cosco#commaOrSemiColon()<CR> autocmd FileType javascript,css nmap <silent> <leader>; <Plug>(cosco-commaOrSemiColon)
autocmd FileType javascript,css inoremap <silent> ,; <ESC>:call cosco#commaOrSemiColon()"<CR>a autocmd FileType javascript,css imap <silent> <leader>; <c-o><Plug>(cosco-commaOrSemiColon)
" Browser " Browser
let g:netrw_browsex_viewer = "browser" let g:netrw_browsex_viewer = "browser"
" Calendar " FZF
let g:calendar_google_calendar = 1 nnoremap <silent> <leader>a :Ag<CR>
nnoremap <silent> <leader>f :Files<CR>
" Ack nnoremap <silent> <leader>b :Buffers<CR>
"nnoremap <leader>a :Ack<space> nnoremap <silent> <leader>w :Windows<CR>
" No wait, Ack motion! Thanks again sjl nnoremap <silent> <leader>c :Commands<CR>
nnoremap <silent> <leader>a :set opfunc=<SID>AckMotion<CR>g@ nnoremap <silent> <leader>hf :History<CR>
xnoremap <silent> <leader>a :<C-U>call <SID>AckMotion(visualmode())<CR> nnoremap <silent> <leader>hc :History:<CR>
nnoremap <silent> <leader>hs :History/<CR>
function! s:CopyMotionForType(type) nnoremap <silent> <leader>l :BLines<CR>
if a:type ==# 'v' nnoremap <silent> <leader><leader>l :Lines<CR>
silent execute "normal! `<" . a:type . "`>y" nnoremap <silent> <leader>t :BTags<CR>
elseif a:type ==# 'char' nnoremap <silent> <leader><leader>t :Tags<CR>
silent execute "normal! `[v`]y" nnoremap <silent> <leader>gc :BCommits<CR>
endif nnoremap <silent> <leader><leader>gc :Commits<CR>
endfunction nmap <leader><tab> <plug>(fzf-maps-n)
xmap <leader><tab> <plug>(fzf-maps-x)
function! s:AckMotion(type) abort omap <leader><tab> <plug>(fzf-maps-o)
let reg_save = @@ imap <c-x><c-k> <plug>(fzf-complete-word)
imap <c-x><c-f> <plug>(fzf-complete-path)
call s:CopyMotionForType(a:type) imap <c-x><c-j> <plug>(fzf-complete-file-ag)
imap <c-x><c-l> <plug>(fzf-complete-line)
execute "normal! :Ack! --literal " . shellescape(@@) . "\<cr>"
" Neoformat
let @@ = reg_save " autocmd BufWritePre *.js Neoformat
endfunction " autocmd FileType javascript set formatprg=prettier\ --stdin
" vim-easy-align
xmap ga <Plug>(EasyAlign)
nmap ga <Plug>(EasyAlign)
" EasyMotion
let g:EasyMotion_smartcase = 1
" Deoplete
let g:deoplete#enable_at_startup = 1
let g:deoplete#enable_smart_case = 1
" vim-tmux-navigator - needed due to a bug in MacOS terminfo
nnoremap <silent> <BS> :TmuxNavigateLeft<cr>
" Tabs
nmap <leader>1 1gt
nmap <leader>2 2gt
nmap <leader>3 3gt
nmap <leader>4 4gt
nmap <leader>5 5gt
nmap <leader>6 6gt
nmap <leader>7 7gt
nmap <leader>8 8gt
nmap <leader>9 9gt
" Goyo
nmap <silent> <leader>g :Goyo<cr>
" Airline " Airline
" let g:airline#extensions#tabline#enabled = 1 let g:airline#extensions#tabline#enabled = 1
" let g:airline_powerline_fonts = 1
" Powerline
" python from powerline.vim import setup as powerline_setup
" python powerline_setup()
" python del powerline_setup
" FZF
nnoremap <silent> <Leader>f :Files<CR>
nnoremap <silent> <Leader>b :Buffers<CR>

@ -17,6 +17,7 @@ bindkey -e
alias l="ls -la" alias l="ls -la"
alias ta="tmux attach -d" alias ta="tmux attach -d"
alias e='emacsclient -a "" -t -nw' alias e='emacsclient -a "" -t -nw'
alias emacs='emacs -q' # typing 'emacs' should not load any config
alias weather='curl http://wttr.in' alias weather='curl http://wttr.in'
# nvim # nvim
@ -29,9 +30,6 @@ else
export EDITOR=vim export EDITOR=vim
fi fi
# typing 'emacs' should not load any config
alias emacs='emacs -q'
# Mac only # Mac only
[ -x "$(command -v open)" ] && export BROWSER=open [ -x "$(command -v open)" ] && export BROWSER=open
@ -49,7 +47,6 @@ fi
[ -e ~/dotfiles/bin ] && export PATH=$HOME/dotfiles/bin:$PATH [ -e ~/dotfiles/bin ] && export PATH=$HOME/dotfiles/bin:$PATH
[ -e ~/.local/bin ] && export PATH=$HOME/.local/bin:$PATH # Stack [ -e ~/.local/bin ] && export PATH=$HOME/.local/bin:$PATH # Stack
[ -e ~/.npm-packages/bin ] && export PATH=$HOME/.npm-packages/bin:$PATH # NPM [ -e ~/.npm-packages/bin ] && export PATH=$HOME/.npm-packages/bin:$PATH # NPM
[ -e /usr/local/heroku/bin ] && export PATH=/usr/local/heroku/bin:$PATH # Heroku Toolbelt
# Nix # Nix
[ -f $HOME/.nix-profile/etc/profile.d/nix.sh ] && . $HOME/.nix-profile/etc/profile.d/nix.sh [ -f $HOME/.nix-profile/etc/profile.d/nix.sh ] && . $HOME/.nix-profile/etc/profile.d/nix.sh
@ -63,7 +60,7 @@ fi
# Homebrew Github Token # Homebrew Github Token
[ -x "$(command -v brew)" ] && alias brew='[[ $HOMEBREW_GITHUB_API_TOKEN ]] || export HOMEBREW_GITHUB_API_TOKEN=`gpg -d ~/.homebrew@github-password.gpg`; brew' [ -x "$(command -v brew)" ] && alias brew='[[ $HOMEBREW_GITHUB_API_TOKEN ]] || export HOMEBREW_GITHUB_API_TOKEN=`gpg -d ~/.homebrew@github-password.gpg`; brew'
[ -x "$(command -v carthage)" ] && alias carthage='[[ $HOMEBREW_GITHUB_API_TOKEN ]] || export HOMEBREW_GITHUB_API_TOKEN=`gpg -d ~/.homebrew@github-password.gpg`; carthage' [ -x "$(command -v carthage)" ] && alias carthage='[[ $HOMEBREW_GITHUB_API_TOKEN ]] || export HOMEBREW_GITHUB_API_TOKEN=`gpg -d ~/.homebrew@github-password.gpg`; carthage'
#
# FZF # FZF
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

Loading…
Cancel
Save