Replace syntastic with ale

This commit is contained in:
Kevin MacMartin 2018-03-13 11:32:04 -04:00
parent c9fd2f8a21
commit ae8ba0a227
10 changed files with 120 additions and 264 deletions

9
.gitmodules vendored
View file

@ -31,9 +31,6 @@
[submodule "vim/bundle/vimfiler.vim"] [submodule "vim/bundle/vimfiler.vim"]
path = vim/bundle/vimfiler.vim path = vim/bundle/vimfiler.vim
url = https://github.com/Shougo/vimfiler.vim.git url = https://github.com/Shougo/vimfiler.vim.git
[submodule "vim/bundle/syntastic"]
path = vim/bundle/syntastic
url = https://github.com/scrooloose/syntastic.git
[submodule "vim/bundle/tcomment_vim"] [submodule "vim/bundle/tcomment_vim"]
path = vim/bundle/tcomment_vim path = vim/bundle/tcomment_vim
url = https://github.com/tomtom/tcomment_vim.git url = https://github.com/tomtom/tcomment_vim.git
@ -121,3 +118,9 @@
[submodule "vim/bundle/splitjoin.vim"] [submodule "vim/bundle/splitjoin.vim"]
path = vim/bundle/splitjoin.vim path = vim/bundle/splitjoin.vim
url = https://github.com/AndrewRadev/splitjoin.vim url = https://github.com/AndrewRadev/splitjoin.vim
[submodule "vim/bundle/ale"]
path = vim/bundle/ale
url = https://github.com/w0rp/ale
[submodule "vim/bundle/lightline-ale"]
path = vim/bundle/lightline-ale
url = https://github.com/maximbaz/lightline-ale

View file

@ -129,13 +129,14 @@ As usual, to have your system use `vimpager` in place of `less`, you'll need to
| ?N | N | Go to the next spelling mistake | | ?N | N | Go to the next spelling mistake |
| ?P | N | Go to the previous spelling mistake | | ?P | N | Go to the previous spelling mistake |
#### Formatting #### #### Fixing and Formatting ####
| Binding | Mode | Action | | Binding | Mode | Action |
|----------|------|---------------------------------------------------------------| |----------|------|---------------------------------------------------------------|
| Leader+J | N+V | Format line/selected lines to a max width of the _textwidth_ | | Leader+J | N+V | Format line/selected lines to a max width of the _textwidth_ |
| Leader+f | N+V | Format document/selection alignment using Vim syntax | | Leader+f | N+V | Format document/selection alignment using Vim syntax |
| Leader+f | N+V | (Markdown) Format table cursor is currently on | | Leader+f | N+V | (Markdown) Format table cursor is currently on |
| Leader+F | N | Fix document with available ale fixers |
| Leader+t | N | Convert all tabs into spaces and continue session with spaces | | Leader+t | N | Convert all tabs into spaces and continue session with spaces |
| Leader+T | N | Convert all spaces into tabs and continue session with tabs | | Leader+T | N | Convert all spaces into tabs and continue session with tabs |
| Leader+w | N | Remove all trailing whitespace | | Leader+w | N | Remove all trailing whitespace |

1
vim/bundle/ale Submodule

@ -0,0 +1 @@
Subproject commit 05d39bc1a9eb79ff6f36b190b4612ff052812e7e

@ -0,0 +1 @@
Subproject commit cb4610cb2f6655f6fae12aaeffecadf083dc97e6

@ -1 +0,0 @@
Subproject commit b7b473b2688827dcd7d8c801197b8bfc31b20dc4

View file

@ -531,15 +531,9 @@ hi SpellLocal guisp=NONE gui=NONE guifg=NONE guibg=NONE ctermfg=NONE ctermbg=NON
hi! link SignifyLineDelete DiffDelete hi! link SignifyLineDelete DiffDelete
hi! link SignifyLineChange DiffChange hi! link SignifyLineChange DiffChange
"syntastic "ale
call s:X("SyntasticError","#d75f5f","","standout,bold","Red","") call s:X("ALEErrorSign","#d75f5f","","standout,bold","Red","")
call s:X("SyntasticWarning","#ffd787","","standout,bold","Yellow","") call s:X("ALEWarningSign","#ffd787","","standout,bold","Yellow","")
hi! link SyntasticErrorLine SyntasticError
hi! link SyntasticWarningLine SyntasticWarning
hi! link SyntasticErrorSign SyntasticError
hi! link SyntasticWarningSign SyntasticWarning
hi! link qfSeparator Delimiter
hi! link qfLineNr SyntasticError
"taglist "taglist
hi! link TagListFileName Directory hi! link TagListFileName Directory

