Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Oct 22, 2021. It is now read-only.
Discussion options

Edit a text file by simply clicking on it would be great...

It can open a .txt so why can't it open a .py or .rb etc?

You must be logged in to vote

Replies: 3 comments · 12 replies

Comment options

I’ll add those file types to the editor list.

admin edit: see #975

You must be logged in to vote
6 replies
@GitSquared
Comment options

Indeed. I've recommended that we use that approach instead of managing every file extension. You can track the work on that here: #975

@branislavblazek
Comment options

can I open editor for .txt file by some command? I can open editor by clicking on file in filessytem explorer.

@Animus-Surge
Comment options

can I open editor for .txt file by some command?

The idea for my text editor is to use it with the filesystem view. It's very hard to add commands into the terminal (especially for windows) that works with eDEX, so unfortunately it is not possible to do the command.

I am on Windows. I cannt open any terminal-editor like nano or vim. When I click in filesystem on some .txt file, Edex UI opens a window with content of that file. How i can achieve opening that window by some command or hot key? I didn't found yet any command or hotkey how to open that window.

(comment link: #973 (reply in thread))

Expanding on this comment, I could probably add a hotkey that opens a blank text editor, and I could add another button onto the editor that opens a dialogue asking for the filepath, either absolute or relative to the current filesystem directory. Alternatively, there are windows versions of vim that you can download, or you can install windows subsystem for linux (wsl) to be able to use nano.

@ghost
Comment options

It would be straightforward to add a handler for ANSI escape sequences via terminal.parser.registerOscHandler(1024, handler) in terminal.class.js, where 1024 is some unused OSC handler code and handler: string => bool returns whether the handler is done with the data (true) or wants to give some other handler a go at it (false). Then you can do something like printf "\e]1024;<string data here>\a" to pass data to the handler. I recommend using JSON for the data.

@ghost
Comment options

Here's a proof of concept: #1163

This comment was marked as spam.

@kamalov69

This comment was marked as spam.

Comment options

You must be logged in to vote
5 replies
@branislavblazek
Comment options

I am on Windows. I cannt open any terminal-editor like nano or vim. When I click in filesystem on some .txt file, Edex UI opens a window with content of that file. How i can achieve opening that window by some command or hot key? I didn't found yet any command or hotkey how to open that window.
image
On this image you see the Edex UI's editor. I want open it with command or hot key.

@GitSquared
Comment options

I think ctrl+click (or shift+click, not sure) on the file icon will open it using your OS' default program.

@JacobLiu001
Comment options

I am on Windows 10 and have full control over my device.
Ctrl+Clicking on any file would result in an error message. It might be cause by a change in electron APIs?
I have found this link at Electron's governance docs: https://github.com/electron/governance/blob/master/wg-api/spec-documents/shell-openitem.md
Maybe a small fix? I'm a n00b coder and don't know any electron...

image
In this image I ctrl+clicked a file in the file explorer in the lower half of the screen.

@GitSquared
Comment options

Indeed, looks like I missed the breaking change. Thanks for linking to the electron docs, really helpful. I'm going to fix this in master rn and we should have a patch release this week.

(edit: ref 417a82e )

@ghost
Comment options

Fixed in #1159

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
💡
Ideas
Labels
None yet
7 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.