Last active
May 8, 2020 13:14
-
-
Save b-durand/d7e382ebe3e07e4f7b785a2d18925cf4 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
set nocompatible " Don't emulate old vi | |
set autoindent " Indent at the same level of the previous line | |
set sm " Show matching brackets/parenthesis | |
set ruler " Show the ruler | |
set nu " Show line numbers | |
" Syntax highlighting | |
if !exists("syntax on") | |
syntax on | |
endif | |
" Search | |
set hlsearch | |
set ignorecase | |
set smartcase | |
" Remove trailing whitespace | |
autocmd FileType php,phtml,twig autocmd BufWritePre <buffer> :call setline(1,map(getline(1,"$"),'substitute(v:val,"\\s\\+$","","")')) | |
" Convert tabs to spaces | |
set expandtab | |
autocmd FileType make setlocal noexpandtab # except for makefile | |
set smarttab | |
" PHP settings | |
let php_query_sql=1 | |
let php_htmlInStrings=1 | |
let php_parent_error_open=1 | |
let php_parent_error_close=1 | |
" Use w!! when you've forgotten to open your file as root | |
cmap w!! w !sudo tee % >/dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment