Cursor jumps to the bottom line
I've just started using nvim-ipy, which is great for me compared with other similar plugins, except one problem I encounter. In a .py file, cells are created using ##. But, the cursor always jumps to the bottom line if I run one of the following
<Plug>(IPy-Run)
<Plug>(IPy-RunCell)
<Plug>(IPy-RunAll)
The problem remains even if I add the following to init.vim.
let g:ipy_celldef = '^##'
NVIM v0.4.2 macOS 10.14.16
[Edit]
- If I run
<Plug>(IPy-RunCell), only a relevant cell is executed as expected. - I expected that the cursor stays or moves to the next cell after executing
<Plug>(IPy-RunCell).
nvim-ipy is now working fine.
nmap <C-c><C-v> <Plug>(IPy-RunCell)
executes a cell and does not move the cursor. I use
nnoremap <C-c><C-c> :execute "normal \<Plug>(IPy-RunCell)"<CR> <ESC> /^##<CR> :noh<CR>
to execute a cell and move to the next one.
But, the cursor always jumps to the bottom line if I run one of the following
This sounds like an issue with previous neovim versions. Are you using the latest (0.4.2)?
I use Neovim 0.4.2. Two pieces of info which might be relevant:
- Yesterday the problem (the cursor jumps to the last line) disappeared apparently for no reason. This morning I rebooted Mac, and everything seems fine. (Hope things remain as they are.)
- The following code worked fine (i.e. the cursor did not jump) even BEFORE the problem disappeared:
nnoremap <C-c><C-c> :execute "normal \<Plug>(IPy-RunCell)"<CR>
This suggests that setting map might have caused the problem.