jupyter-vim-binding icon indicating copy to clipboard operation
jupyter-vim-binding copied to clipboard

Evaluate Markdown

Open yjk21 opened this issue 8 years ago • 8 comments

Summary

Environment

  • [ ] Operating system : Mac OS X 10.10.5
  • [ ] Web browser : Chrome 48.0.2564.116 (64-bit)
  • [ ] Version or revision of Jupyter Notebook : jupyter 4.0.6
  • [ ] Revision of jupyter-vim-binding : c1dd836154041ab8684008f426a13afedd335b4e

Behavior

I can evaluate code cells with Cmd-Enter, but Markdown cells only evaluate with Shift-Enter (the cursor jumps into the next cell). Cmd-Enter in Markdown cells is ignored.

Expected

Markdown should be evaluated with Cmd-Enter

Actual

Step by step procedure

  1. Start local Jupyter Notebook by jupyter notebook
  2. Access http://localhost:8888/
  3. Switch cell type to markdown and enter some text
  4. Hit Cmd-Enter to evaluate

Thanks

yjk21 avatar Mar 15 '16 17:03 yjk21

While Cmd-Enter (or Ctrl-Enter) re-enter to the text as Insert Mode, the markdown won't be rendered.

This is a expected behaviour and I couldn't be bothered to make a special command for just markdown cell (I don't want to change the behaviour for code cell).

PR is welcome :-)

lambdalisue avatar Mar 16 '16 10:03 lambdalisue

I changed my mind. I think Cmd/Ctrl-Enter on Markdown cell should enter Jupyter mode to accept markdown rendering.

I'll change the current behaviour when I have time.

lambdalisue avatar Jun 19 '16 02:06 lambdalisue

Sorry for super late. I applied the change to develop branch so could you try? @yjk21 @scanny

lambdalisue avatar Sep 15 '16 04:09 lambdalisue

Hmm... How do you navigate back to other tabs or do other stuff? For example, there is a tiling plugin for Firefox; I've put in some keyboard shortcuts to be able to navigate the tiles in a vaguely vimmish way. With Vimperator fully disabled on Jupyter tabs, its Ctrl-Tab to navigate away, unless there's a better way?

dabro avatar Sep 15 '16 16:09 dabro

How do you navigate back to other tabs or do other stuff?

I use a mouse unfortunately. It is better to control browser by keyboard as well but I don't think we have enough keys to manipulate both Jupyter and Browser (at least, reasonable keys would conflict).

unless there's a better way?

I usually open two browsers. One for jupyter and another for searching. So I stack on a single (or few) tab for jupyter and use Vimperator for searching. This is just my workaround.

lambdalisue avatar Sep 16 '16 01:09 lambdalisue

@lambdalisue: that seems to work nicely! :)

I'll continue to test and see if I come across any unintended side-effects, but certainly for Markdown it makes a smoother workflow :)

Only tangentially related, but it occurred to me that maybe :q might be made an alias to Shift-Esc as another way to get into Jupyter mode from Vim command-mode while still keeping hands on home row. If you think that has potential, let me know and I'll be happy to open up a separate issue.

scanny avatar Sep 16 '16 04:09 scanny

Only tangentially related, but it occurred to me that maybe :q might be made an alias to Shift-Esc as another way to get into Jupyter mode from Vim command-mode while still keeping hands on home row. If you think that has potential, let me know and I'll be happy to open up a separate issue.

Sounds nice for now. Please make a separate issue and ask other people about that idea ;-)

lambdalisue avatar Sep 16 '16 04:09 lambdalisue

~~Control-T is great when current page disabled vim browser plugin.~~ :smiley:

God, it's Control-Tab. Even better, works all the time!

district10 avatar Jan 13 '17 06:01 district10