Skip to content

Instantly share code, notes, and snippets.

@lynndylanhurley
Created December 11, 2010 18:28
Show Gist options
  • Select an option

  • Save lynndylanhurley/737546 to your computer and use it in GitHub Desktop.

Select an option

Save lynndylanhurley/737546 to your computer and use it in GitHub Desktop.
"Use Vim settings, rather then Vi settings (much better!).
"This must be first, because it changes other options as a side effect.
set nocompatible
"ignore case
set ic
"show line numbers
set nu
"pathogen
call pathogen#helptags()
call pathogen#runtime_append_all_bundles()
"leader
let mapleader = ","
"NERDTree
nmap <silent> <C-a> :NERDTreeToggle<CR>
let NerdTreeIgnore=['\~$', '\.pyc$']
"TagList
nmap <silent> <leader>- :TlistToggle<CR>
let Tlist_Use_Right_Window = 1
let Tlist_Inc_Winwidth = 0
let Tlist_Ctags_Cmd = "/usr/bin/ctags"
:set tags=./tags,tags,/usr/share/php/tags,Code/pureMVC/tags
"remap escape to ctrl-c
:map  <ESC>
"Hide/Show Marks
let g:showmarks_enable=0
"allow backspacing over everything in insert mode
set backspace=indent,eol,start
"store lots of :cmdline history
set history=1000
set showcmd "show incomplete cmds down the bottom
set showmode "show current mode down the bottom
set incsearch "find the next match as we type the search
set hlsearch "hilight searches by default
"set nowrap "dont wrap lines
set linebreak "wrap lines at convenient points
"indent settings
set shiftwidth=4
set softtabstop=4
set ts=4
set expandtab
set autoindent
set cindent
"folding settings
set foldmethod=indent "fold based on indent
set foldnestmax=3 "deepest fold is 3 levels
set nofoldenable "dont fold by default
set wildmode=list:longest "make cmdline tab completion similar to bash
set wildmenu "enable ctrl-n and ctrl-p to scroll thru matches
set wildignore=*.o,*.obj,*~ "stuff to ignore when tab completing
"display tabs and trailing spaces
""set list
""set listchars=tab:▷⋅,trail:⋅,nbsp:⋅
set formatoptions-=o "dont continue comments when pushing o/O
"vertical/horizontal scroll off settings
set scrolloff=3
set sidescrolloff=7
set sidescroll=1
"load ftplugins and indent files
filetype plugin on
filetype indent on
"turn on syntax highlighting
syntax on
"some stuff to get the mouse going in term
set mouse=a
set ttymouse=xterm2
"tell the term has 256 colors
set t_Co=256
"hide buffers when not displayed
set hidden
"dont load csapprox if we no gui support - silences an annoying warning
if !has("gui")
let g:CSApprox_loaded = 1
endif
"make <c-l> clear the highlight as well as redraw
nnoremap <C-L> :nohls<CR><C-L>
inoremap <C-L> <C-O>:nohls<CR>
"map to fuzzy finder text mate stylez
"nnoremap <leader>t :FufCoverageFile<CR>
nnoremap <leader>f :FufFileWithCurrentBufferDir<CR>
nnoremap <leader>b :FufBuffer<CR>
"make shortcut
nnoremap <leader><CR> :Dredir("make")<CR>
"map save to ctrl + s
nnoremap <C-s> :w<CR>
"kill trailing whitespace
nnoremap <leader>w :FixWhitespace<CR>
"ragtag.vim
let g:ragtag_global_maps = 1
"jump to last cursor position when opening a file
"dont do it when writing a commit log entry
autocmd BufReadPost * call SetCursorPosition()
function! SetCursorPosition()
if &filetype !~ 'commit\c'
if line("'\"") > 0 && line("'\"") <= line("$")
exe "normal! g`\""
normal! zz
endif
end
endfunction
"peasea colorscheme
"if ! has("gui_running")
"set t_Co=256
"endif
" feel free to choose :set background=light for a different style
"set background=dark
"colors peaksea
colorscheme molokai
"auto source vimrc
au! BufWritePost .vimrc source %
"actionscript
autocmd BufRead *.as set filetype=actionscript
autocmd BufRead *.mxml set filetype=mxml
let tlist_actionscript_settings = 'actionscript;c:class;f:method;p:property;v:variable'
"use ant to compile flex, actionscript projects
autocmd FileType actionscript,mxml set efm=%A\ %#[javac]\ %f:%l:\ %m,%-Z\ %#[javac]\ %p^,%-C%.%#
autocmd FileType actionscript,mxml set makeprg=ant\ -find\ build.xml
"vcscommand (behave with nerdcommenter)
let g:NERDTreeHijackNetrw = 1
let VCSCommandSVNExec="/usr/bin/svn"
nmap <silent> <Leader>ca :VCSAdd<CR>
nmap <silent> <Leader>cc :VCSCommit<CR>
nmap <silent> <Leader>cu :VCSUpdate<CR>
nmap <silent> <Leader>cv :VCSVimDiff<CR>
nmap <silent> <Leader>cl :VCSLog<CR>
"toolbars
:set guioptions-=m "remove menu bar
:set guioptions-=T "remove toolbar
"kill bell
set noerrorbells
set visualbell
set t_vb=
"stop shitting swps
set noswapfile
set nobackup
"gundo
nnoremap <leader>u :GundoToggle<CR>
let g:gundo_right=1
"gist
let g:gist_clip_command = 'xclip -selection clipboard'
let g:gist_detect_filetype = 1
"neocomplcache
let g:neocomplcache_enable_at_startup = 1
let g:neocomplcache_enable_smart_case = 1
let g:neocomplcache_enable_camel_case_completion = 1
let g:neocomplcache_enable_underbar_completion = 1
let g:neocomplcache_enable_auto_select = 1
if !exists('g:neocomplcache_omni_patterns')
let g:neocomplcache_omni_patterns = {}
endif
let g:neocomplcache_omni_patterns.ruby = '[^. *\t]\.\w*\|\h\w*::'
"autocmd FileType ruby setlocal omnifunc=rubycomplete#Complete
let g:neocomplcache_omni_patterns.php = '[^. \t]->\h\w*\|\h\w*::'
"delimitMate
"let g:delimitMate_autoclose = 1
let g:delimitMate_expand_cr = 1
let g:delimitMate_expand_space = 1
"let g:delimitMate_smart_quotes = 1
"let g:delimitMate_balance_matchpairs = 1
"let g:delimitMate_smart_matchpairs = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment