vim-easymotion
vim-easymotion copied to clipboard
W motion error when the computed motion jumps over _any_ Python code
I use junegunn/vim-plug manager. Here is my minimum .vimrc. I added a line as advised in #44
set foldmethod=indent
let g:EasyMotion_skipfoldedline = 0
call plug#begin('~/.vim/plugged')
Plug 'easymotion/vim-easymotion'
call plug#end()
Here is a simple Python file for testing convenience:
import this
def test_this():
print()
print()
print()
def test_that():
print()
print()
print()
To reproduce the error:
- :x: Fold the
test_thisfunction, put cursor above the folded function, then press<Leader><Leader>w. Error. - :heavy_check_mark: Put cursor below the folded function, then press
<Leader><Leader>w. It works. - :x: j motion errors out when trying to jump over folds.
- :heavy_check_mark: b motion can jump over folds without any error.
- :heavy_check_mark: k motion can jump over folds without any error.
Strangely though, I have tried "jumping over folds" with my .vimrc and it works very well. I've only observed this in Python.
The error message in the vim status bar is:
EasyMotion: Vim(call):E475: Invalid argument: -1 : function EasyMotion#WB[4]..<SNR>32_EasyMotion, line 109