diff options
author | tdro <tdro@users.noreply.github.com> | 2021-08-09 18:22:30 -0400 |
---|---|---|
committer | tdro <tdro@users.noreply.github.com> | 2021-08-09 18:22:30 -0400 |
commit | a792603dec553feb650ccfeeb25449d0743f40f1 (patch) | |
tree | c157f40196f268508af196bd92e0e24f7b559648 /.vimrc | |
parent | bbce218a4c8ab7de39781de0d4a9caf0c49fb336 (diff) | |
download | dotfiles-a792603dec553feb650ccfeeb25449d0743f40f1.tar.gz dotfiles-a792603dec553feb650ccfeeb25449d0743f40f1.tar.bz2 dotfiles-a792603dec553feb650ccfeeb25449d0743f40f1.zip |
.vimrc: Bring back HTML format and remove PHP format to bottom
Diffstat (limited to '.vimrc')
-rw-r--r-- | .vimrc | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -27,6 +27,7 @@ call plug#end() " Initialize plugin system "------------General------------" let mapleader = "\<space>" " Set default map leader. +let php_htmlInStrings = 1 " Highlight HTML in PHP. set ruler " Show the cursor position all the time. set nowrap " Do not wrap lines. @@ -80,8 +81,6 @@ set sidescroll=3 " Set horizontal column scroll. set sidescrolloff=10 " Set horizontal scroll headroom. set foldcolumn=2 " Set fold column width to 2. -let php_htmlInStrings = 1 " Highlight HTML in PHP. - " Convert tab to spaces. set tabstop=2 softtabstop=0 shiftwidth=2 smarttab expandtab @@ -101,11 +100,6 @@ set guioptions-=e " Remove tab bar in GUI. "---------------Functions---------------" -" PHP Fixer -function! PHPFix() - :exe 'Notify(''phpcbf ' . expand('%') . ' 2>&1'')' | :e -endfunction - " Ansible Check function! AnsibleCheck() :exe 'Notify(''ansible-playbook --syntax-check ' . expand('%') . ' 2>&1'')' | :e @@ -310,13 +304,14 @@ augroup AutoCommands autocmd BufWritePost plugins.vim source % | Notify('printf "Plugins configuration sourced."') " Linting extension post write commands. - autocmd BufWritePost *.php :call PHPFix() autocmd BufWritePost *.txt,*.md :only | :term ++rows=10 vale % autocmd BufWritePost *.lit exe 'Notify(''lit ' . expand('%') . ' 2>&1 && printf "Literate OK: ' . expand('%') . '"'')' " Linting file type post write commands. + autocmd FileType php autocmd! BufWritePost <buffer> exe 'Notify(''phpcbf ' . expand('%') . ' 2>&1'')' | :e autocmd FileType typescript autocmd! BufWritePost <buffer> exe 'Notify(''deno fmt ' . expand('%') . ' 2>&1'')' | :e autocmd FileType css autocmd! BufWritePost <buffer> exe 'Notify(''prettier --write --parser css ' . expand('%') . ' 2>&1'')' | :e + autocmd FileType html autocmd! BufWritePost <buffer> exe 'Notify(''prettier --write --parser html ' . expand('%') . ' 2>&1'')' | :e autocmd FileType ruby autocmd! BufWritePost <buffer> exe 'Notify(''rufo ' . expand('%') . ' 2>&1 && rubocop ' . expand('%') . ' 2>&1'')' | :e autocmd FileType javascript autocmd! BufWritePost <buffer> exe 'Notify(''eslint -c $HOME/.config/eslintrc.yml --fix ' . expand('%') . ' 2>&1'')' | :e autocmd FileType rust autocmd! BufWritePost <buffer> exe 'Notify(''rustfmt ' . expand('%') . ' 2>&1 && printf "rustfmt OK: ' . expand('%') . '"'')' | :e |