lambdalisue / jupyter-vim-binding

Jupyter meets Vim. Vimmer will fall in love.
2.1k stars 136 forks source link

Select blocks-of-text in visual mode #37

Closed hrishikeshvganu closed 8 years ago

hrishikeshvganu commented 8 years ago

I can't select from current point till some <pattern> in visual mode like I can do in vim.

See here for what I'm referring to: http://stackoverflow.com/questions/7406949/vim-faster-way-to-select-blocks-of-text-in-visual-mode

lambdalisue commented 8 years ago

Try https://codemirror.net/demo/vim.html If the problem is not observed in the above, let me know the detail procedure, 1) How can I re-produce, 2) What is the expected behavior, or whatever.

hrishikeshvganu commented 8 years ago

I checked the codemirror link you gave. The problem does not occur in that demo.

To reproduce the problem in Ipython:

  1. Type following text: "Mary had a little lamb"
  2. With cursor on "M" type v/lamb/ in Command mode
  3. Yank selected test using "y'
  4. Go down and paste ( using p in commadn mode)
  5. Expected behavior is that text till "Lamb" i.e. "Mary had a little " should be pasted
lambdalisue commented 8 years ago

tl;dr I confirmed but this is Jupyter's problem I guess.

Detail I freshly installed a jupyter with pip3 (python3) like

$ pip3 install jupyter

And confirmed that issue. I found that the version of CodeMirror in Jupyter is 5.5.0 and the version in the demo is 5.9.1. While this plugin use CodeMirror's Vim mode, I think the issue was fixex after version 5.5.0 but no evidence.

It seems the latest version of Jupyter use at least 5.8.0 so using Jupyter in GitHub may solve this issue.

https://github.com/jupyter/notebook/blob/67a7422d3c799c41340553af30ad9c7d5bd86458/bower.json#L8

hrishikeshvganu commented 8 years ago

OK. I'll pull jupyter from github. Thanks for looking into it quickly. The vim binding is amazing-makes coding a lot easier

lambdalisue commented 8 years ago

Let me know if that fix the issue ;-)