Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sublime-like changes #109
base: master
Are you sure you want to change the base?
Sublime-like changes #109
Changes from all commits
d202ae3
83692fd
4f9d809
2d2763e
a4e9f93
386f22b
dfd0781
0699d1c
0bc9269
117299f
702b140
39995fd
1c11099
db5488b
1424a88
2b38760
decb28f
c276d9b
b6472f1
fbd71c2
574c9a9
15ce710
495083c
e31365d
62a601f
6c32c20
0e77c3d
ab35a26
f19eb17
8bfcfa1
694b3b1
88c8b35
3790457
b1f795c
e94e3e9
7e1aea1
75dff11
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused: why are these named "ctrl+something" instead of an actual command name like "word-left" or "word-right"? Other question: what are
ctrl+shift+up
andctrl+shift+down
supposed to do? It seems that it's not doing anything visible at the moment.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks different on HEAD. There its separated. a bit clearer.
But in principle there are two parsers: One is to parse a command name to
Command
-struct (e.g.select_all
).The other is to parse key-descriptions to
Termion::Event
, e.g.escape
toKey::Esc
.Now a user can edit their JSON file to let pressing
escape
triggerselect_all
for example.ctrl+right
and others are not supported by Termion right now, as they differ from Terminal to Terminal, which...sucks. But to have the functionality, I basically used the Unsupported event to make it work with my terminal.So this is already a "known bug" of this implementation. Another is, that Termion doesn't differentiate between
ctrl+a
andctrl+shift+a
. I have opened a bugreport there, but I fear its not really actively maintained anymore.Try typing after doing that :-) It adds a cursor below or above the current cursor, which are unfortunately invisible at the moment. I have some screencasts showing of the features, just have to find a place to upload to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, sorry. I confused
ctrl+shift+up/down
withalt+shift+up/down
.ctrl+shift+up/down
is supposed to move the current line one line up or down (swap lines). But this is currently not supported by xi-core ( #793 ).Either way, this part is not there to define functionality! Its there so that users can use
ctrl+shift+up/down
for whatever they want (They could map the function ofalt+shift+up/down
toctrl+shift+up/down
. Or they could for whatever reason mapctrl+shift+up
toselect_all
andctrl+shift+down
tonext buffer
.).This part of the code is only there to "know a key-combination exists". Not connect it to any functionality.
But for completeness, here are the screencasts I talked about (just "view raw" for each file):
https://gist.github.com/msirringhaus/83fbc1ef10ae93e56fe8d68dea1dd3b3
"switchcase" is what
alt+shift+up/down
is doing at the moment.ctrlD
obviously is whatctrl+d
does.And
Palette
is the CommandPrompt with suggestions. There is a crate to have sublime-like fuzzy-search, which I want to implement next. Then finally, the Prompt should handle up/down movements to select suggestions (at the moment it only shows them)