diff --git a/vimrc b/vimrc index 23b7011..d0dab85 100644 --- a/vimrc +++ b/vimrc @@ -1,206 +1,38 @@ -" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" Section 0: Preamble -" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" I don't like to maintain 'vi' compatibility -set nocompatible +execute pathogen#infect() -" Don't create those annoying backup files -set nobackup +" Pathogen modules used: +" * git://github.com/altercation/vim-colors-solarized.git +" * https://github.com/sheerun/vim-wombat-scheme.git +" * git://github.com/tpope/vim-fugitive.git +" * git://github.com/tpope/vim-git.git +" * https://github.com/tpope/vim-sensible.git +" * https://github.com/rust-lang/rust.vim.git +" * https://github.com/chase/vim-ansible-yaml.git +" +" Standalone colorschemes used: +" * https://github.com/jnurmine/Zenburn.git +" * https://github.com/sjl/badwolf.git -let myname = "Orien Vandenbergh" -let myemail = "address@foo.com" +syntax on +filetype plugin indent on -" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" Section 1: Appearance -" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" Enable syntax highlighting -syntax enable - -" Instruct vim to use the syntax colors appropriate for a dark background -set background=dark - -" Configure my preferred colorscheme -" Favorites are: wombat, vividchalk, torte, textmate16, solarized and badwolf2 -"let g:solarized_termcolor=256 -"let g:solarized_contrast="normal" -"let g:solarized_visibility="normal" -"colorscheme solarized -"let g:badwolf_darkgutter=1 -colorscheme badwolf2 - -" Set my default encoding to utf-8 -set encoding=utf-8 -set termencoding=utf-8 -set fileencoding=utf-8 - -" Briefly flip to the matching tag whenever one is typed -set showmatch - -" To support flashing rather than beeping -"set visualbell -"set vb t_vb= - -" Display the line number gutter, coding nice, cut-n-paste unfriendly +set softtabstop=2 +set shiftwidth=2 set number - -" Display the x,y coords in the status bar -set ruler - -" Adjust some settings so perl syntax is formatted cleaner -let perl_include_POD = 1 -let perl_want_scope_in_variables = 1 -let perl_extended_vars = 1 -let perl_string_as_statement = 1 -" This sets the minimum number of lines to process for syntax highlighting, a bigger number is more cpu intensive -let perl_sync_dist = 1000 - -syntax sync fromstart - -" By default vim doesn't report on all ':' commands, tell it to always report -set report = 0 - -" r: display [RO] for Read Only files -" I: don't display the welcome message -set shortmess=+rI - -" Display current mode and partially typed commands in the status line -set showmode -set showcmd - -" When searching, search incrementally, rather than waiting until enter is pressed -set incsearch - -" When enabled (I disable it) this will highlight all search matches -set nohlsearch - -" Display some hidden characters, this makes me happy +"set smartindent +set cindent set list set listchars=tab:▻\ ,trail:◈ -" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" Section 2: gvim specific -" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -set guioptions-=rmT -set guifont=Monospace\ 8 +set foldmethod=marker -" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" Section 3: Insert mode Tweaks -" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -set noexpandtab -set softtabstop=2 -set tabstop=8 -set shiftwidth=2 -set shiftround -set autoindent -set smartindent - -" Turn off text wrapping, but enable comment wrapping -set formatoptions-=t -set textwidth=0 - -" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" Section 4: Behavior -" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" Disable the mouse, we aren't friends -"set mouse=a - -" If vim was called with multiple file arguments, split those into windows -if &diff -else - silent sba -endif - -" Add <> to the list of matched characters -set matchpairs+=<:> - -" Load and use the matchit vim plugin -if filereadable($VIMRUNTIME . "/macros/matchit.vim") - source $VIMRUNTIME/macros/matchit.vim -endif - -" Disable '=' as a valid character in filenames -set isfname-== - -" Default to case insensitive matching, but when caps are found assume sensitive -set ignorecase -set smartcase - -" Don't resize all open windows when I split in a new window -set noequalalways - -" Configure folding to use syntax, override on a filetype basis if desired -set foldmethod=syntax -" Leave top level fold, unfolded on file open, so some context is available -set foldlevel=1 -" Don't create folds deeper than 3 levels, might still need some tweaking. -set foldnestmax=3 - -" Enable syntax based folding for the following filetypes -let javaScript_fold=1 -let perl_fold=1 -let php_folding=1 -let ruby_fold=1 -let sh_fold_enabled=1 -let xml_syntax_folding=1 - -" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" Section 5: Keymappings -" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" Tweak how backspace is handled, allow deleting eol, start, and indentations -set backspace=eol,start,indent - -" I hate F1 being mapped to help, so now it's an extra escape -map -imap - -" During an svn edit, display a split window with the diff enclosed -map :new:read !svn diff:set syntax=diff buftype=nofilegg -map :let difffile=expand('%'):new:read '!git diff --cached '.difffile:set syntax=diff buftype=nofilegg - -noremap gf gf`" -noremap `" - -" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" Section 6: Functions -" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -function! IncrementSerial(date,num) - if (strftime("%Y%m%d") == a:date) - return a:date . a:num+1 - endif - - return strftime("%Y%m%d") . '01' -endfunction - -command SOA :%s/\(2[0-9]\{7\}\)\([0-9]\{2\}\)\(\s*;\s*[sS]erial\)/\=IncrementSerial(submatch(1),submatch(2)) . submatch(3)/gc - -" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" Section 7: Filetype specific behavior -" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" Enable filetype detection, with plugins and specialized indenting rules -filetype plugin indent on - -" I like my c-style comments with aligned asterisks +" Align the asterisks of c-style comments set comments-=s1:/*,mb:*,ex:*/ set comments+=s:/*,mb:\ *,ex:\ */ set comments+=fb:* -" Configure smart perl manpages -autocmd FileType perl set keywordprg=perldoc\ -f +"set background=dark +"let g:badwolf_darkgutter=1 +colorscheme zenburn -" Verify that myprograms compile before saving -autocmd FileType php map :!php -l % -autocmd FileType perl map :!perl -c % -autocmd FileType ruby map :!ruby -c % - -" For files using C style comments, set my comments options -autocmd FileType c,cpp,javascript,slang set cindent formatoptions+=ro - -" For make files, don't expand my tabs -autocmd FileType make set noexpandtab - -" For shell style files, don't let smartindent remove the indents on my comments -autocmd FileType perl,ruby inoremap # X# - -" Handle dns zone files -autocmd BufWritePre /var/named/*.db execute ":SOA" +let g:ansible_attribute_highlight = "ab" diff --git a/vimrc.new b/vimrc.new deleted file mode 100644 index 561dab6..0000000 --- a/vimrc.new +++ /dev/null @@ -1,32 +0,0 @@ -execute pathogen#infect() - -" Pathogen modules used: -" * git://github.com/altercation/vim-colors-solarized.git -" * https://github.com/sheerun/vim-wombat-scheme.git -" * git://github.com/tpope/vim-fugitive.git -" * git://github.com/tpope/vim-git.git -" * https://github.com/tpope/vim-sensible.git -" -" Standalone colorschemes used: -" * https://github.com/jnurmine/Zenburn.git -" * https://github.com/sjl/badwolf.git - -syntax on -filetype plugin indent on - -set softtabstop=2 -set shiftwidth=2 -set number -"set smartindent -set cindent -set list -set listchars=tab:▻\ ,trail:◈ - -" Align the asterisks of c-style comments -set comments-=s1:/*,mb:*,ex:*/ -set comments+=s:/*,mb:\ *,ex:\ */ -set comments+=fb:* - -"set background=dark -"let g:badwolf_darkgutter=1 -colorscheme zenburn diff --git a/vimrc.old b/vimrc.old new file mode 100644 index 0000000..23b7011 --- /dev/null +++ b/vimrc.old @@ -0,0 +1,206 @@ +" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +" Section 0: Preamble +" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +" I don't like to maintain 'vi' compatibility +set nocompatible + +" Don't create those annoying backup files +set nobackup + +let myname = "Orien Vandenbergh" +let myemail = "address@foo.com" + +" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +" Section 1: Appearance +" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +" Enable syntax highlighting +syntax enable + +" Instruct vim to use the syntax colors appropriate for a dark background +set background=dark + +" Configure my preferred colorscheme +" Favorites are: wombat, vividchalk, torte, textmate16, solarized and badwolf2 +"let g:solarized_termcolor=256 +"let g:solarized_contrast="normal" +"let g:solarized_visibility="normal" +"colorscheme solarized +"let g:badwolf_darkgutter=1 +colorscheme badwolf2 + +" Set my default encoding to utf-8 +set encoding=utf-8 +set termencoding=utf-8 +set fileencoding=utf-8 + +" Briefly flip to the matching tag whenever one is typed +set showmatch + +" To support flashing rather than beeping +"set visualbell +"set vb t_vb= + +" Display the line number gutter, coding nice, cut-n-paste unfriendly +set number + +" Display the x,y coords in the status bar +set ruler + +" Adjust some settings so perl syntax is formatted cleaner +let perl_include_POD = 1 +let perl_want_scope_in_variables = 1 +let perl_extended_vars = 1 +let perl_string_as_statement = 1 +" This sets the minimum number of lines to process for syntax highlighting, a bigger number is more cpu intensive +let perl_sync_dist = 1000 + +syntax sync fromstart + +" By default vim doesn't report on all ':' commands, tell it to always report +set report = 0 + +" r: display [RO] for Read Only files +" I: don't display the welcome message +set shortmess=+rI + +" Display current mode and partially typed commands in the status line +set showmode +set showcmd + +" When searching, search incrementally, rather than waiting until enter is pressed +set incsearch + +" When enabled (I disable it) this will highlight all search matches +set nohlsearch + +" Display some hidden characters, this makes me happy +set list +set listchars=tab:▻\ ,trail:◈ + +" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +" Section 2: gvim specific +" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +set guioptions-=rmT +set guifont=Monospace\ 8 + +" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +" Section 3: Insert mode Tweaks +" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +set noexpandtab +set softtabstop=2 +set tabstop=8 +set shiftwidth=2 +set shiftround +set autoindent +set smartindent + +" Turn off text wrapping, but enable comment wrapping +set formatoptions-=t +set textwidth=0 + +" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +" Section 4: Behavior +" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +" Disable the mouse, we aren't friends +"set mouse=a + +" If vim was called with multiple file arguments, split those into windows +if &diff +else + silent sba +endif + +" Add <> to the list of matched characters +set matchpairs+=<:> + +" Load and use the matchit vim plugin +if filereadable($VIMRUNTIME . "/macros/matchit.vim") + source $VIMRUNTIME/macros/matchit.vim +endif + +" Disable '=' as a valid character in filenames +set isfname-== + +" Default to case insensitive matching, but when caps are found assume sensitive +set ignorecase +set smartcase + +" Don't resize all open windows when I split in a new window +set noequalalways + +" Configure folding to use syntax, override on a filetype basis if desired +set foldmethod=syntax +" Leave top level fold, unfolded on file open, so some context is available +set foldlevel=1 +" Don't create folds deeper than 3 levels, might still need some tweaking. +set foldnestmax=3 + +" Enable syntax based folding for the following filetypes +let javaScript_fold=1 +let perl_fold=1 +let php_folding=1 +let ruby_fold=1 +let sh_fold_enabled=1 +let xml_syntax_folding=1 + +" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +" Section 5: Keymappings +" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +" Tweak how backspace is handled, allow deleting eol, start, and indentations +set backspace=eol,start,indent + +" I hate F1 being mapped to help, so now it's an extra escape +map +imap + +" During an svn edit, display a split window with the diff enclosed +map :new:read !svn diff:set syntax=diff buftype=nofilegg +map :let difffile=expand('%'):new:read '!git diff --cached '.difffile:set syntax=diff buftype=nofilegg + +noremap gf gf`" +noremap `" + +" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +" Section 6: Functions +" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +function! IncrementSerial(date,num) + if (strftime("%Y%m%d") == a:date) + return a:date . a:num+1 + endif + + return strftime("%Y%m%d") . '01' +endfunction + +command SOA :%s/\(2[0-9]\{7\}\)\([0-9]\{2\}\)\(\s*;\s*[sS]erial\)/\=IncrementSerial(submatch(1),submatch(2)) . submatch(3)/gc + +" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +" Section 7: Filetype specific behavior +" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +" Enable filetype detection, with plugins and specialized indenting rules +filetype plugin indent on + +" I like my c-style comments with aligned asterisks +set comments-=s1:/*,mb:*,ex:*/ +set comments+=s:/*,mb:\ *,ex:\ */ +set comments+=fb:* + +" Configure smart perl manpages +autocmd FileType perl set keywordprg=perldoc\ -f + +" Verify that myprograms compile before saving +autocmd FileType php map :!php -l % +autocmd FileType perl map :!perl -c % +autocmd FileType ruby map :!ruby -c % + +" For files using C style comments, set my comments options +autocmd FileType c,cpp,javascript,slang set cindent formatoptions+=ro + +" For make files, don't expand my tabs +autocmd FileType make set noexpandtab + +" For shell style files, don't let smartindent remove the indents on my comments +autocmd FileType perl,ruby inoremap # X# + +" Handle dns zone files +autocmd BufWritePre /var/named/*.db execute ":SOA" diff --git a/zsh/zshrc b/zsh/zshrc index 199e9be..e9aec43 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -5,7 +5,7 @@ export ZSH=/home/ovandenb/.zsh/oh-my-zsh # Look in ~/.oh-my-zsh/themes/ # Optionally, if you set this to "random", it'll load a random theme each # time that oh-my-zsh is loaded. -ZSH_THEME="fishy" +ZSH_THEME="qi3ber2" # Uncomment the following line to use case-sensitive completion. CASE_SENSITIVE="true" @@ -51,7 +51,7 @@ HISTFILE="$ZDOTDIR/.zsh_history" # Example format: plugins=(rails git textmate ruby lighthouse) # Add wisely, as too many plugins slow down shell startup. #plugins=(sudo systemd themes tmux todo zsh_reload) -plugins=(ansible sudo systemd themes tmux todo web-search zsh_reload) +plugins=(ansible sudo systemd themes tmux todo vi-mode web-search zsh_reload) # User configuration ZSH_TMUX_AUTOSTART=false @@ -95,3 +95,7 @@ export EDITOR="vim" # alias ohmyzsh="mate ~/.oh-my-zsh" # export PROMPT_EOL_MARK="⏎" +export LESS='-FRX' + +unsetopt share_history +unsetopt hist_verify