~ubuntu-branches/ubuntu/vivid/vim-syntastic/vivid-proposed

« back to all changes in this revision

Viewing changes to plugin/syntastic/modemap.vim

  • Committer: Package Import Robot
  • Author(s): Andrea Capriotti
  • Date: 2015-02-08 13:03:09 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20150208130309-z0n2o15l981tu23j
Tags: 3.6.0-1
* New upstream release
* Fixed debian watch

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
    endif
39
39
endfunction " }}}2
40
40
 
 
41
function! g:SyntasticModeMap.doAutoChecking() " {{{2
 
42
    let local_mode = get(b:, 'syntastic_mode', '')
 
43
    if local_mode ==# 'active' || local_mode ==# 'passive'
 
44
        return local_mode ==# 'active'
 
45
    endif
 
46
 
 
47
    return self.allowsAutoChecking(&filetype)
 
48
endfunction " }}}2
 
49
 
41
50
function! g:SyntasticModeMap.isPassive() " {{{2
42
51
    return self._mode ==# 'passive'
43
52
endfunction " }}}2
62
71
    echo "Syntastic: " . self._mode . " mode enabled"
63
72
endfunction " }}}2
64
73
 
65
 
function! g:SyntasticModeMap.modeInfo(...) " {{{2
66
 
    echomsg 'Syntastic version: ' . g:syntastic_version
67
 
    let type = a:0 ? a:1 : &filetype
 
74
function! g:SyntasticModeMap.modeInfo(filetypes) " {{{2
 
75
    echomsg 'Syntastic version: ' . g:_SYNTASTIC_VERSION
 
76
    let type = len(a:filetypes) ? a:filetypes[0] : &filetype
68
77
    echomsg 'Info for filetype: ' . type
69
78
 
70
79
    call self.synch()
71
 
    echomsg 'Mode: ' . self._mode
 
80
    echomsg 'Global mode: ' . self._mode
72
81
    if self._mode ==# 'active'
73
82
        if len(self._passiveFiletypes)
74
83
            let plural = len(self._passiveFiletypes) != 1 ? 's' : ''
81
90
        endif
82
91
    endif
83
92
    echomsg 'Filetype ' . type . ' is ' . (self.allowsAutoChecking(type) ? 'active' : 'passive')
 
93
 
 
94
    if !len(a:filetypes)
 
95
        if exists('b:syntastic_mode') && (b:syntastic_mode ==# 'active' || b:syntastic_mode ==# 'passive')
 
96
            echomsg 'Local mode: ' . b:syntastic_mode
 
97
        endif
 
98
 
 
99
        echomsg 'The current file will ' . (self.doAutoChecking() ? '' : 'not ') . 'be checked automatically'
 
100
    endif
84
101
endfunction " }}}2
85
102
 
86
103
" }}}1