Created
May 19, 2014 15:43
-
-
Save bedney/1db18893f84edbf1a1f0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
call pathogen#infect() | |
call dirsettings#Install() | |
" We use a vim | |
set nocompatible | |
" Colo(u)red or not colo(u)red | |
" If you want color you should set this to true | |
let color = "true" | |
" Allow JS files to use folding | |
let javaScript_fold = "true" | |
autocmd FileType javascript setlocal foldmethod=syntax | |
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS | |
" Allow XML files to use folding | |
let g:xml_syntax_folding = 1 | |
autocmd FileType xml setlocal foldmethod=syntax | |
" Open XHTML files as XML files | |
autocmd BufNewFile,BufRead *.xhtml set filetype=xml | |
" Open JSON files as JS files | |
autocmd BufNewFile,BufRead *.json set filetype=javascript | |
"file saving | |
" -- this way, I've only one folder to cleanup of ~ and .swp files | |
set backupdir=/Users/bedney/dev | |
set directory=/Users/bedney/dev | |
set tabstop=4 | |
set shiftwidth=4 | |
"Allow per-directory .vimrc files. This helps when we're not working on our own | |
"projects ;-) | |
"set exrc | |
"Syntastic | |
let g:syntastic_javascript_checkers=['jshint'] | |
let g:syntastic_mode_map = { 'mode': 'passive', 'active_filetypes': ['javascript'] } | |
"set t_Co=8 | |
set guifont=DejaVu_Sans_Mono:h12 | |
syntax enable | |
set background=dark | |
colorscheme vibrantink | |
" show line numbers | |
set number | |
" show () {} [] matches | |
set showmatch | |
" highlight all searches | |
set hlsearch | |
" incremently show searches | |
set incsearch | |
set autoindent | |
set textwidth=80 | |
" Try to use 'todo' highlighting for characters that exceed the line width | |
"match todo /\%>76v.\+/ | |
" Make searches case-insensitive, unless you type upper case characters | |
set ignorecase | |
set smartcase | |
set scroll=50 | |
set laststatus=2 | |
set statusline=%<%f\ %h%m%r%=%-14.(%l-%L,%c%V%)\ %P | |
" Map .less to .css | |
nnoremap ,m :w <BAR> !lessc % > %:t:r.css<CR><space> | |
" Allow backspace to delete line breaks, beyond the start of the current | |
" insertion, and over indentations. | |
set backspace=eol,start,indent | |
set expandtab | |
" detect the type of file I'm editing & act accordingly | |
filetype plugin indent on | |
let g:SuperTabDefaultCompletionType = "<C-X><C-O>" | |
highlight Pmenu guibg=brown gui=bold | |
" open Marked.app as a Markdown viewer by hitting '\m' | |
:nnoremap <leader>m :silent !open -a Marked.app '%:p'<cr> | |
if has("syntax") | |
if color == "true" | |
" This will switch colors ON | |
so ${VIMRUNTIME}/syntax/syntax.vim | |
highlight Folded guibg=black guifg=yellow | |
else | |
" this switches colors OFF | |
syntax off | |
endif | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment