if $SHELL =~ 'bin/fish' set shell=/bin/sh endif set nocompatible " no vi compatibility filetype off if has('win32') || has('win64') set rtp+=~/vimfiles/bundle/vundle/ call vundle#rc('$HOME/vimfiles/bundle/') set guifont=DejaVu\ Sans\ Mono:h11 else " Usual quickstart instructions set rtp+=~/.vim/bundle/vundle/ call vundle#rc() if has("gui_macvim") set guifont=DejaVu\ Sans\ Mono:h12 else set guifont=DejaVu\ Sans\ Mono\ 11 endif endif call vundle#rc() Bundle 'gmarik/vundle' Bundle 'tpope/vim-fugitive' Bundle 'Lokaltog/vim-easymotion' Bundle 'kien/ctrlp.vim' Bundle 'bling/vim-airline' Bundle 'scrooloose/nerdtree' Bundle 'hesselbom/vim-hsftp' Bundle 'Shougo/neocomplcache.vim' Bundle 'Shougo/neosnippet' Bundle 'mattn/emmet-vim' "Bundle 'Yggdroot/indentLine' Bundle 'scrooloose/syntastic' Bundle 'othree/javascript-libraries-syntax.vim' Bundle 'terryma/vim-multiple-cursors' Bundle 'Valloric/MatchTagAlways' Bundle 'evidens/vim-twig' Bundle 'arnaud-lb/vim-php-namespace' Bundle 'terryma/vim-multiple-cursors' Bundle 'Valloric/MatchTagAlways' " Bundle 'Shougo/vimproc' " Bundle 'm2mdas/phpcomplete-extended' filetype plugin indent on set encoding=utf8 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " => Files, backups and undo """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Turn backup off, since most stuff is in SVN, git anyway... set nobackup set nowb set noswapfile set vb autocmd GUIEnter * set vb t_vb= "disable visual bells gvim "disable visual bells for gvim autocmd VimEnter * set vb t_vb= "disable visual bells in vim " disable visual bells for vim syntax enable " colors set t_Co=256 set background=dark if has('gui_running') colorscheme Tomorrow-Night else colorscheme Tomorrow endif "Persistent undo try set undodir=~/.vim/undodir set undofile catch endtry set hidden "allow to jumping between modified buffers set cf " Enable error files & error jumping. set history=256 " Number of things to remember in history. "set ruler " Ruler on set nu " Line numbers on set nowrap " Line wrapping off set timeoutlen=250 " Time to wait after ESC (default causes an annoying delay) set cursorline " Formatting set tabstop=4 " Tabs are 2 spaces set shiftwidth=4 " Tabs under smart indent set expandtab set smarttab set cindent set autoindent set bs=2 " Backspace over everything in insert mode set nocp incsearch set colorcolumn=80 set formatoptions=tcqr " Make backspce behave more normally set backspace=indent,eol,start " Visual " searching set hlsearch " highlight all search results set incsearch " increment search set ignorecase " case-insensitive search set smartcase " uppercase causes case-sensitive search set showmatch " Show matching brackets. set mat=5 " Bracket blinking. let g:airline_powerline_fonts = 0 let g:airline#extensions#tabline#enabled = 1 let g:airline#extensions#tabline#fnamemod = ':t' let g:airline#extensions#tabline#buffer_nr_show = 1 let g:airline#extensions#tabline#buffer_max = 500 set cmdheight=1 set noshowmode " hide original status line because of airline set laststatus=2 " Always show status line. function! SaveProper() :set et| retab " change indent to spaces and retab :set ff=unix " set line endings to unix :%s/\s\+$//e " delete trailing whitespace :update " write to disk endfunction " keyboard remaps let mapleader = "," inoremap jk "nnoremap :update nnoremap :call SaveProper() nnoremap 10jzz nnoremap 10kzz nnoremap n :NERDTreeToggle nnoremap N :NERDTreeFind nnoremap :bn nnoremap :bp inoremap :bni inoremap :bpi vmap "+y vmap "+gP imap "+y imap "+gP nmap "+y nmap "+gP imap => imap -> " let g:netrw_liststyle = 3 " sftp shortcuts nnoremap s :Hupload nnoremap d :Hdownload " neocomplcache let g:neocomplcache_enable_at_startup = 1 let g:neocomplcache_ctags_program = "ctags" " neosnippet " Plugin key-mappings. imap (neosnippet_expand_or_jump) smap (neosnippet_expand_or_jump) xmap (neosnippet_expand_target) "Ctrl P let g:ctrlp_match_window = 'bottom,order:btt,min:1,max:10,results:10' " SuperTab like snippets behavior. imap neosnippet#expandable_or_jumpable() ? \ "\(neosnippet_expand_or_jump)" \: pumvisible() ? "\" : "\" smap neosnippet#expandable_or_jumpable() ? \ "\(neosnippet_expand_or_jump)" \: "\" " For snippet_complete marker. if has('conceal') set conceallevel=2 concealcursor=i endif autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS autocmd FileType php setlocal omnifunc=javascriptcomplete#CompletePHP let g:neocomplcache_max_list = 10 let g:neocomplcache_auto_completion_start_length = 3 " emmet let g:user_emmet_leader_key = '' "syntastic let g:syntastic_html_checkers=[] " indentline let g:indentLine_color_gui = '#111111' let g:indentLine_char = '│' " javascript libraries let g:used_javascript_libs = 'underscore,angularjs,jquery' " airline let g:airline_left_sep='' let g:airline_right_sep='' "php namespace set tags+=./tags.vendors,tags.vendors inoremap u :call PhpInsertUse() noremap u :call PhpInsertUse() inoremap e :call PhpExpandClass() noremap e :call PhpExpandClass() " php-extend autocmd FileType php setlocal omnifunc=phpcomplete_extended#CompletePHP " gvim specific set mousehide " Hide mouse after chars typed set mouse=a " Mouse in all modesc set guioptions-=m "Hide toolbar set guioptions-=T "Hide menubar set guioptions-=L "Hide scrollbar