Skip to content

Instantly share code, notes, and snippets.

@thadd
Created February 24, 2010 15:49
Show Gist options
  • Save thadd/313535 to your computer and use it in GitHub Desktop.
Save thadd/313535 to your computer and use it in GitHub Desktop.
let s:save_cpo = &cpo
set cpo&vim
set listchars=eol:\|,trail:_,tab:>-
colors peachpuff
set printoptions=paper:letter
set guifont=Inconsolata:h14
set columns=198
set lines=50
set gtl=%t\ %m
vmenu &Comments.&Comment : s.^.#.
:nohls
vmenu &Comments.&Uncomment : s.^#..
:nohls
let &cpo = s:save_cpo
let s:save_cpo = &cpo
set cpo&vim
syntax on
set background=light
set number
set nowrap
set ignorecase
set smartcase
set nohls
set incsearch
set expandtab
set tabstop=2
set shiftwidth=2
set ai
set laststatus=2
set cpoptions=aAbBcCdDeEfFgijJkKlLmnoOprsStWy$!%*<
set ruler
set backspace=indent,eol,start
map gh h
map gl l
map gj j
map gk k
set wildchar=<Tab>
set wildmenu
set splitbelow
set splitright
set browsedir=buffer
"set foldcolumn=3
set mouse=nv
filetype indent on
filetype plugin on
let mapleader = ","
nmap ,f zf%
nmap ,tw :set textwidth=80
nmap ,wt :set textwidth=0
nmap ,h :nohls
" map shift-tab to autocomplete
imap  
vmap gy : s.^.#.
:nohls
vmap gu : s.^#..
:nohls
set dir=/tmp,/var/tmp/,.
au BufEnter * cd %:p:h
au BufEnter [Mm]akefile set noexpandtab
au BufEnter [Mm]akefile set tabstop=5
au BufLeave [Mm]akefile set expandtab
au BufLeave [Mm]akefile set tabstop=3
au BufEnter *.rxml,*html,*.rb set tabstop=2
au BufEnter *.rxml,*html,*.rb set shiftwidth=2
au BufLeave *.rxml,*html,*.rb set tabstop=2
au BufLeave *.rxml,*html,*.rb set shiftwidth=2
au BufEnter *.pde set tabstop=2
au BufEnter *.pde set filetype=c
let &cpo = s:save_cpo
function! TextMode()
set linebreak
set wrap
set nonumber
unmap gj
unmap gk
map j gj
map k gk
map $ g$
map 0 g0
endfunction
nmap ,tm :call TextMode()
set noequalalways
nmap <C-S-D-]> :cn
nmap <C-S-D-\> :cp
nmap zl :tabn
nmap zh :tabp
imap ,zl :tabn
imap ,zh :tabp
nmap z<Right> :tabn
nmap z<Left> :tabp
imap ,z<Right> :tabn
imap ,z<Left> :tabp
imap <S-D-Left> :tabp
imap <S-D-Right> :tabn
nmap <S-D-Left> :tabp
nmap <S-D-Right> :tabn
"if v:version >= 700
" set showtabline=2
"endif
nmap ,mks :exe "mksession! " . v:this_session
set ssop=blank,buffers,folds,help,options,tabpages,winsize
imap ,lipsum Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Mauris tristique, enim eget ornare feugiat, dolor lacus lacinia justo, at accumsan enim eros vel quam. Praesent id lacus id leo tincidunt mollis. Suspendisse potenti. Sed eros justo, dignissim quis, accumsan vel, consequat eu, magna. Etiam sagittis malesuada orci. Suspendisse eu libero. Sed nonummy. Ut ut eros et mauris elementum cursus. Vestibulum ut erat. Maecenas nunc lectus, commodo at, semper ultrices, varius aliquam, enim. Ut vestibulum libero dictum odio. Quisque sem sapien, dictum eget, fermentum at, ornare in, mauris. Phasellus magna.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment