Skip to content

Instantly share code, notes, and snippets.

@tommorris
Created October 16, 2008 14:03
Show Gist options
  • Select an option

  • Save tommorris/17139 to your computer and use it in GitHub Desktop.

Select an option

Save tommorris/17139 to your computer and use it in GitHub Desktop.
My .vimrc file
".vimrc - tommorris.org
:set formatoptions=l
:set lbr
:set wrap
:set autoindent
:set softtabstop=2
:set hlsearch
:colorscheme evening
:syntax enable
:filetype plugin on
"line removed for security reasons
" from http://vim.wikia.com/wiki/VimTip38 "
nnoremap <buffer> <Up> gk
nnoremap <buffer> <Down> gj
inoremap <buffer> <Up> <C-O>gk
inoremap <buffer> <Down> <C-O>gj
let g:AutoClosePairs = {'(': ')', '{': '}', '[': ']', '"': '"', "'": "'"}
"copy
"vmap <F7> "+ygv"zy`>
vmap <C-c> y:call system("pbcopy", getreg("\""))<CR>
"paste
nmap <C-v> :call setreg("\"", system("pbpaste"))<CR>p
"copy register
autocmd FocusGained * let @z=@+
" ,g - create google a href for word under cursor
map ,g <Esc>Bm`:r!ghref <cword><CR>"gdd``i<C-R><C-R>g<esc>dwi<BackSpace><Esc>
vmap ,g yvgvdm`:r!ghref '<C-R>=substitute(@0, "['\n]", " ", "g")<cr>'<cr>"gdd``i<C-R><C-R>g<Esc>i<BackSpace><Esc>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment