Skip to content
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

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
d202ae3
Update Cargo.lock
msirringhaus Jun 24, 2019
83692fd
First step towards configurable keybindings: TUI can use bindings pro…
msirringhaus Jun 24, 2019
4f9d809
Copy keybindings to editor and all views. Ugly, but I cannot find a n…
msirringhaus Jun 24, 2019
2d2763e
Reshaped Command to have relative and absolute move as variant instea…
msirringhaus Jun 24, 2019
a4e9f93
Editor now holds the keymap alone and translates it for the view. All…
msirringhaus Jun 25, 2019
386f22b
Rename functions to avoid key-name <-> functionality confusion
msirringhaus Jun 25, 2019
dfd0781
Merge branch 'keybindings'
msirringhaus Jun 25, 2019
0699d1c
Prepare to switch to rust edition 2018
msirringhaus Jun 25, 2019
0bc9269
Rust 2018: run cargo fix --edition-idioms
msirringhaus Jun 25, 2019
117299f
Remove duplicate functions in editor, view and client. Now each objec…
msirringhaus Jun 26, 2019
702b140
Make Insert a command as well and let the client handle it
msirringhaus Jun 26, 2019
39995fd
Add command to hide prompt
msirringhaus Jun 26, 2019
1c11099
Add undo/redo (unfortunately, there is a bug in termion that does not…
msirringhaus Jun 26, 2019
db5488b
Add multi-cursor support! Find current selection and add cursors on e…
msirringhaus Jun 26, 2019
1424a88
Implement copy&paste
msirringhaus Jun 27, 2019
2b38760
Implement (almost) all move commands
msirringhaus Jun 27, 2019
decb28f
Embedd sublime keybindings for now. This is stupid but easier for now…
msirringhaus Jun 27, 2019
c276d9b
Restructure Command a bit so that there is a single parsing function …
msirringhaus Jun 27, 2019
b6472f1
Make open-command work with tilde and env-variables.
msirringhaus Jun 27, 2019
fbd71c2
Implement close current view (last view always remains).
msirringhaus Jun 27, 2019
574c9a9
Implement select_all command
msirringhaus Jun 28, 2019
15ce710
Unify and simplify prompt parsing a bit
msirringhaus Jun 28, 2019
495083c
Add (terminal-specific) keys for next/prev buffer.
msirringhaus Jun 28, 2019
e31365d
First somewhat functioning implementation of Find()
msirringhaus Jun 28, 2019
62a601f
Implement configurable search
msirringhaus Jun 28, 2019
6c32c20
Add explanation of how search works above the search prompt.
msirringhaus Jun 28, 2019
0e77c3d
Activate move_to linenumber as prompt command
msirringhaus Jun 28, 2019
ab35a26
Implement function to set multiple cursor with clicking middle mouse …
msirringhaus Jun 28, 2019
f19eb17
First, hacky and incomplete draft of commandprompt with suggestions
msirringhaus Jun 28, 2019
8bfcfa1
Generate nicer names for prompt suggestions. This is really ugly and …
msirringhaus Jun 28, 2019
694b3b1
Move clipboard to Editor. Had a clipboard for each view, which meant …
msirringhaus Jun 29, 2019
88c8b35
Major rework of command structure. Known bug: Keybindings of subcomma…
msirringhaus Jun 30, 2019
3790457
Remove old, left-over comment
msirringhaus Jul 2, 2019
b1f795c
Adjust logging levels to be more sensible.
msirringhaus Jul 2, 2019
e94e3e9
Make enum-names rusty and use serdes rename_all to use it for parsing.
msirringhaus Jul 3, 2019
7e1aea1
Prompt: Fix prompt parsing and close prompt after finalizing.
msirringhaus Jul 3, 2019
75dff11
Fix prompt parsing of select_lines
msirringhaus Jul 3, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
authors = ["Corentin Henry <[email protected]>"]
name = "xi-term"
version = "0.1.0"
edition = "2018"
msirringhaus marked this conversation as resolved.
Show resolved Hide resolved

[dependencies]
clap = "2.33.0"
Expand All @@ -16,4 +17,4 @@ indexmap = "1.0.2"
xrl = "0.0.7"
serde = { version = "1.0.93", features = ["derive"] }
serde_json = "1.0.39"
json5 = "0.2.4"
json5 = "0.2.4"
2 changes: 1 addition & 1 deletion src/core/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub struct KeybindingConfig {
}

impl KeybindingConfig {
pub fn parse(config_path: &Path) -> Result<KeybindingConfig, Box<std::error::Error + Sync + Send + 'static>> {
pub fn parse(config_path: &Path) -> Result<KeybindingConfig, Box<dyn std::error::Error + Sync + Send + 'static>> {
let entries = fs::read_to_string(config_path)?;
// Read the JSON contents of the file as an instance of `User`.
let bindings: Vec<Keybinding> = json5::from_str(&entries)?;
Expand Down
18 changes: 4 additions & 14 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,12 @@
#[macro_use]
extern crate clap;

extern crate failure;

#[macro_use]
extern crate log;
extern crate log4rs;

extern crate futures;
extern crate indexmap;
extern crate termion;
extern crate tokio;
extern crate xdg;
extern crate xrl;

extern crate json5;
extern crate serde;
extern crate serde_json;

use log4rs;
use tokio;
use xrl;

mod core;
mod widgets;
Expand Down