[Discussion] Overriding the `type` command
See original GitHub issueI’ve been thinking about a few features that could be added to Dance, but that would require the VS Code type
command to be overridden at all times (rather than only when awaiting user input after a specific command, like now).
One such feature would be to map commands to characters, rather than key combinations, which would help for supporting non-Qwerty keyboard layouts. It could also allow custom commands in normal mode down the line, without having to modify the particularly verbose VS Code keybindings. I haven’t tested it, but I also think it would slightly decrease the time when switching from Normal
to Insert
.
Any thoughts on such a change? Any obvious drawbacks or improvements?
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Overriding the default 'type' command and then calling the ...
Steps to Reproduce: Override the 'type' command with vscode.commands.registerCommand; Call the default 'type' command instead of the custom ...
Read more >Overriding in Java - GeeksforGeeks
Overridden methods allow us to call methods of any of the derived classes without even knowing the type of derived class object. When...
Read more >override specifier (since C++11) - cppreference.com
In a member function declaration or definition, override specifier ensures that the function is virtual and is overriding a virtual function ...
Read more >How to override option in aliased command? [duplicate]
With rm , -f overrides -i if it comes later on the command line ...
Read more >Override Artisan commands? - Laracasts
And that will take precedence over the built in down command. Just change the command binding to whatever command you want to override....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Mapping commands to characters, rather than key codes, will be a problem for people who use multiple keyboard layouts.
I use both Bulgarian and English keyboard layout. Sometimes I need to write some Bulgarian text in vscode. With key codes everything works fine, because they are the same across layouts.
However if characters are used then all normal mode commands will stop working in Bulgarian layout, because pressing keys will produce Cyrillic characters. For example pressing
i
will produceи
.I’m all for this change for the flexibility. Two additional problems I think we can tackle with global
type
override:g d
to go to definition – adding a new key sequence binding in VSCode will makeg
wait on the next key instead of open thego to
menu in Dance. I think globaltype
will enable Dance to implement a Kak-like configurable “mode” for this.