Created
August 12, 2011 17:14
-
-
Save pthrasher/1142496 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filetype off | |
call pathogen#runtime_append_all_bundles() | |
filetype plugin indent on | |
syntax on | |
set nocompatible | |
set modelines=0 | |
set tabstop=4 | |
set shiftwidth=4 | |
set softtabstop=4 | |
set expandtab | |
set encoding=utf-8 | |
set scrolloff=3 | |
set autoindent | |
set showmode | |
set showcmd | |
set wildmenu | |
set wildmode=list:longest | |
set visualbell | |
set cursorline | |
set ttyfast | |
set ruler | |
set backspace=indent,eol,start | |
set laststatus=2 | |
set relativenumber | |
set undofile | |
let mapleader = "," | |
" Search related stuff... Sane defaults. | |
nnoremap / /\v | |
vnoremap / /\v | |
set ignorecase | |
set smartcase | |
set gdefault | |
set incsearch | |
set showmatch | |
set hlsearch | |
nnoremap <leader><space> :noh<cr> | |
" Yes, I like wrapping. | |
set wrap | |
set textwidth=79 | |
set formatoptions=qrn1 | |
set list | |
set listchars=tab:▸\ ,eol:¬ | |
" make up and down a bit more sane. | |
nnoremap j gj | |
nnoremap k gk | |
inoremap <F1> <ESC> | |
nnoremap <F1> <ESC> | |
vnoremap <F1> <ESC> | |
" who needs shift, anyway. | |
nnoremap ; : | |
vnoremap ; : | |
" strip all trailing whitespace from lines | |
nnoremap <leader>W :%s/\s\+$//<cr>:let @/=''<CR> | |
" ack, duh... | |
nnoremap <leader>a :Ack | |
"fold tag | |
nnoremap <leader>ft Vatzf | |
"folding | |
set foldmethod=indent | |
"sort css properties | |
nnoremap <leader>S ?{<CR>jv/^\s*\}$<CR>k:sort<CR>:noh<CR> | |
" re-hard wrap paragraphs of text | |
nnoremap <leader>q gqip | |
"reselect previously pasted text | |
nnoremap <leader>v V`] | |
" because <C-c> and <ESC> are just too inefficient. | |
inoremap jf <ESC> | |
" create new vert split, and switch to new buff | |
nnoremap <leader>w <C-w>v<C-w>l | |
" bindings for easy split nav | |
nnoremap <C-h> <C-w>h | |
nnoremap <C-j> <C-w>j | |
nnoremap <C-k> <C-w>k | |
nnoremap <C-l> <C-w>l | |
" Default color scheme | |
set background=dark | |
color solarized | |
set guifont=Menlo:h14 | |
" Turn backup off, since most stuff is in SVN, git anyway... | |
set nobackup | |
set nowb | |
set noswapfile | |
"Persistent undo | |
set undodir=~/.vim/undodir | |
" gist-vim defaults | |
let g:github_user = 'pthrasher' | |
let g:github_token = '1cf5b0375c56f4d79600ebf0ab054621' | |
let g:gist_clip_command = 'pbcopy' | |
let g:gist_detect_filetype = 1 | |
let g:gist_open_browser_after_post = 1 | |
" Opens an edit command with the path of the currently edited file filled in | |
" Normal mode: <Leader>e | |
map <Leader>e :e <C-R>=expand("%:p:h") . "/" <CR> | |
" Opens a tab edit command with the path of the currently edited file filled in | |
" Normal mode: <Leader>t | |
map <Leader>te :tabe <C-R>=expand("%:p:h") . "/" <CR> | |
" who wants the god damned toolbar?? | |
set guioptions-=T | |
" Close the current buffer | |
map <leader>bd :bd<cr> | |
" Use the arrows to something usefull | |
map <right> :bn<cr> | |
map <left> :bp<cr> | |
" CommandT | |
map <C-t> :CommandT<cr> | |
"buftabs stuffs | |
let g:buftabs_only_basename=1 | |
let g:buftabs_in_statusline=1 | |
let g:buftabs_separator = "." | |
let g:buftabs_marker_start = "(" | |
let g:buftabs_marker_end = ")" | |
let g:buftabs_marker_modified = "*" | |
function! CountNonEmpty() | |
return len(filter(getline(1, line('$')), '!empty(v:val)')) | |
endfunction | |
set statusline=%{buftabs#statusline()}%=%#warningmsg#\%{SyntasticStatuslineFlag()}%*\ %l\ \ loc:\ %L\ sloc:\ %{CountNonEmpty()} | |
let g:EasyMotion_leader_key = '<Leader>m' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment