michaeljsmith / vim-indent-object

Vim plugin that defines a new text object representing lines of code at the same indent level. Useful for python/vim scripts, etc.
http://www.vim.org/scripts/script.php?script_id=3037
MIT License
735 stars 61 forks source link

do not select a line #4

Closed habamax closed 14 years ago

habamax commented 14 years ago

Place cursor on self.draw_cell(i,j) and press vii -- the line is not selected. If you press dii then current symbol is deleted.

def draw_board(self):
    for i in range(cfg.COL_COUNT):
        for j in range(cfg.ROW_COUNT):
            self.draw_cell(i, j)
habamax commented 14 years ago

And a bit more -- place cursor to the second for, press vii and ii. Everything is selected but only 3 last lines should.

michaeljsmith commented 14 years ago

The second thing you mentioned should be fixed now.

I don't fully understand the first issue - when I press vii it selects all the text on the line (but not the whitespace at the start or the newline). I set it up to work this way - this way when you press cii for instance you can immediately replace the contents of the for loop. If you want to select the whole line, you can use Vii.

Is this the behaviour you get?

habamax commented 14 years ago

when I press vii on self.draw -- I am in a visual mode with only one symbol (current) selected. I use sources from 1.1 tag.

habamax commented 14 years ago

I have just downloaded the latest sources and the bug is still there -- only one symbol is selected.

Just to clarify: cursor is on s letter, I press vii. Letter s is selected.

habamax commented 14 years ago

I have tried it with vim -u NONE NONE and it works just fine -- looks like my .vimrc has smth that breaks your plugin. Checking...

habamax commented 14 years ago

If I comment out set ignorecase then it works for me. Could you pls check?

michaeljsmith commented 14 years ago

Ok should be fixed now. Thanks for pointing that out, never would have tested it otherwise. Strange that the result of '==' is affected by ignorecase!

habamax commented 14 years ago

thx!