Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E216: No such event #36

Closed
raratiru opened this issue Dec 8, 2013 · 4 comments
Closed

E216: No such event #36

raratiru opened this issue Dec 8, 2013 · 4 comments

Comments

@raratiru
Copy link

raratiru commented Dec 8, 2013

I have just installed spf13 and I receive the following error upon initializing vim:

Error detected while processing /home/flyer/.spf13-vim-3/.vim/bundle/vim-sneak/plugin/sneak.vim:
line  338:
E216: No such event: netrw autocmd SneakPluginNetrw CursorMoved <buffer> call <sid>map_netrw_key('s') | call <sid>map_netrw_key('S') | autocmd! SneakPluginNetrw * <buffer>
Press ENTER or type command to continue

I am running on Fedora 19,

vim-X11.x86_64                         2:7.4.027-2.fc19                @updates 
vim-common.x86_64                      2:7.4.027-2.fc19                @updates 
vim-enhanced.x86_64                    2:7.4.027-2.fc19                @updates 
vim-filesystem.x86_64                  2:7.4.027-2.fc19                @updates 
vim-minimal.x86_64                     2:7.4.027-2.fc19                @updates

However, on my 32-bit laptop with the same OS, everything works fine.

@justinmk
Copy link
Owner

justinmk commented Dec 8, 2013

@raratiru Thanks for the report!

What is the output for the following commands:

:au SneakPluginNetrw
:au filetype
:au FileType
:au CursorMoved

autocmd event names are not supposed to be case-sensitive but I'm wondering if that is the problem.

In ~/.spf13-vim-3/.vim/bundle/vim-sneak/plugin/sneak.vim: if you change line 338 to the following:

    autocmd FileType netrw autocmd SneakPluginNetrw CursorMoved <buffer>
          \ call <sid>map_netrw_key('s') | call <sid>map_netrw_key('S') | autocmd! SneakPluginNetrw * <buffer>

then restart vim, does the problem go away?

To workaround the issue, you can disable sneak netrw mapping by adding this to your vimrc:

let g:sneak#map_netrw = 0

justinmk added a commit that referenced this issue Dec 8, 2013
@raratiru
Copy link
Author

raratiru commented Dec 8, 2013

OK, thanx! The case-sensitive proof line, solved the issue!

I have changed line 338 to the suggested:

autocmd FileType netrw autocmd SneakPluginNetrw CursorMoved <buffer>
          \ call <sid>map_netrw_key('s') | call <sid>map_netrw_key('S') | autocmd! SneakPluginNetrw * <buffer>

and worked just fine. I also post the output of the commands before the above change:

:au SneakPluginNetrw
--- Auto-Commands ---
Press ENTER or type command to continue
au filetype
--- Auto-Commands ---
filetype  BufNewFile
    *.stp     set filetype=stp
    *.stp     set filetype=stp
filetype  BufRead
    *.stp     set filetype=stp
    *.stp     set filetype=stp
Press ENTER or type command to continue
:au FileType
--- Auto-Commands ---
filetypeplugin  FileType
    *         call s:LoadFTPlugin()
filetypeindent  FileType
    *         call s:LoadIndent()
FileType
    gitcommit au! BufEnter COMMIT_EDITMSG call setpos('.', [0, 1, 1, 0])
    c         autocmd BufWritePre <buffer> if !exists('g:spf13_keep_trailing_whitespace') | call StripTrailingWhitespace() | endif
    cpp       autocmd BufWritePre <buffer> if !exists('g:spf13_keep_trailing_whitespace') | call StripTrailingWhitespace() | endif
 java      autocmd BufWritePre <buffer> if !exists('g:spf13_keep_trailing_whitespace') | call StripTrailingWhitespace() | endif
    go        autocmd BufWritePre <buffer> if !exists('g:spf13_keep_trailing_whitespace') | call StripTrailingWhitespace() | endif
    php       autocmd BufWritePre <buffer> if !exists('g:spf13_keep_trailing_whitespace') | call StripTrailingWhitespace() | endif
    javascript
              autocmd BufWritePre <buffer> if !exists('g:spf13_keep_trailing_whitespace') | call StripTrailingWhitespace() | endif
    python    autocmd BufWritePre <buffer> if !exists('g:spf13_keep_trailing_whitespace') | call StripTrailingWhitespace() | endif
    twig      autocmd BufWritePre <buffer> if !exists('g:spf13_keep_trailing_whitespace') | call StripTrailingWhitespace() | endif
    xml       autocmd BufWritePre <buffer> if !exists('g:spf13_keep_trailing_whitespace') | call StripTrailingWhitespace() | endif
    yml       autocmd BufWritePre <buffer> if !exists('g:spf13_keep_trailing_whitespace') | call StripTrailingWhitespace() | endif
    go        autocmd BufWritePre <buffer> Fmt
    haskell   setlocal expandtab shiftwidth=2 softtabstop=2
              setlocal commentstring=--\ %s
              setlocal nospell
    *if       &omnifunc == "" |setlocal omnifunc=syntaxcomplete#Complete |endif
    xhtml     ru ftplugin/html/autoclosetag.vim
    xml       ru ftplugin/html/autoclosetag.vim
    css       setlocal omnifunc=csscomplete#CompleteCSS
    html      setlocal omnifunc=htmlcomplete#CompleteTags
    markdown  setlocal omnifunc=htmlcomplete#CompleteTags
    javascript
              setlocal omnifunc=javascriptcomplete#CompleteJS
    python    setlocal omnifunc=pythoncomplete#Complete
    xml       setlocal omnifunc=xmlcomplete#CompleteTags
    ruby      setlocal omnifunc=rubycomplete#Complete
    haskell   setlocal omnifunc=necoghc#omnifunc
syntaxset  FileType
    *         exe "set syntax=" . expand("<amatch>")
FileType
    python    nmap <buffer> <leader>l :PymodeLint<CR>
airline  FileType
    *         call <sid>on_window_changed()
indent_guides  FileType
    *         call indent_guides#process_autocmds()
fugitive  FileType
    netrw     call fugitive#detect(expand('%:p'))
fugitive_blame  FileType
    fugitiveblame
              setlocal nomodeline | if exists('b:git_dir') | let &l:keywordprg = s:repo().keywordprg() | endif
fugitive_files  FileType
    git       if exists('b:git_dir') |  call s:JumpInit() | endif
NERDCommenter  FileType
    *         :call s:SetUpForNewFiletype(&filetype, 1)
FileType
    php       set kp=:help
railsPluginDetect  FileType
    netrw     if !exists("b:rails_root") | call s:Detect(expand("%:p")) | endif | if exists("b:rails_root") | silent doau User BufEnterRails | endif
CCTreeMaps  FileType
    *         if &ft == 'c'|| &ft == 'cpp' | call s:CCTreeBufferKeyMappingsCreate(s:CCTreeKeyMappings)| endif
TagbarAutoCmds  FileType
    *         call s:AutoUpdate(fnamemodify(expand('<afile>'), ':p'), 0)

:au CursorMoved
--- Auto-Commands ---
CursorMoved
    *         call UndotreeUpdate()
CCTreeGeneral  CursorMoved
    CCTree-View
              call s:CCTreeGlobals.mCursorHoldHandleEvent()
matchparen  CursorMoved
    *         call s:Highlight_Matching_Pair()
CursorMoved
    *         call <sid>sync_active_winnr()
Press ENTER or type command to continue

@raratiru raratiru closed this as completed Dec 8, 2013
@justinmk
Copy link
Owner

justinmk commented Dec 8, 2013

@raratiru Ha! That's really bizarre. au filetype and au FileType clearly have different output on your system, but not on mine. And :help autocmd says explicitly that case should not matter.

Thanks for reporting back!

@raratiru
Copy link
Author

raratiru commented Dec 8, 2013

Thank you for your help and great plugin!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants