Created
February 21, 2019 20:54
-
-
Save timrourke/fe4ccb946d7938dfb403cf3813649f66 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
" Use /bin/bash for executing shell commands | |
set shell=/bin/bash | |
" Do not save swp files in project | |
set directory=$HOME/.vim/swapfiles// | |
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" let Vundle manage Vundle, required | |
Plugin 'VundleVim/Vundle.vim' | |
" Install Vundle plugins | |
" Color schemes | |
Plugin 'chriskempson/base16-vim' | |
Plugin 'chriskempson/base16-iterm2' | |
" Git | |
Plugin 'tpope/vim-fugitive' | |
" Airline | |
Plugin 'vim-airline/vim-airline' | |
Plugin 'vim-airline/vim-airline-themes' | |
Plugin 'powerline/fonts' | |
" Syntax | |
Plugin 'vim-syntastic/syntastic' | |
" PHP | |
Plugin 'StanAngeloff/php.vim' | |
Plugin '2072/PHP-Indenting-for-VIm' | |
Plugin 'Yggdroot/indentLine' | |
" FZF | |
Plugin 'junegunn/fzf' | |
Plugin 'junegunn/fzf.vim' | |
" Autocompletion | |
Plugin 'lvht/phpcd.vim' | |
Plugin 'Valloric/YouCompleteMe' | |
" All of your Plugins must be added before the following line | |
call vundle#end() " required | |
filetype plugin indent on " required | |
" Set up color scheme | |
syntax on | |
set termguicolors | |
let base16colorspace=256 " Access colors present in 256 colorspace | |
colorscheme base16-oceanicnext | |
" Set up syntastic | |
let g:syntastic_php_checkers = ['php', 'phpcs'] | |
let g:syntastic_aggregate_errors = 1 | |
let g:syntastic_always_populate_loc_list = 1 | |
let g:syntastic_check_on_open = 1 | |
" Set up php.vim | |
function! PhpSyntaxOverride() | |
" Put snippet overrides in this function. | |
hi! link phpDocTags phpDefine | |
hi! link phpDocParam phpType | |
hi phpUseNamespaceSeparator guifg=#808080 guibg=NONE gui=NONE | |
hi phpClassNamespaceSeparator guifg=#808080 guibg=NONE gui=NONE | |
syn match phpParentOnly "[()]" contained containedin=phpParent | |
hi phpParentOnly guifg=#f08080 guibg=NONE gui=NONE | |
endfunction | |
augroup phpSyntaxOverride | |
autocmd! | |
autocmd FileType php call PhpSyntaxOverride() | |
augroup END | |
" Set up indentation | |
filetype plugin indent on | |
autocmd FileType php set tabstop=4 shiftwidth=4 expandtab | |
" Set up rulers | |
set number relativenumber | |
" Set up FZF | |
let g:fzf_layout = { 'down': '100%' } | |
command! -bang -nargs=? -complete=dir Files | |
\ call fzf#vim#files(<q-args>, fzf#vim#with_preview('right:75%'), <bang>0) | |
command! -bang -nargs=* Rg | |
\ call fzf#vim#grep( | |
\ 'rg --column --line-number --no-heading --color=always --smart-case '.shellescape(<q-args>), 1, | |
\ <bang>0 ? fzf#vim#with_preview('up:60%') | |
\ : fzf#vim#with_preview('right:50%:hidden', '?'), | |
\ <bang>0) | |
" Set up displaying tab width | |
set list | |
set listchars=tab:␉·,trail:␠,nbsp:⎵ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment