Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

pyflakes mappings break "d" in visual mode #24

Open
gfxmonk opened this Issue · 3 comments

4 participants

@gfxmonk

if you press "d" in visual mode, it typically deletes the tesxt instantly. But because of pyflakes mapping "dd", "d" becomes ambiguous and you have to wait a second before it actually deletes the text.

The fix is to use nnoremap instead of just noremap in pyflakes.vim, like so:

nnoremap dd dd:PyflakesUpdate
nnoremap dw dw:PyflakesUpdate
nnoremap u u:PyflakesUpdate
nnoremap :PyflakesUpdate

@mika-fischer

And

vnoremap <buffer><silent>d d:PyflakesUpdate<CR>

could also be added.

In the meantime I'm using the following in $HOME/.vim/after/ftplugin/python.vim as a workaround:

unmap <buffer>dd
unmap <buffer>dw
nnoremap <buffer><silent>dd dd:PyflakesUpdate<CR>
nnoremap <buffer><silent>dd dd:PyflakesUpdate<CR>
vnoremap <buffer><silent>d d:PyflakesUpdate<CR>
@Sakartu

this is a duplicate of issue #31 where I also suggested the nnoremap version. The versions are a nice addition.

@axil axil referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@axil axil referenced this issue from a commit in axil/pyflakes-vim
Lev Maximov fix for issue #24 8ae9c38
@axil

created the patch from gfxmonk and mika-fischer suggestions: 8ae9c38

@tmhedberg tmhedberg referenced this issue from a commit in tmhedberg/pyflakes-vim
Lev Maximov fix for issue #24 ec6cc12
@axil axil referenced this issue from a commit in axil/pyflakes-vim
Lev Maximov fix for issue #24 194da2f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.