Merge remote-tracking branch 'origin/master'
Conflicts: vimrc
This commit is contained in:
commit
a8dde47e93
6 changed files with 60 additions and 7 deletions
17
tmux.conf
17
tmux.conf
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
set -g prefix C-f
|
set -g prefix C-f
|
||||||
|
|
||||||
|
# Don't destroy sessions that have no clients attached.
|
||||||
set -g exit-unattached off
|
set -g exit-unattached off
|
||||||
|
|
||||||
set -g default-terminal "screen-256color"
|
set -g default-terminal "screen-256color"
|
||||||
|
@ -16,13 +17,25 @@ set -g visual-bell off
|
||||||
set -g set-titles on
|
set -g set-titles on
|
||||||
set -g set-titles-string "#T"
|
set -g set-titles-string "#T"
|
||||||
|
|
||||||
set-option -g mode-keys vi
|
# Use vi keys for copy mode
|
||||||
|
set -g mode-keys vi
|
||||||
|
set -g repeat-time 0
|
||||||
|
|
||||||
|
# No left status; right status bar is session name
|
||||||
|
set -g status-bg green
|
||||||
|
set -g status-left ""
|
||||||
|
set -g status-left-attr none
|
||||||
|
set -g status-right "| #S "
|
||||||
|
set -g status-right-attr none
|
||||||
|
|
||||||
# Start window and pane indexing from 1 instead of 0
|
# Start window and pane indexing from 1 instead of 0
|
||||||
set-option -g base-index 1
|
set-option -g base-index 1
|
||||||
set-option -g pane-base-index 1
|
set-option -g pane-base-index 1
|
||||||
|
|
||||||
set-option -g status-bg green
|
# Tabs like this: " <index>:<window_name>(<pane_number>) "
|
||||||
|
setw -g window-status-format " #I:#W(#P) "
|
||||||
|
setw -g window-status-current-bg yellow
|
||||||
|
setw -g window-status-current-format " #I:#W(#P) "
|
||||||
|
|
||||||
setw -g alternate-screen on
|
setw -g alternate-screen on
|
||||||
|
|
||||||
|
|
7
vim/after/ftplugin/markdown.vim
Normal file
7
vim/after/ftplugin/markdown.vim
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
setlocal tw=80
|
||||||
|
setlocal cc=80
|
||||||
|
setlocal fdm=marker
|
||||||
|
setlocal spell
|
||||||
|
|
||||||
|
" Comment out the current selection
|
||||||
|
vmap <buffer> <leader>co "xdi<!--<Esc>"xpa--><Esc>
|
|
@ -1,8 +1,15 @@
|
||||||
setlocal shiftwidth=4
|
setlocal shiftwidth=4
|
||||||
setlocal softtabstop=4
|
setlocal softtabstop=4
|
||||||
setlocal expandtab
|
setlocal expandtab
|
||||||
setlocal textwidth=100
|
|
||||||
setlocal colorcolumn=100
|
let s:buf_filename = expand('%:t')
|
||||||
|
if s:buf_filename != "SConscript" && s:buf_filename != "SConstruct"
|
||||||
|
setlocal textwidth=100
|
||||||
|
setlocal colorcolumn=100
|
||||||
|
else
|
||||||
|
setlocal textwidth=80
|
||||||
|
setlocal colorcolumn=80
|
||||||
|
endif
|
||||||
|
|
||||||
"setlocal foldnestmax=3
|
"setlocal foldnestmax=3
|
||||||
"setlocal fdm=indent
|
"setlocal fdm=indent
|
||||||
|
|
11
vimrc
11
vimrc
|
@ -207,7 +207,10 @@ nmap <silent> <leader><space> :setlocal invhlsearch<CR>
|
||||||
" find all
|
" find all
|
||||||
nmap <leader>fa :%s/\v
|
nmap <leader>fa :%s/\v
|
||||||
|
|
||||||
nmap <leader>sn :e ~/.vim/bundle/snipmate/snippets/<C-r>=&filetype<CR>.snippets<CR>
|
" Open the snippet file for the current filetype
|
||||||
|
nmap <leader>esn :e ~/.vim/bundle/snipmate/snippets/<C-r>=&filetype<CR>.snippets<CR>
|
||||||
|
" Open the ftplugin-after script for the current filetype
|
||||||
|
nmap <leader>eft :e ~/.vim/after/ftplugin/<C-r>=&filetype<CR>.vim<CR>
|
||||||
|
|
||||||
" Toggle position highlighting
|
" Toggle position highlighting
|
||||||
nmap <silent> <leader>cl :setlocal invcursorline<CR>
|
nmap <silent> <leader>cl :setlocal invcursorline<CR>
|
||||||
|
@ -244,6 +247,12 @@ if has('autocmd')
|
||||||
autocmd VimEnter ~/Code/*
|
autocmd VimEnter ~/Code/*
|
||||||
\ call <SID>source_project_file()
|
\ call <SID>source_project_file()
|
||||||
|
|
||||||
|
" Reload snippets after editing the snippets file. Snippet files are
|
||||||
|
" <filetype>.snippets. Get <filetype> from the filename and reload the
|
||||||
|
" snippets for that type.
|
||||||
|
autocmd BufWritePost *.snippets
|
||||||
|
\ :call ReloadSnippets(expand('%:t:r'))
|
||||||
|
|
||||||
" Clean whitespace before saving: Python, C, HTML, and Objective-C
|
" Clean whitespace before saving: Python, C, HTML, and Objective-C
|
||||||
autocmd BufWritePre *.py,*.h,*.c,*.html,*.m,*.mm,*.cc,*.hh
|
autocmd BufWritePre *.py,*.h,*.c,*.html,*.m,*.mm,*.cc,*.hh
|
||||||
\ call <SID>strip_trailing_whitespace()
|
\ call <SID>strip_trailing_whitespace()
|
||||||
|
|
14
zprofile
14
zprofile
|
@ -9,7 +9,19 @@ print_heading -l 1 'Initializing login shell'
|
||||||
|
|
||||||
[ -e $HOME/.profile ] && source $HOME/.profile
|
[ -e $HOME/.profile ] && source $HOME/.profile
|
||||||
|
|
||||||
# Any ZSH stuff goes here.
|
list_tmux_sessions()
|
||||||
|
{
|
||||||
|
tmux_out=`tmux list-sessions 2>/dev/null`
|
||||||
|
[[ -z "$tmux_out" ]] && return
|
||||||
|
|
||||||
|
echo "You have the following active tmux sessions:"
|
||||||
|
for session in ${(f)tmux_out}; do
|
||||||
|
echo " $session"
|
||||||
|
done
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|
||||||
|
list_tmux_sessions
|
||||||
|
|
||||||
[ -e $HOME/.profile.$SYS ] && source $HOME/.profile.$SYS
|
[ -e $HOME/.profile.$SYS ] && source $HOME/.profile.$SYS
|
||||||
[ -e $HOME/.profile.local ] && source $HOME/.profile.local
|
[ -e $HOME/.profile.local ] && source $HOME/.profile.local
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# Create a code module
|
# Create a code module
|
||||||
# Eryn Wells <eryn@erynwells.me>
|
# Eryn Wells <eryn@erynwells.me>
|
||||||
|
|
||||||
local opts='cmph'
|
local opts='Ccmph'
|
||||||
local funcname=$0
|
local funcname=$0
|
||||||
|
|
||||||
_usage() {
|
_usage() {
|
||||||
|
@ -24,6 +24,11 @@ local modtype=''
|
||||||
while getopts $opts opt; do
|
while getopts $opts opt; do
|
||||||
[[ $complete -eq 1 ]] && return 2
|
[[ $complete -eq 1 ]] && return 2
|
||||||
case $opt in
|
case $opt in
|
||||||
|
C)
|
||||||
|
modtype='C++'
|
||||||
|
srcext='cc'
|
||||||
|
headext='hh'
|
||||||
|
;;
|
||||||
c)
|
c)
|
||||||
modtype='C'
|
modtype='C'
|
||||||
srcext='c'
|
srcext='c'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue