Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
162 lines (128 sloc) 5.29 KB
set modelines=0
" Pathogen stuff
call pathogen#infect()
call pathogen#helptags()
" call pathogen#runtime_append_all_bundles()
" Now load up color scheme etc.
filetype off
syntax on
set background=dark
colorscheme solarized
filetype plugin indent on
set ofu=syntaxcomplete#Complete
" My settings :)
set expandtab
set tabstop=2
set shiftwidth=2
set autoindent
set smartindent
set noautowrite
set number
set autoread
set showmode
set showcmd
set nocompatible
set ttyfast
set ruler
set incsearch
set ignorecase
set hlsearch
set showmatch
set diffopt=filler,iwhite
set showbreak=↪
set noswapfile " It's 2012, GO AWAY FFS
" Better Completion
set completeopt=longest,menuone,preview
" Save when losing focus
au FocusLost * :silent! wall
" Highlight VCS conflict markers
match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$'
" We like underlining bad spellings
if v:version >= 700
let b:lastspelllang='en'
function! ToggleSpell()
if &spell == 1
let b:lastspelllang=&spelllang
setlocal spell!
elseif b:lastspelllang
setlocal spell spelllang=b:lastspelllang
else
setlocal spell spelllang=en
endif
endfunction
nmap ss :call ToggleSpell()
setlocal spell spelllang=en
endif
au FileType python setlocal tabstop=8 expandtab shiftwidth=4 softtabstop=4
au FileType python set omnifunc=pythoncomplete#Complete
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
autocmd InsertLeave * match ExtraWhitespace /\s\+$/
autocmd BufWinLeave * call clearmatches()
set guifont=Menlo:h14
nnoremap <F3> :NERDTreeToggle<CR>
autocmd FileType python set omnifunc=pythoncomplete#Complete
inoremap <C-space> <C-x><C-o>
au BufRead,BufNewFile *.dmsl set filetype=dmsl
au! Syntax dmsl source ~/.vim/misc/dmsl.vim
set laststatus=2
set statusline=%<%f\ %h%m%r%{fugitive#statusline()}%=%-14.(%l,%c%V%)\ %P
nnoremap <F2> :set invpaste paste?<CR>
set pastetoggle=<F2>
set showmode
let g:easytags_cmd = '/usr/local/bin/ctags'
fun! SetupVAM()
" YES, you can customize this vam_install_path path and everything still works!
let vam_install_path = expand('$HOME') . '/.vim/vim-addons'
exec 'set runtimepath+='.vam_install_path.'/vim-addon-manager'
" * unix based os users may want to use this code checking out VAM
" * windows users want to use http://mawercer.de/~marc/vam/index.php
" to fetch VAM, VAM-known-repositories and the listed plugins
" without having to install curl, unzip, git tool chain first
" -> BUG [4] (git-less installation)
if !filereadable(vam_install_path.'/vim-addon-manager/.git/config') && 1 == confirm("git clone VAM into ".vam_install_path."?","&Y\n&N")
" I'm sorry having to add this reminder. Eventually it'll pay off.
call confirm("Remind yourself that most plugins ship with documentation (README*, doc/*.txt). Its your first source of knowledge. If you can't find the info you're looking for in reasonable time ask maintainers to improve documentation")
exec '!p='.shellescape(vam_install_path).'; mkdir -p "$p" && cd "$p" && git clone --depth 1 git://github.com/MarcWeber/vim-addon-manager.git'
" VAM run helptags automatically if you install or update plugins
exec 'helptags '.fnameescape(vam_install_path.'/vim-addon-manager/doc')
endif
" Example drop git sources unless git is in PATH. Same plugins can
" be installed form www.vim.org. Lookup MergeSources to get more control
" let g:vim_addon_manager['drop_git_sources'] = !executable('git')
call vam#ActivateAddons(['snipmate-snippets'], {'auto_install' : 0})
" sample: call vam#ActivateAddons(['pluginA','pluginB', ...], {'auto_install' : 0})
" - look up source from pool (<c-x><c-p> complete plugin names):
" ActivateAddons(["foo", ..
" - name rewritings:
" ..ActivateAddons(["github:foo", .. => github://foo/vim-addon-foo
" ..ActivateAddons(["github:user/repo", .. => github://user/repo
" Also see section "2.2. names of addons and addon sources" in VAM's documentation
endfun
call SetupVAM()
map <c-j> <c-w>j
map <c-k> <c-w>k
map <c-l> <c-w>l
map <c-h> <c-w>h
let g:SuperTabDefaultCompletionType = "context"
let g:ctrlp_custom_ignore = '\.git$\|\.hg$\|\.svn$'
nmap <F8> :TagbarToggle<CR>
" Ignore shiz
set wildmenu
set wildmode=list:longest
set wildignore+=.hg,.git,.svn " Version control
set wildignore+=*.aux,*.out,*.toc " LaTeX intermediate files
set wildignore+=*.jpg,*.bmp,*.gif,*.png,*.jpeg " binary images
set wildignore+=*.o,*.obj,*.exe,*.dll,*.manifest " compiled object files
set wildignore+=*.spl " compiled spelling word
set wildignore+=*.sw? " Vim swap files
set wildignore+=*.DS_Store " OSX bullshit
set wildignore+=*.luac " Lua byte code
set wildignore+=migrations " Django migrations
set wildignore+=*.pyc " Python byte code
set wildignore+=*.orig " Merge resolution files
" Clojure/Leiningen
set wildignore+=classes
set wildignore+=lib
Jump to Line
Something went wrong with that request. Please try again.