View file

@ -177,11 +177,12 @@
" <Backspace> | (I) -> (neocomplete) close the popup and <Backspace> " <Backspace> | (I) -> (neocomplete) close the popup and <Backspace>
" <Ctrl-u> | (I) -> (neocomplete) undo the most recent completion " <Ctrl-u> | (I) -> (neocomplete) undo the most recent completion
" "
" (formatting) " (fixing-and-formatting)
" <Leader>J | (N) -> split document into lines of tw or 80 " <Leader>J | (N) -> split document into lines of tw or 80
" <Leader>J | (V) -> split selection into lines of tw or 80 " <Leader>J | (V) -> split selection into lines of tw or 80
" <Leader>f | (N) -> format document and return to cursor " <Leader>f | (N) -> format document and return to cursor
" <Leader>f | (V) -> format the selection and return to cursor " <Leader>f | (V) -> format the selection and return to cursor
" <Leader>F | (N) -> run available ale fixers on the document
" <Leader>t | (N) -> convert tabs into spaces " <Leader>t | (N) -> convert tabs into spaces
" <Leader>T | (N) -> convert spaces into tabs " <Leader>T | (N) -> convert spaces into tabs
" <Leader>w | (N) -> remove whitespace " <Leader>w | (N) -> remove whitespace
@ -522,16 +523,16 @@
nnoremap <silent><expr> <Space>0 'zX:echo "all folds have been reset"<CR>' nnoremap <silent><expr> <Space>0 'zX:echo "all folds have been reset"<CR>'
"view commit history and diffs "view commit history and diffs
nnoremap <expr><silent> <F9> ':SyntasticToggleOff<CR>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>' nnoremap <expr><silent> <F9> ':Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
xnoremap <expr><silent> <F9> '<Esc>:SyntasticToggleOff<CR>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>' xnoremap <expr><silent> <F9> '<Esc>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
inoremap <expr><silent> <F9> '<Esc>:SyntasticToggleOff<CR>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>' inoremap <expr><silent> <F9> '<Esc>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
nnoremap <expr><silent> <C-F9> ':SyntasticToggleOff<CR>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>' nnoremap <expr><silent> <C-F9> ':Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
xnoremap <expr><silent> <C-F9> '<Esc>:SyntasticToggleOff<CR>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>' xnoremap <expr><silent> <C-F9> '<Esc>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
inoremap <expr><silent> <C-F9> '<Esc>:SyntasticToggleOff<CR>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>' inoremap <expr><silent> <C-F9> '<Esc>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
nnoremap <expr><silent> <A-F9> ':SyntasticToggleOff<CR>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>' nnoremap <expr><silent> <A-F9> ':Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
xnoremap <expr><silent> <A-F9> '<Esc>:SyntasticToggleOff<CR>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>' xnoremap <expr><silent> <A-F9> '<Esc>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
inoremap <expr><silent> <A-F9> '<Esc>:SyntasticToggleOff<CR>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>' inoremap <expr><silent> <A-F9> '<Esc>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
nnoremap <silent><expr> <Leader>} ':SyntasticToggleOff<CR>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>' nnoremap <silent><expr> <Leader>} ':Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
"bindings to trigger the tagbar list of tags "bindings to trigger the tagbar list of tags
nnoremap <silent><expr> <F10> ':TagbarToggle<CR>:echo "tagbar toggled"<CR>' nnoremap <silent><expr> <F10> ':TagbarToggle<CR>:echo "tagbar toggled"<CR>'
@ -595,15 +596,15 @@
set pastetoggle=<F3> set pastetoggle=<F3>
"toggle syntax checking "toggle syntax checking
nnoremap <silent><expr> <F4> ':SyntasticToggleAll<CR>' nnoremap <silent><expr> <F4> ':ALEToggle<CR>'
xnoremap <silent><expr> <F4> '<Esc>:SyntasticToggleAll<CR>gv' xnoremap <silent><expr> <F4> '<Esc>:ALEToggle<CR>gv'
inoremap <silent><expr> <F4> '<C-O>:SyntasticToggleAll<CR>' inoremap <silent><expr> <F4> '<C-O>:ALEToggle<CR>'
nnoremap <silent><expr> <C-F4> ':SyntasticToggleAll<CR>' nnoremap <silent><expr> <C-F4> ':ALEToggle<CR>'
xnoremap <silent><expr> <C-F4> '<Esc>:SyntasticToggleAll<CR>gv' xnoremap <silent><expr> <C-F4> '<Esc>:ALEToggle<CR>gv'
inoremap <silent><expr> <C-F4> '<C-O>:SyntasticToggleAll<CR>' inoremap <silent><expr> <C-F4> '<C-O>:ALEToggle<CR>'
nnoremap <silent><expr> <A-F4> ':SyntasticToggleAll<CR>' nnoremap <silent><expr> <A-F4> ':ALEToggle<CR>'
xnoremap <silent><expr> <A-F4> '<Esc>:SyntasticToggleAll<CR>gv' xnoremap <silent><expr> <A-F4> '<Esc>:ALEToggle<CR>gv'
inoremap <silent><expr> <A-F4> '<C-O>:SyntasticToggleAll<CR>' inoremap <silent><expr> <A-F4> '<C-O>:ALEToggle<CR>'
"toggle goyo "toggle goyo
nnoremap <silent><expr> <Leader>` ':Goyo<CR>' nnoremap <silent><expr> <Leader>` ':Goyo<CR>'
@ -702,15 +703,18 @@
endif endif
"} "}
"FORMATTING:{ "FIXING AND FORMATTING:{
"format width to text width (or 80 chars if text width is 0) "format width to text width (or 80 chars if text width is 0)
nnoremap <silent><expr> <Leader>J ':let b:tw=&textwidth<CR>:if (b:tw == 0)<Bar>set tw=80<Bar>endif<CR>gg0vG$gq:if (b:tw == 0)<Bar>set tw=0<Bar>let b:tw=80<Bar>endif<CR>:echo "Document has been formatted to a width of ".b:tw." characters"<CR>' nnoremap <silent><expr> <Leader>J ':let b:tw=&textwidth<CR>:if (b:tw == 0)<Bar>set tw=80<Bar>endif<CR>gg0vG$gq:if (b:tw == 0)<Bar>set tw=0<Bar>let b:tw=80<Bar>endif<CR>:echo "Document has been formatted to a width of ".b:tw." characters"<CR>'
vnoremap <silent><expr> <Leader>J '<Esc>:let b:tw=&textwidth<CR>:if (b:tw == 0)<Bar>set tw=80<Bar>endif<CR>gvgq:if (b:tw == 0)<Bar>set tw=0<Bar>let b:tw=80<Bar>endif<CR>:echo "Selection has been formatted to a width of ".b:tw." characters"<CR>' vnoremap <silent><expr> <Leader>J '<Esc>:let b:tw=&textwidth<CR>:if (b:tw == 0)<Bar>set tw=80<Bar>endif<CR>gvgq:if (b:tw == 0)<Bar>set tw=0<Bar>let b:tw=80<Bar>endif<CR>:echo "Selection has been formatted to a width of ".b:tw." characters"<CR>'
"format by Vim syntax + by Autoformat tool syntax "format by Vim syntax
nnoremap <Leader>f mzgg=G`z<CR>:echo "The document has been formatted"<CR> nnoremap <Leader>f mzgg=G`z<CR>:echo "The document has been formatted"<CR>
vnoremap <Leader>f mz=`z<CR>:echo "The selection has been formatted"<CR> vnoremap <Leader>f mz=`z<CR>:echo "The selection has been formatted"<CR>
"fix with ale
nnoremap <silent><expr> <Leader>F ':ALEFix<CR>:echo "Available ale fixers have been run on the document"<CR>'
"convert tabs to spaces and spaces to tabs "convert tabs to spaces and spaces to tabs
nnoremap <silent><expr> <Leader>t ':let b:et=&expandtab<CR>:set expandtab<CR>:retab!<CR>:let &expandtab=b:et<CR>:echo "Tabs have been converted to spaces"<CR>' nnoremap <silent><expr> <Leader>t ':let b:et=&expandtab<CR>:set expandtab<CR>:retab!<CR>:let &expandtab=b:et<CR>:echo "Tabs have been converted to spaces"<CR>'
nnoremap <silent><expr> <Leader>T ':let b:et=&expandtab<CR>:set noexpandtab<CR>:%retab!<CR>:let &expandtab=b:et<CR>:echo "Spaces have been converted to tabs"<CR>' nnoremap <silent><expr> <Leader>T ':let b:et=&expandtab<CR>:set noexpandtab<CR>:%retab!<CR>:let &expandtab=b:et<CR>:echo "Spaces have been converted to tabs"<CR>'

View file

@ -0,0 +1,22 @@
"autostart syntax checking when vim opens to a compatible filetype (default: 0)
if !exists("g:autostartchecker") || &diff
let g:autostartchecker = 0
endif
let g:ale_enabled = g:autostartchecker
" open list of warnings and errors when they exist
let g:ale_open_list = 1
" don't fix on save
let g:ale_fix_on_save = 0
" list of ale fixers
let g:ale_fixers = {
\ 'javascript': [ 'eslint' ]
\ }
" don't run ale on minified files
let g:ale_pattern_options = {
\ '\.min\.[^\.]*$': { 'ale_linters': [], 'ale_fixers': [] },
\ }

View file

@ -32,9 +32,8 @@ function! LLFugitive()
return strlen(_) ? mark._ : '' return strlen(_) ? mark._ : ''
endif endif
catch catch
endtry
return '' return ''
endtry
endfunction endfunction
function! LLFileformat() function! LLFileformat()
@ -67,15 +66,45 @@ function! TagbarStatusFunc(current, sort, fname, ...) abort
return lightline#statusline(0) return lightline#statusline(0)
endfunction endfunction
augroup AutoSyntastic let g:lightline = {}
autocmd!
autocmd BufWritePost * call s:syntastic()
augroup END
function! s:syntastic() let g:lightline.colorscheme = 'darkcloud'
SyntasticCheck let g:lightline#ale#indicator_checking = ""
call lightline#update() let g:lightline#ale#indicator_warnings = "W:"
endfunction let g:lightline#ale#indicator_errors = "E:"
let g:lightline#ale#indicator_ok = "OK"
let g:lightline.component_function = {
\ 'fugitive': 'LLFugitive',
\ 'filename': 'LLFilename',
\ 'fileformat': 'LLFileformat',
\ 'filetype': 'LLFiletype',
\ 'fileencoding': 'LLFileencoding',
\ 'mode': 'LLMode'
\ }
let g:lightline.component_expand = {
\ 'linter_checking': 'lightline#ale#checking',
\ 'linter_warnings': 'lightline#ale#warnings',
\ 'linter_errors': 'lightline#ale#errors',
\ 'linter_ok': 'lightline#ale#ok'
\ }
let g:lightline.component_type = {
\ 'linter_checking': 'left',
\ 'linter_warnings': 'warning',
\ 'linter_errors': 'error',
\ 'linter_ok': 'left'
\ }
let g:lightline.component = {
\ 'tagbar': '%{tagbar#currenttag("[%s]", "", "f")}'
\ }
let g:lightline.active = {
\ 'left': [[ 'mode', 'paste' ], [ 'fugitive', 'filename' ], [ 'tagbar' ]],
\ 'right': [[ 'linter_checking', 'linter_errors', 'linter_warnings', 'linter_ok' ], [ 'lineinfo', 'percent' ], [ 'fileformat', 'fileencoding', 'filetype' ]]
\ }
"status bar config with and without powerline fonts (default: 0) "status bar config with and without powerline fonts (default: 0)
if !exists("g:powerlinefonts") if !exists("g:powerlinefonts")
@ -83,59 +112,11 @@ if !exists("g:powerlinefonts")
endif endif
if (g:powerlinefonts == 1) if (g:powerlinefonts == 1)
let g:lightline = { let g:lightline.separator = { 'left': '', 'right': '' }
\ 'colorscheme': 'darkcloud', let g:lightline.subseparator = { 'left': '', 'right': '' }
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ], [ 'tagbar' ] ],
\ 'right': [ [ 'syntastic', 'lineinfo' ], [ 'percent' ], [ 'fileformat', 'fileencoding', 'filetype' ] ]
\ },
\ 'component_function': {
\ 'fugitive': 'LLFugitive',
\ 'filename': 'LLFilename',
\ 'fileformat': 'LLFileformat',
\ 'filetype': 'LLFiletype',
\ 'fileencoding': 'LLFileencoding',
\ 'mode': 'LLMode',
\ },
\ 'component_expand': {
\ 'syntastic': 'SyntasticStatuslineFlag',
\ },
\ 'component_type': {
\ 'syntastic': 'error',
\ },
\ 'separator': {'left': '', 'right': ''},
\ 'subseparator': {'left': '', 'right': ''},
\ 'component': {
\ 'tagbar': '%{tagbar#currenttag("[%s]", "", "f")}',
\ },
\ }
else else
let g:lightline = { let g:lightline.separator = { 'left': '', 'right': '' }
\ 'colorscheme': 'darkcloud', let g:lightline.subseparator = { 'left': '|', 'right': '|' }
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ], [ 'tagbar' ] ],
\ 'right': [ [ 'syntastic', 'lineinfo' ], [ 'percent' ], [ 'fileformat', 'fileencoding', 'filetype' ] ]
\ },
\ 'component_function': {
\ 'fugitive': 'LLFugitive',
\ 'filename': 'LLFilename',
\ 'fileformat': 'LLFileformat',
\ 'filetype': 'LLFiletype',
\ 'fileencoding': 'LLFileencoding',
\ 'mode': 'LLMode',
\ },
\ 'component_expand': {
\ 'syntastic': 'SyntasticStatuslineFlag',
\ },
\ 'component_type': {
\ 'syntastic': 'error',
\ },
\ 'separator': {'left': '', 'right': ''},
\ 'subseparator': {'left': '|', 'right': '|'},
\ 'component': {
\ 'tagbar': '%{tagbar#currenttag("[%s]", "", "f")}',
\ }
\ }
endif endif
"ligtline theme {{{ "ligtline theme {{{

View file

@ -1,150 +0,0 @@
"autostart syntax checking when vim opens to a compatible filetype (default: 0)
if !exists("g:autostartchecker")
let g:autostartchecker = 0
endif
if &diff
let g:autostartchecker = 0
else
if (g:autostartchecker == 1)
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_check_on_open = 0
endif
"configure warnings/errors that should be silenced by module
let g:syntastic_less_lessc_quiet_messages = {
\ 'regex':[
\ 'NameError:.* is undefined',
\ 'FileError:.*'
\ ]}
let g:syntastic_scss_sass_quiet_messages = {
\ 'regex':[
\ 'File to import not found or unreadable.*'
\ ]}
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_javascript_eslint_quiet_messages = {
\ 'regex':[
\ '.* is defined but never used',
\ "'[^']*' is not defined",
\ 'Missing "use strict" statement',
\ 'Unexpected [^ ]* statement.*'
\ ]}
let g:syntastic_javascript_jshint_quiet_messages = {
\ 'regex':[
\ 'Expected an assignment or function call and instead saw an expression.'
\ ]}
let g:syntastic_javascript_standard_quiet_messages = {
\ 'regex':[
\ '.* is defined but never used',
\ "'[^']*' is not defined"
\ ]}
let g:syntastic_markdown_mdl_quiet_messages = {
\ 'regex':[
\ '.*MD013.*',
\ '.*MD002.*',
\ '.*MD029.*'
\ ]}
let g:syntastic_python_flake8_quiet_messages = {
\ 'regex':[
\ '.*\[W293\]',
\ '.*\[E501\]'
\ ]}
let g:syntastic_php_phpmd_quiet_messages = {
\ 'regex':[
\ 'Avoid using short method names like.*',
\ 'Avoid variables with short names like.*',
\ 'The method.*has [0-9][0-9]* lines of code.*',
\ 'The method.*has a Cyclomatic Complexity.*',
\ 'The method.*has an NPath complexity.*',
\ 'The function.*has a Cyclomatic Complexity.*',
\ 'The function.*has an NPath complexity.*',
\ 'The function.*Avoid really long methods\.',
\ 'The class.*has an overall complexity.*',
\ 'The class.*has.*public methods.*',
\ 'The class.*lines of code'
\ ]}
let g:syntastic_sh_bashate_quiet_messages = {
\ 'regex':[
\ 'Indent not multiple of 4'
\ ]}
let g:syntastic_sh_shellcheck_quiet_messages = {
\ 'regex':[
\ '.*\[SC1001\]',
\ '.*\[SC2015\]',
\ '.*\[SC2016\]',
\ '.*\[SC2029\]',
\ '.*\[SC2034\]',
\ '.*\[SC2148\]',
\ '.*\[SC2181\]',
\ '.*follow non-constant source',
\ 'Not following:'
\ ]}
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
let g:syntastic_auto_loc_list = 1
let g:syntastic_loc_list_height = 5
endif
"function to enable syntastic and set check_on_open on
function s:SyntasticToggleOn()
let g:syntastic_check_on_open = 1
if (g:syntastic_mode_map.mode == "passive")
SyntasticToggleMode
endif
endfunction
command! -buffer SyntasticToggleOn call s:SyntasticToggleOn()
"function to disable syntastic and set check_on_open off
function s:SyntasticToggleOff()
let g:syntastic_check_on_open = 0
if (g:syntastic_mode_map.mode == "active")
SyntasticToggleMode
endif
endfunction
command! -buffer SyntasticToggleOff call s:SyntasticToggleOff()
"function to toggle syntastic and check_on_open on and off together
function s:SyntasticToggleAll()
if (g:syntastic_check_on_open == 1)
call s:SyntasticToggleOff()
else
call s:SyntasticToggleOn()
endif
endfunction
command! -buffer SyntasticToggleAll call s:SyntasticToggleAll()