-
-
Save jcdavison/18d635959d756300b994037c6d94867b 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
exec pathogen#infect() | |
filetype plugin indent on | |
"syntax enable | |
syntax on | |
set nocompatible | |
set term=builtin_ansi | |
set background=light | |
set undofile | |
set undodir=$HOME/.vim/vimundo | |
set number | |
set autoread | |
au CursorHold,CursorHoldI * checktime | |
au FocusGained,BufEnter * :checktime | |
noremap <Up> <NOP> | |
noremap <Down> <NOP> | |
noremap <Left> <NOP> | |
noremap <Right> <NOP> | |
vnoremap < <gv | |
vnoremap > >gv | |
let g:syntastic_javascript_checkers = ['eslint'] | |
let g:jsx_ext_required = 0 | |
autocmd FileType ruby set ft=ruby.rails | |
autocmd Filetype ruby setlocal ts=2 sts=2 sw=2 | |
set nobackup " no backup files | |
set nowritebackup " only in case you don't want a backup file while editing | |
set noswapfile " no swap files | |
set clipboard=unnamedplus " use Mac clipboard for yank/paste/etc. | |
" expand %% to file dir | |
cnoremap %% <C-R>=expand('%:h').'/'<cr> | |
set autoindent " always set autoindenting on | |
set copyindent " copy the previous indentation on autoindenting | |
set shiftround " use multiple of shiftwidth when indenting with '<' and '>' | |
set smarttab " insert tabs on the start of a line according to | |
" shiftwidth, not tabstop | |
set ts=2 sts=2 sw=2 expandtab "set two spaces by default | |
" autocmd Filetype javascript setlocal et ts=2 sts=2 sw=2 | |
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS | |
autocmd Filetype html setlocal et ts=2 sts=2 sw=2 | |
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags | |
autocmd Filetype css setlocal et ts=2 sts=2 sw=2 | |
autocmd FileType css set omnifunc=csscomplete#CompleteCSS | |
au BufRead,BufNewFile *.hamlc set ft=haml | |
au FileType html compiler html | |
au BufNewFile,BufRead *.ejs set filetype=html | |
" Vim-pasta Settings | |
let g:pasta_disabled_filetypes = ['python', 'coffee', 'yaml'] | |
" ctrlp ignore settings | |
set wildignore+=*/tmp/*,*.so,*.swp,*.zip,/solr/,solr,node_modules,node_modules/,*.pyc | |
set wildignore+=*.pyc | |
let g:ctrlp_custom_ignore = 'bower_components' | |
let g:ctrlp_custom_ignore = 'node_modules' | |
let g:ctrlp_custom_ignore = '_site' | |
let g:ackprg = 'ag --nogroup --nocolor --column' | |
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' | |
" let g:ctrlp_user_command = 'ag %s -l --nocolor --hidden -g ""' | |
let g:ctrlp_use_caching = 0 | |
" let g:ctrlp_max_files=0 | |
" let g:ctrlp_max_depth=100 | |
let g:ctrlp_match_window = 'bottom,order:ttb' | |
" let g:ctrlp_switch_buffer = 0 | |
let g:ctrlp_working_path_mode = 0 | |
let g:ctrlp_by_filename = 0 | |
let g:ctrlp_max_height = 30 | |
" Indent Guide Settings | |
autocmd FileType html,css,ruby,eruby,javascript,php,xml,haml,coffee,js call indent_guides#enable() | |
set mouse=a | |
imap <C-l> <Space>=><Space> | |
"Make hashrocket with control-l | |
nmap <silent> <Leader>q :NERDTreeToggle<CR> | |
let NERDTreeIgnore = ['\.pyc$'] | |
" autocmd BufWritePost *.coffee silent make! | |
autocmd QuickFixCmdPost * nested cwindow | redraw! | |
au BufReadPost *.vue set syntax=html | |
let g:indent_guides_enable_on_vim_startup = 1 | |
if ! exists("g:CheckUpdateStarted") | |
let g:CheckUpdateStarted=1 | |
call timer_start(1,'CheckUpdate') | |
endif | |
function! CheckUpdate(timer) | |
silent! checktime | |
call timer_start(1000,'CheckUpdate') | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment