Unset read-only when editing a read-only file rather than complaining + separate syntastic quiet messages out by language and checker

This commit is contained in:
Kevin MacMartin 2015-02-27 11:21:28 -05:00
parent 2f82c4fc84
commit 9f8313a45a
2 changed files with 26 additions and 11 deletions

View file

@ -27,6 +27,9 @@ if has("autocmd") && exists("+omnifunc")
autocmd VimEnter,Filetype * if &omnifunc == ""|setlocal omnifunc=syntaxcomplete#Complete|endif
endif
"prevent warnings when changing read-only files
autocmd FileChangedRO * nested set noreadonly
"FILETPE AND SYNTAX: {{{
"set given filenames to various filetypes
autocmd BufNewFile,BufRead *.aspx,*.asmx,*.ascx,*.master setlocal ft=aspnet

View file

@ -168,26 +168,38 @@ scriptencoding utf-8
let g:autostartchecker=0
else
if (g:autostartchecker == 1)
let g:syntastic_mode_map={'mode':'active','active_filetypes':[],'passive_filetypes':[]}
let g:syntastic_mode_map={
\ 'mode':'active',
\ 'active_filetypes':[],
\ 'passive_filetypes':[]
\ }
let g:syntastic_check_on_open=1
else
let g:syntastic_mode_map={'mode':'passive','active_filetypes':[],'passive_filetypes':[]}
let g:syntastic_mode_map={
\ 'mode':'passive',
\ 'active_filetypes':[],
\ 'passive_filetypes':[]
\ }
let g:syntastic_check_on_open=0
endif
let g:syntastic_quiet_messages={
let g:syntastic_sh_shellcheck_quiet_messages={
\ 'regex':[
\ 'package\ [^\ ]*\ does not exist.*',
\ 'cannot find symbol.*',
\ '.*method does not override or implement a method from a supertype.*',
\ '.*fatal error:[^:]*: No such file or directory.*',
\ '.*line too long.*',
\ '.*appears unused\. Verify it or export it\. \[SC2034\]',
\ 'Expressions don.t expand in single quotes, use double quotes for that\. \[SC2016\]',
\ 'Shebang (#!) missing\. Assuming Bash\. \[SC2148\]',
\ 'trailing whitespace \[W291\]',
\ 'Expressions don.t expand in single quotes, use double quotes for that\. \[SC2016\]'
\ ]}
let g:syntastic_java_javac_quiet_messages={
\ 'regex':[
\ 'cannot find symbol.*',
\ 'method does not override or implement a method from a supertype.*',
\ 'package [^\ ]* does not exist.*'
\ ]}
let g:syntastic_python_flake8_quiet_messages={
\ 'regex':[
\ 'line too long ([^)]*) \[E501\]',
\ 'blank line contains whitespace \[W293\]'
\ ]}
autocmd BufNewFile,BufRead PKGBUILD,bash.bashrc,.bashrc let g:syntastic_quiet_messages={"level":"warnings"}
let g:syntastic_check_on_wq=0
let g:syntastic_always_populate_loc_list=1