Comments (9)
Current voting
Vote for the topic(s) you care about by selecting the corresponding emoji. (No judgement based on the emojis sentiment!)
- 👍 All major functionality should be exposed via keybindings
- 👎 Ability to have multiple keybindings (see above)
- 😄 Ability to load keybindings from file
- 🎉 Ability to execute previously defined code or externals via keybindings
- 😕 Ability to have keybinding chords (see above)
from reedline.
It is very useful to expose Vi hard-coded keybinding to support other keyboard layout.
I like how Helix editor handles the config in nested way to represent mode. Maybe kind of abstracting major modes ("emacs", "vi insert", and "vi normal") into a single state combined with nested keybindings to support Vi actions. This way, we can put ChangeMode in ReedlineEvents and vi command into a nested one.
keybindings: {
{ name: goto_minor, modifier: null, keycode: char_t, modes: [ vi_normal ], event: { send: ChangeMode, mode: v_insert } }
{ name: goto_minor, modifier: null, keycode: char_g, modes: [ vi_normal ], subs: [
{ modifier: control, keycode: char_h, event: { edit: movetostart } }
{ modifier: null, keycode: char_h, event: { edit: movewordleft, count: numarg } }
] }
}
from reedline.
One suggestion is to include a Kakoune-like mode. I find the interactivity in Kakoune to make more sense and be more conducive to faster navigation and editing flow than how it works in vi.
from reedline.
I would like to suggest a Sublime Text (/VS Code/micro) mode with GUI-like keyboard shortcuts, and ideally mouse support.
from reedline.
what syntax should this keybinding file should have?
from reedline.
In nushell it's a yaml file but I'd guess that json, yml, toml, some structured file may work. I'm also guessing that if reedline is already using one of these crates somewhere that we'd want to use whichever one that is in order to keep dependencies down. thoughts?
from reedline.
I think it wouldn't be too hard to create this dictionary. If we use EditCommands and ReedlineEvents you can describe any command
from reedline.
we might want to take a look at rustyline's issues regarding keybinding to make sure we can support the functionality. one thing that comes to mind is attaching arbitrary internal or external commands to keybindings. like maybe ctrl-shift-h runs htop or something like that.
as I recall, we created a few issues on rustyline's repo about keybindings. of course, this type of functionality can come later but we want to be sure our deserialization handles such things up front. i.e. start with the end in mind.
from reedline.
I think a helix-mode would go a long way into making the reedline experience more complete, now targeting the three major modal editors.
Helix's philosophy is a bit like this (a small excerpt from their vision page on github):
Selection -> Action, not Verb -> Object. Interaction models aren't linguistics, and "selection first" lets you see what you're doing (among other benefits).
We aren't playing code golf. It's more important for the keymap to be consistent and easy to memorize than it is to save a key stroke or two when editing.
helix also has multi-cursors but we could add it later.
Also important to note that helix is heavily inspired by kakoune, so this would be satisfying for that group of users too.
from reedline.
Related Issues (20)
- `Move(Big)WordRightEnd` is off-by-1 in insert mode HOT 1
- New actions to cancel menu & accept-and-hold
- Index out of bounds HOT 8
- 0.30.0 (Nu 0.91.0) does not respect cursor position after host cmd exec in a keybinding HOT 10
- Prefix history search broken in vi-mode HOT 5
- `columnar_menu` panics on non-ASCII characters in directory
- Mouse controls HOT 1
- vi keybinds are wrong and/or inconsistent with readline HOT 2
- Modal Menus
- Default keybind for "newline" HOT 1
- Column menu spaces don't respect special characters (accents, emojis...)
- Cursor slowdown when pressing left/right arrows and there is a lot of text in the prompt HOT 2
- analog to inputrc for programs using reedline HOT 1
- progress in recommended phrase by one word-bound HOT 1
- Problem with powershell HOT 2
- `oh-my-posh` left and right prompt are not drawn at the same level HOT 3
- Panic in IdeMenu::create_value_string HOT 1
- Command history additional alternative to sync_on_enter HOT 3
- Highlight arbitrary matches HOT 3
- Nushell: Multi-line Prompt Bug When Resizing Window HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reedline.