Fix up some vimrc stuff.

This commit is contained in:
David Tomaschik
2014-10-17 15:06:06 -07:00
parent 2225fbed9a
commit d920a25f57
2 changed files with 32 additions and 11 deletions

View File

@@ -1,11 +1,13 @@
[user] [user]
name = David Tomaschik name = David Tomaschik
email = david@systemoverlord.com email = david@systemoverlord.com
[push] [push]
# Simple is not supported on git < 2.0 # Simple is not supported on git < 2.0
#default = simple #default = simple
default = matching default = matching
[core] [core]
excludesfile = ~/.gitignore excludesfile = ~/.gitignore
[web] [web]
browser = chrome browser = chrome
[github]
user = matir

35
vimrc
View File

@@ -12,20 +12,29 @@ if filereadable(glob("~/.vim/bundle/Vundle.vim/README.md"))
Plugin 'mileszs/ack.vim' Plugin 'mileszs/ack.vim'
Plugin 'tpope/vim-unimpaired' Plugin 'tpope/vim-unimpaired'
Plugin 'scrooloose/syntastic' Plugin 'scrooloose/syntastic'
Plugin 'mattn/webapi-vim'
Plugin 'mattn/gist-vim'
call vundle#end() call vundle#end()
endif endif
" Autoindentation " Whitespace options
set autoindent set autoindent
" Use same indentation style as above file
set copyindent set copyindent
" Proper tabs
set tabstop=2 set tabstop=2
set softtabstop=2 set softtabstop=2
set shiftwidth=2 set shiftwidth=2
set expandtab set expandtab
" Display cursor position set shiftround
set backspace=indent,eol,start
" Shift-tab to go backwards in insert mode
imap <S-Tab> <Esc><<A
" Line numbering, ruler
set number
set ruler set ruler
" File options
set encoding=utf-8
" Syntax highlighting and file types " Syntax highlighting and file types
syntax on syntax on
filetype plugin indent on filetype plugin indent on
@@ -35,21 +44,25 @@ set modeline
set autoread set autoread
" fsync() after writing files " fsync() after writing files
set fsync set fsync
" Line numbering
set number
" Round indentation to multiple of shiftwidth
set shiftround
" Text width 80 " Text width 80
set textwidth=80 set textwidth=80
" Write via sudo " Write via sudo
cnoremap sudow w !sudo tee % >/dev/null cnoremap sudow w !sudo tee % >/dev/null
" Search options " Search options
set incsearch set incsearch
set ignorecase set ignorecase
set smartcase set smartcase
" Optional highlighting
nmap <leader>hs :set hlsearch! hlsearch?<CR>
" Toggle paste mode
nmap <silent> <F4> :set invpaste<CR>:set paste?<CR>
imap <silent> <F4> <ESC>:set invpaste<CR>:set paste?<CR>
" Mediocre Hex editing in vim " Mediocre Hex editing in vim
" Source: http://vim.wikia.com/wiki/Improved_hex_editing " Source: http://vim.wikia.com/wiki/Improved_hex_editing
" TODO: move to an include
nnoremap <C-H> :Hexmode<CR> nnoremap <C-H> :Hexmode<CR>
command -bar Hexmode call ToggleHex() command -bar Hexmode call ToggleHex()
function ToggleHex() function ToggleHex()
@@ -89,6 +102,12 @@ function ToggleHex()
let &modifiable=l:oldmodifiable let &modifiable=l:oldmodifiable
endfunction endfunction
" Options for syntastic
let g:syntastic_enable_signs = 1
let g:syntastic_auto_lock_list = 2
" Have F5 run the tests and display errors
nnoremap <silent> <F5> :SyntasticCheck<CR> :Errors<CR>
" Include a .vimrc.local if it exists " Include a .vimrc.local if it exists
if filereadable(glob("~/.vimrc.local")) if filereadable(glob("~/.vimrc.local"))
source ~/.vimrc.local source ~/.vimrc.local