Merge remote-tracking branch 'origin/master'
Conflicts: tmux.conf vimrc
This commit is contained in:
commit
ccfc01ef6f
5 changed files with 69 additions and 44 deletions
13
gitconfig
13
gitconfig
|
|
@ -7,7 +7,7 @@
|
||||||
[color]
|
[color]
|
||||||
ui = auto
|
ui = auto
|
||||||
[merge]
|
[merge]
|
||||||
tool = Kaleidoscope
|
tool = Kaleidoscope
|
||||||
[alias]
|
[alias]
|
||||||
# Commits
|
# Commits
|
||||||
c = commit
|
c = commit
|
||||||
|
|
@ -52,13 +52,14 @@
|
||||||
[ui]
|
[ui]
|
||||||
color = true
|
color = true
|
||||||
[diff]
|
[diff]
|
||||||
tool = Kaleidoscope
|
tool = Kaleidoscope
|
||||||
[mergetool]
|
[mergetool]
|
||||||
keepBackup = true
|
keepBackup = true
|
||||||
prompt = false
|
prompt = false
|
||||||
[difftool]
|
[difftool]
|
||||||
prompt = false
|
prompt = false
|
||||||
[difftool "Kaleidoscope"]
|
[difftool "Kaleidoscope"]
|
||||||
cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
|
cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
|
||||||
[mergetool "Kaleidoscope"]
|
[mergetool "Kaleidoscope"]
|
||||||
cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot
|
cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot
|
||||||
|
trustExitCode = true
|
||||||
|
|
|
||||||
4
setup.sh
4
setup.sh
|
|
@ -14,6 +14,10 @@ vimbundles=( \
|
||||||
gundo "https://github.com/sjl/gundo.vim.git" \
|
gundo "https://github.com/sjl/gundo.vim.git" \
|
||||||
repeat "https://github.com/tpope/vim-repeat" \
|
repeat "https://github.com/tpope/vim-repeat" \
|
||||||
snipmate "https://github.com/garbas/vim-snipmate.git" \
|
snipmate "https://github.com/garbas/vim-snipmate.git" \
|
||||||
|
tlib "https://github.com/tomtom/tlib_vim.git" \
|
||||||
|
mw-utils "https://github.com/MarcWeber/vim-addon-mw-utils.git" \
|
||||||
|
snipmate-snippets "https://github.com/honza/snipmate-snippets.git" \
|
||||||
|
snipmate-zope "https://github.com/zedr/zope-snipmate-bundle.git" \
|
||||||
solarized "https://github.com/altercation/vim-colors-solarized.git" \
|
solarized "https://github.com/altercation/vim-colors-solarized.git" \
|
||||||
speeddating "https://github.com/tpope/vim-speeddating.git" \
|
speeddating "https://github.com/tpope/vim-speeddating.git" \
|
||||||
surround "https://github.com/tpope/vim-surround.git" \
|
surround "https://github.com/tpope/vim-surround.git" \
|
||||||
|
|
|
||||||
30
tmux.conf
30
tmux.conf
|
|
@ -1,38 +1,44 @@
|
||||||
# tmux config
|
# tmux config
|
||||||
# Eryn Wells <eryn@erynwells.me>
|
# Eryn Wells <eryn@erynwells.me>
|
||||||
|
|
||||||
set -g default-terminal "screen-256color"
|
|
||||||
set -g prefix C-f
|
set -g prefix C-f
|
||||||
|
|
||||||
# Don't destroy sessions that have no clients attached.
|
# Don't destroy sessions that have no clients attached.
|
||||||
set -g exit-unattached off
|
set -g exit-unattached off
|
||||||
# Set terminal titles
|
|
||||||
|
set -g default-terminal "screen-256color"
|
||||||
|
set -g history-limit 10000
|
||||||
|
|
||||||
|
# Bells from everywhere
|
||||||
|
set -g bell-action any
|
||||||
|
set -g visual-bell off
|
||||||
|
|
||||||
|
# Pass xterm titles through
|
||||||
set -g set-titles on
|
set -g set-titles on
|
||||||
set -g set-titles-string "#T"
|
set -g set-titles-string "#T"
|
||||||
# Ring bells for actions on any window in the session
|
|
||||||
set -g bell-action any
|
|
||||||
# Use audible bells
|
|
||||||
set -g visual-bell off
|
|
||||||
# Keep 10k lines of history for each window
|
|
||||||
set -g history-limit 10000
|
|
||||||
# Use vi keys for copy mode
|
# Use vi keys for copy mode
|
||||||
set -g mode-keys vi
|
set -g mode-keys vi
|
||||||
# Start window numbering at 1, not 0
|
|
||||||
set -g base-index 1
|
|
||||||
# Start pane numbering at 1, not 0
|
|
||||||
set -g pane-base-index 1
|
|
||||||
set -g repeat-time 0
|
set -g repeat-time 0
|
||||||
|
|
||||||
|
# No left status; right status bar is session name
|
||||||
set -g status-bg green
|
set -g status-bg green
|
||||||
set -g status-left ""
|
set -g status-left ""
|
||||||
set -g status-left-attr none
|
set -g status-left-attr none
|
||||||
set -g status-right "| #S "
|
set -g status-right "| #S "
|
||||||
set -g status-right-attr none
|
set -g status-right-attr none
|
||||||
|
|
||||||
|
# Start window and pane indexing from 1 instead of 0
|
||||||
|
set-option -g base-index 1
|
||||||
|
set-option -g pane-base-index 1
|
||||||
|
|
||||||
|
# Tabs like this: " <index>:<window_name>(<pane_number>) "
|
||||||
setw -g window-status-format " #I:#W(#P) "
|
setw -g window-status-format " #I:#W(#P) "
|
||||||
setw -g window-status-current-bg yellow
|
setw -g window-status-current-bg yellow
|
||||||
setw -g window-status-current-format " #I:#W(#P) "
|
setw -g window-status-current-format " #I:#W(#P) "
|
||||||
|
|
||||||
setw -g alternate-screen on
|
setw -g alternate-screen on
|
||||||
|
|
||||||
setw -g clock-mode-style 24
|
setw -g clock-mode-style 24
|
||||||
|
|
||||||
bind-key C-a last-window
|
bind-key C-a last-window
|
||||||
|
|
|
||||||
60
vimrc
60
vimrc
|
|
@ -42,15 +42,14 @@ set lcs+=nbsp:・ " show non-breaking spaces
|
||||||
set ignorecase " ignore case in searches
|
set ignorecase " ignore case in searches
|
||||||
set smartcase " case-sensitive search if pattern contains a capital
|
set smartcase " case-sensitive search if pattern contains a capital
|
||||||
set incsearch " show search matches as you type
|
set incsearch " show search matches as you type
|
||||||
set hlsearch " highlight search matches
|
|
||||||
set gdefault " apply searches globally to a line by default
|
set gdefault " apply searches globally to a line by default
|
||||||
|
|
||||||
set laststatus=2 " always show status line
|
set laststatus=2 " always show status line
|
||||||
|
|
||||||
" This is basically default status line, with a few exceptions:
|
" This is basically default status line, with a few exceptions:
|
||||||
" 1. Show buffer number before filename (b%n:)
|
" 1. Show buffer number before filename (%n:)
|
||||||
" 2. Show filetype before ruler
|
" 2. Show filetype between line number and percentage
|
||||||
set statusline=%<b%n:%f\ %h%m%r%=%y\ %l,%c%V\ \ %P
|
set statusline=%2n:%<%f\ %((%Y)%)\ %(%h%m%r%)%=%-12(%l,%c%V%)%P
|
||||||
|
|
||||||
" use PCREs for searches
|
" use PCREs for searches
|
||||||
nnoremap / /\v
|
nnoremap / /\v
|
||||||
|
|
@ -90,7 +89,7 @@ set copyindent " copy previous indentation on autoindent
|
||||||
set scrolloff=3 " scroll 3 lines ahead of point
|
set scrolloff=3 " scroll 3 lines ahead of point
|
||||||
set sidescrolloff=5 " scroll 5 columns ahead of point
|
set sidescrolloff=5 " scroll 5 columns ahead of point
|
||||||
|
|
||||||
set pastetoggle=<F2> " toggle paste mode with F2
|
set pastetoggle=<F12> " toggle paste mode with F12
|
||||||
|
|
||||||
" completion menu
|
" completion menu
|
||||||
set wildmenu
|
set wildmenu
|
||||||
|
|
@ -114,11 +113,15 @@ if &t_Co > 2 || has('gui_running')
|
||||||
syntax on " turn on syntax highlighting
|
syntax on " turn on syntax highlighting
|
||||||
endif
|
endif
|
||||||
|
|
||||||
set bg=dark
|
if has('gui_running')
|
||||||
|
set bg=light
|
||||||
|
else
|
||||||
|
set bg=dark
|
||||||
|
endif
|
||||||
|
|
||||||
" use solarized colorscheme if the terminal can support it (or we're in a GUI)
|
" use solarized colorscheme if the terminal can support it (or we're in a GUI)
|
||||||
let g:solarized_termtrans=1
|
let g:solarized_termtrans = 1
|
||||||
let g:solarized_visibility='low'
|
let g:solarized_visibility = 'low'
|
||||||
colorscheme solarized
|
colorscheme solarized
|
||||||
|
|
||||||
" tell SnipMate who I am
|
" tell SnipMate who I am
|
||||||
|
|
@ -127,7 +130,9 @@ let g:snips_author = 'Eryn Wells <eryn@erynwells.me>'
|
||||||
" set the Gundo preview window on the bottom
|
" set the Gundo preview window on the bottom
|
||||||
let g:gundo_preview_bottom = 1
|
let g:gundo_preview_bottom = 1
|
||||||
|
|
||||||
nmap <F3> :GundoToggle<CR>
|
map <silent> <F3> :GundoToggle<CR>
|
||||||
|
map <silent> <F2> :NERDTreeToggle<CR>
|
||||||
|
map <silent> <F4> :setlocal invlist<CR>
|
||||||
|
|
||||||
inoremap jj <ESC>
|
inoremap jj <ESC>
|
||||||
|
|
||||||
|
|
@ -149,6 +154,9 @@ nnoremap <C-j> <C-w>j
|
||||||
nnoremap <C-k> <C-w>k
|
nnoremap <C-k> <C-w>k
|
||||||
nnoremap <C-l> <C-w>l
|
nnoremap <C-l> <C-w>l
|
||||||
|
|
||||||
|
nnoremap <silent> <C-n> :bn<CR>
|
||||||
|
nnoremap <silent> <C-p> :bp<CR>
|
||||||
|
|
||||||
function! <SID>StripTrailingWhitespace()
|
function! <SID>StripTrailingWhitespace()
|
||||||
" save last search
|
" save last search
|
||||||
let _s=@/
|
let _s=@/
|
||||||
|
|
@ -166,10 +174,10 @@ let mapleader=','
|
||||||
" strip all trailing whitespace in the current file
|
" strip all trailing whitespace in the current file
|
||||||
nnoremap <silent> <leader>W :call <SID>StripTrailingWhitespace()<CR>
|
nnoremap <silent> <leader>W :call <SID>StripTrailingWhitespace()<CR>
|
||||||
" edit and source my .vimrc
|
" edit and source my .vimrc
|
||||||
nmap <silent> <leader>ev :tabnew $MYVIMRC<CR>
|
nmap <silent> <leader>ev :e $MYVIMRC<CR>
|
||||||
nmap <silent> <leader>sv :source $MYVIMRC<CR>
|
nmap <silent> <leader>sv :source $MYVIMRC<CR>
|
||||||
" hide search terms
|
" hide search terms
|
||||||
nmap <silent> <leader><space> :nohlsearch<CR>
|
nmap <silent> <leader><space> :setlocal invhlsearch<CR>
|
||||||
" find all
|
" find all
|
||||||
nmap <leader>fa :%s/\v
|
nmap <leader>fa :%s/\v
|
||||||
|
|
||||||
|
|
@ -179,11 +187,19 @@ nmap <leader>esn :e ~/.vim/bundle/snipmate/snippets/<C-r>=&filetype<CR>.snippets
|
||||||
nmap <leader>eft :e ~/.vim/after/ftplugin/<C-r>=&filetype<CR>.vim<CR>
|
nmap <leader>eft :e ~/.vim/after/ftplugin/<C-r>=&filetype<CR>.vim<CR>
|
||||||
|
|
||||||
" Toggle position highlighting
|
" Toggle position highlighting
|
||||||
nmap <silent> <leader>cl :set invcursorline<CR>
|
nmap <silent> <leader>cl :setlocal invcursorline<CR>
|
||||||
nmap <silent> <leader>cc :set invcursorcolumn<CR>
|
nmap <silent> <leader>cc :setlocal invcursorcolumn<CR>
|
||||||
|
|
||||||
|
|
||||||
|
" Text bubbling (these depend on tpope's unimpaired plugin)
|
||||||
|
nmap <C-Up> [e
|
||||||
|
nmap <C-Down> ]e
|
||||||
|
vmap <C-Up> [egv
|
||||||
|
vmap <C-Down> ]egv
|
||||||
|
|
||||||
|
" Select last edited text after cut and paste
|
||||||
|
nmap gV `[v`]
|
||||||
|
|
||||||
" Toggle listmode
|
|
||||||
map <silent> <F4> :set invlist<CR>
|
|
||||||
|
|
||||||
" Command-T should open files in tabs when I hit <CR>; move opening files in
|
" Command-T should open files in tabs when I hit <CR>; move opening files in
|
||||||
" buffers to <C-b>
|
" buffers to <C-b>
|
||||||
|
|
@ -193,12 +209,6 @@ let g:CommandTAcceptSelectionTabMap='<CR>'
|
||||||
if has('autocmd')
|
if has('autocmd')
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
|
|
||||||
" Markdown files can also have the .md extension
|
|
||||||
autocmd BufAdd,BufEnter,BufFilePost *.md :setf markdown
|
|
||||||
" SConstruct and SConscript files are Python
|
|
||||||
autocmd BufAdd,BufEnter,BufFilePost SConstruct :setf python
|
|
||||||
autocmd BufAdd,BufEnter,BufFilePost SConscript :setf python
|
|
||||||
|
|
||||||
" Jump to last known cursor position unless it's the first line, or past the
|
" Jump to last known cursor position unless it's the first line, or past the
|
||||||
" end of the file
|
" end of the file
|
||||||
autocmd BufReadPost *
|
autocmd BufReadPost *
|
||||||
|
|
@ -206,15 +216,15 @@ if has('autocmd')
|
||||||
\ exe "normal! g`\"" |
|
\ exe "normal! g`\"" |
|
||||||
\ endif
|
\ endif
|
||||||
|
|
||||||
" Clean whitespace before saving code files.
|
|
||||||
autocmd BufWritePre *.py,*.h,*.c,*.html,*.m,*.cc,*.hh,*.mm
|
|
||||||
\ :call <SID>StripTrailingWhitespace()
|
|
||||||
|
|
||||||
" Reload snippets after editing the snippets file. Snippet files are
|
" Reload snippets after editing the snippets file. Snippet files are
|
||||||
" <filetype>.snippets. Get <filetype> from the filename and reload the
|
" <filetype>.snippets. Get <filetype> from the filename and reload the
|
||||||
" snippets for that type.
|
" snippets for that type.
|
||||||
autocmd BufWritePost *.snippets
|
autocmd BufWritePost *.snippets
|
||||||
\ :call ReloadSnippets(expand('%:t:r'))
|
\ :call ReloadSnippets(expand('%:t:r'))
|
||||||
|
|
||||||
|
" Clean whitespace before saving: Python, C, HTML, and Objective-C
|
||||||
|
autocmd BufWritePre *.py,*.h,*.c,*.html,*.m,*.mm,*.cc,*.hh
|
||||||
|
\ call <SID>StripTrailingWhitespace()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if has('unix')
|
if has('unix')
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,11 @@ function set_prompt_info
|
||||||
fi
|
fi
|
||||||
|
|
||||||
vcs_info loquacious
|
vcs_info loquacious
|
||||||
[[ -n "$vcs_info_msg_0_" ]] && PS1_REPO="on $vcs_info_msg_0_ "
|
if [[ -n "$vcs_info_msg_0_" ]]; then
|
||||||
|
PS1_REPO="on $vcs_info_msg_0_ "
|
||||||
|
else
|
||||||
|
PS1_REPO=""
|
||||||
|
fi
|
||||||
|
|
||||||
PS1_LINE='%# '
|
PS1_LINE='%# '
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue