Giter Site home page Giter Site logo

E216: No such event about vim-sneak HOT 4 CLOSED

justinmk avatar justinmk commented on May 18, 2024
E216: No such event

from vim-sneak.

Comments (4)

justinmk avatar justinmk commented on May 18, 2024

@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

from vim-sneak.

raratiru avatar raratiru commented on May 18, 2024

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

from vim-sneak.

justinmk avatar justinmk commented on May 18, 2024

@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!

from vim-sneak.

raratiru avatar raratiru commented on May 18, 2024

Thank you for your help and great plugin!

from vim-sneak.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.