Giter VIP home page Giter VIP logo

Comments (7)

archseer avatar archseer commented on July 20, 2024

I like this idea, but I wonder what the behavior should be if several files/folders are listed, i.e. hx /tmp log.txt

from helix.

vv9k avatar vv9k commented on July 20, 2024

That's also what I currently stumbled upon. I'm wondering how to handle this with what there is available now.

from helix.

archseer avatar archseer commented on July 20, 2024

You should be able to reuse the file picker code here:

let root = find_root(None).unwrap_or_else(|| PathBuf::from("./"));
let picker = ui::file_picker(root);
cx.push_layer(Box::new(picker));

You would need to construct it if necessary, and compositor.push it right after the editor here:

if !args.files.is_empty() {
for file in args.files {
editor.open(file, Action::VerticalSplit)?;
}
} else {
editor.new_file(Action::VerticalSplit);
}
compositor.push(Box::new(ui::EditorView::new()));

from helix.

vv9k avatar vv9k commented on July 20, 2024

Already got that figured out, I'm wondering what to do with the extra arguments aftrer initial directory path like hx /tmp some_file - what to do about some_file there. Perhaps all extra files should be opened as splits?

from helix.

vv9k avatar vv9k commented on July 20, 2024

And also what to do when there is more than one directory like:

hx /tmp /home some_file

from helix.

vv9k avatar vv9k commented on July 20, 2024

I added initial changes in #59

from helix.

archseer avatar archseer commented on July 20, 2024

Closed by #59

from helix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.