jupyter-vim-binding
jupyter-vim-binding copied to clipboard
mapping ctrl-d to single shift+tab
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
-
Start local Jupyter Notebook by
jupyter notebook -
Access http://localhost:8888/
-
create a cell
-
enter 3 tabs
-
enter ctrl-d now, the cursor will be moved to beginning of the line
-
enter 3 tabs
-
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");