Hi all,
Thanks for the responses! Yes, I meant that the actions are not shown in
jupyter.
Ok so now I've gotten it to the point where the vim commands are working
(the custom.css file is changing the colors of my prompt), but now the
Jupyter commands are not working, so when I type DD or 'a' or 'b', it's not
deleting or adding any extra cells.
I've read that the problem is the vim extension, but the vim extension is
so good I don't really want to do without it.
Any thoughts as to why it's happening?
This is in my custom.js:
1 // Configure CodeMirror Keymap
2 require([
3 'nbextensions/vim_binding/vim_binding', // depends your installation
4 ], function() {
5 // Map jj to <Esc>
6 CodeMirror.Vim.map("jk", "<Esc>", "insert");
7 // Swap j/k and gj/gk (Note that <Plug> mappings)
8 CodeMirror.Vim.map("j", "<Plug>(vim-binding-gj)", "normal");
9 CodeMirror.Vim.map("k", "<Plug>(vim-binding-gk)", "normal");
10 CodeMirror.Vim.map("gj", "<Plug>(vim-binding-j)", "normal");
11 CodeMirror.Vim.map("gk", "<Plug>(vim-binding-k)", "normal");
12 });
13
14 // Configure Jupyter Keymap
15 require([
16 'nbextensions/vim_binding/vim_binding',
17 'base/js/namespace',
18 ], function(vim_binding, ns) {
19 // Add post callback
20 vim_binding.on_ready_callbacks.push(function(){
21 var km = ns.keyboard_manager;
22 // Allow Ctrl-1 to change the cell mode into code in Vim normal mode
23 km.edit_shortcuts.add_shortcut('ctrl-1',
'vim-binding:change-cell-to-code', true);
24 /// Allow Ctrl-2 to change the cell mode into Markdown in Vim
normal mode
25 km.edit_shortcuts.add_shortcut('ctrl-2',
'vim-binding:change-cell-to-markdow n', true);
26 /// Allow Ctrl-3 to change the cell mode into code in Vim normal
mode
27 km.edit_shortcuts.add_shortcut('ctrl-3',
'vim-binding:change-cell-to-raw', t rue);
28 // Delete cell with dd
29 km.edit_shortcuts.add_shortcut('d+d',
'jupyter-notebook:delete-cell', true);
30 // Update Help
On Monday, February 12, 2018 at 5:35:33 AM UTC-5, takowl wrote:
>
> It can be tricky to get custom.js to load things at the right point. Have
> a look at the examples here to wait for promises:
>
> https://github.com/jupyter/notebook/blob/master/notebook/static/custom/custom.js
>
> If you're having some trouble, scatter some console.log('A') calls around
> (with different letters) and then look in your browser's Javascript console
> to see which bits are getting run.
>
> On 9 February 2018 at 20:01, Nate L. <[email protected] <javascript:>>
> wrote:
>
>> I am using Jupyter on SSH, with the amazing VIM extension. However, when
>> I try to modify the vim mappings in the config file, the actions are now
>> shown in my jupyter notebook. Does anyone know how I can see which config
>> file is being used by my jupyter folder? My current config file is
>> ~/.jupyter/custom/custom.js, but it's not loading on the Jupyter notebook :(
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Project Jupyter" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jupyter/a141af95-ed48-4f9d-9350-3ab3ddb0d703%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/jupyter/a141af95-ed48-4f9d-9350-3ab3ddb0d703%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
You received this message because you are subscribed to the Google Groups
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jupyter/f21cfbb7-1604-4205-b74b-3480a61a0e80%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.