Last active
November 19, 2017 22:32
-
-
Save ksassnowski/f27c4b0a5ef4932d9ee5 to your computer and use it in GitHub Desktop.
vimrc
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
set nocompatible | |
filetype off | |
call plug#begin('~/.vim/plugged') | |
" Plugins | |
" ------------------------------ | |
Plug 'kien/ctrlp.vim' | |
Plug 'Raimondi/delimitMate' | |
Plug 'mattn/emmet-vim' | |
Plug 'othree/html5.vim' | |
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } | |
Plug 'bling/vim-airline' | |
Plug 'Lokaltog/vim-easymotion' | |
Plug 'Yggdroot/indentLine' | |
Plug 'pangloss/vim-javascript', { 'for': 'javascript' } | |
Plug 'jelera/vim-javascript-syntax', { 'for': 'javascript' } | |
Plug 'StanAngeloff/php.vim', { 'for': 'php' } | |
Plug 'elzr/vim-json', { 'for': 'json' } | |
Plug 'tpope/vim-surround' | |
Plug 'scrooloose/syntastic' | |
Plug 'godlygeek/tabular' | |
Plug 'plasticboy/vim-markdown', { 'for': 'markdown' } | |
Plug 'arnaud-lb/vim-php-namespace' | |
Plug 'jdkanani/vim-material-theme' | |
Plug 'elixir-lang/vim-elixir', { 'for': 'elixir' } | |
Plug 'lambdatoast/elm.vim', { 'for': 'elm' } | |
Plug 'altercation/vim-colors-solarized' | |
Plug 'nvie/vim-flake8' | |
Plug 'morhetz/gruvbox' | |
Plug 'vimwiki/vimwiki' | |
Plug 'daylerees/colour-schemes', { 'rtp': 'vim/' } | |
call plug#end() | |
filetype plugin indent on | |
" Key Bindings | |
" ------------------------------ | |
let mapleader = "," | |
" Switch buffer | |
map <leader>n <esc>:bprevious<CR> | |
map <leader>m <esc>:bnext<CR> | |
"Close buffer | |
nmap <leader>bq :bp <BAR> bd #<CR> | |
" Trim trailing whitespace | |
map <leader>t <esc>:% s/\s\+$//<CR> | |
" PHP Lint | |
map <leader>l <esc>:! php -l %<CR> | |
" Open NERDTree | |
nnoremap <silent> <C-e> :NERDTreeToggle<CR> | |
map <silent> <F11> :call system("wmctrl -ir " . v:windowid . " -b toggle,fullscreen")<CR> | |
function! IPhpInsertUse() | |
call PhpInsertUse() | |
call feedkeys('a', 'n') | |
endfunction | |
autocmd FileType php inoremap <Leader>u <Esc>:call IPhpInsertUse()<CR> | |
autocmd FileType php noremap <Leader>u :call PhpInsertUse()<CR> | |
autocmd FileType php inoremap <Leader>e <Esc>:call IPhpExpandClass()<CR> | |
autocmd FileType php noremap <Leader>e :call PhpExpandClass()<CR> | |
" Settings | |
" ------------------------------ | |
syntax on | |
set background=dark | |
colorscheme gruvbox | |
set guifont=Fira_Code:h14 | |
set linespace=10 | |
set cc=80 | |
set number | |
set tw=79 | |
set nowrap | |
set fo-=t | |
set tabstop=4 | |
set softtabstop=4 | |
set shiftwidth=4 | |
set shiftround | |
set expandtab | |
set nobackup | |
set nowritebackup | |
set noswapfile | |
set smarttab | |
" Plugin Settings | |
" ------------------------------ | |
set laststatus=2 | |
let g:airline_powerline_fonts = 1 | |
let g:airline#extensions#tabline#enabled = 1 | |
let g:airline#extensions#tabline#fnamemod = ':t' | |
let g:NERDTreeChDirMode = 2 | |
let g:ctrlp_working_path_mode = 'rw' | |
let g:gruvbox_contrast_dark = 'hard' | |
let g:gruvbox_contrast_light = 'medium' | |
" GUI Settings | |
" ------------------------------ | |
set guioptions-=r | |
set guioptions-=m | |
set guioptions-=T | |
set guioptions-=L | |
function! PhpSyntaxOverride() | |
hi! def link phpDocTags phpDefine | |
hi! def link phpDocParam phpType | |
endfunction | |
augroup phpSyntaxOverride | |
autocmd! | |
autocmd FileType php call PhpSyntaxOverride() | |
augroup END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment