Skip to content
This repository was archived by the owner on Aug 22, 2023. It is now read-only.
This repository was archived by the owner on Aug 22, 2023. It is now read-only.

mapping ctrl-d to single shift+tab #154

@lucantan

Description

@lucantan

Summary

in VIM, i am using ctrl-d to enable single shift+tab in insert mode (default vim behavior)
is there anyway to enable that?

default ctrl-d currently is to remove all empty spaces of current line and moved the cursor to the beginning of the line

Environment

  • Operating system : (e.g. Ubuntu Gnome 15.04 64bit)
  • Web browser : (e.g. Firefox 44.0.2)
  • Version or revision of Jupyter Notebook : (e.g. 4.1 or 620fb29)
  • Revision of jupyter-vim-binding : (e.g. 5a057d6)

Behavior

ctrl-d in vim is default to single shift+tab

Expected

expected to have same behavior for ctrl-d in vim and vim_binding in jupyter notebook

Actual

currently when we do ctrl-d, it is deleting all empty spaces and move cursor to beginning of the line

Step by step procedure

  1. Start local Jupyter Notebook by jupyter notebook

  2. Access http://localhost:8888/

  3. create a cell

  4. enter 3 tabs

  5. enter ctrl-d
    now, the cursor will be moved to beginning of the line

  6. enter 3 tabs

  7. enter shift-tab
    now the cursor will be moved one tab space to the left

What you have done to solve the issue

added below in
~/.jupyter/custom/custom.js
without help

CodeMirror.Vim.map("Ctrl-D", "shift-tab", "insert");
or
CodeMirror.Vim.map("C-D", "shift-tab", "insert");
or
CodeMirror.Vim.map("Ctrl-D", "Shift-Tab", "insert");
or
CodeMirror.Vim.map("C-D", "Shift-Tab", "insert");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions