Welcome to DU! The truly grassroots left-of-center political community where regular people, not algorithms, drive the discussions and set the standards. Join the community: Create a free account Support DU (and get rid of ads!): Become a Star Member Latest Breaking News Editorials & Other Articles General Discussion The DU Lounge All Forums Issue Forums Culture Forums Alliance Forums Region Forums Support Forums Help & Search

usonian

(13,772 posts)
Mon Nov 13, 2023, 12:29 PM Nov 2023

GhostText is a big help for typing text in DU (Macs, not iOS, for advanced users.)

When you are typing in a text box, click on the GhostText extension (icon is next to the URL box) and text you enter is echoed in your selected text editor (Sublime Text, VS Code, Emacs, Vim/Neovim). The text box is highlighted (cool!) when it's operational. See example below.

This works, and I am using it with Safari, Firefox and Opera (chrome engine) along with Sublime Text (recommended, and you don't have to pay for it.)

You will need to install an extension to your selected text editor, and the extensions are available at Federico Brigante's github page:

https://github.com/fregante/GhostText

Example:



WARNING: This is not a no-brainer, as there are several steps involved, and IIRC, GhostText will issue error messages if your editor is not running. But being able to type text in a real editor, and best of all, if you blow away the web page you are typing in, the text is preserved in the editor.

Troubleshooting on GhostText's home page: https://ghosttext.fregante.com (not from me, because I got it working with three different browsers and forgot what I did)

Works on other platforms (ones starting with L and W ) but I'm currently not using the first, and will never use the second.

From the home page:

Usage

Once you have installed both browser and editor extensions, you can activate GhostText in the current browser tab by clicking its icon in the toolbar or by using a keyboard shortcut. The editor needs to be launched first.

Notice: in some editors you’ll need to run the Enable GhostText command to start the server. Refer to the documentation of each extension. Sublime Text doesn’t need this step.

How it works

GhostText is split in two parts:

A HTTP and WebSocket server in the text editor
A client in the browser

When you activate GhostText, the browser will try contacting the server in the text editor (at the port specified in the options) and open a WebSocket connection. Every change will be transmitted to the other side. Each side can close the socket (for example by closing the window) and the session will be automatically over.


Note: Doing a "preview" closes a session, so you have to click the GhostText icon again, but this just opens a new tab in Sublime Text, and in effect, gives you a (permanent) record of versions of your typing in the tabs.
1 replies = new reply since forum marked as read
Highlight: NoneDon't highlight anything 5 newestHighlight 5 most recent replies
GhostText is a big help for typing text in DU (Macs, not iOS, for advanced users.) (Original Post) usonian Nov 2023 OP
Thanks, unonian. I came here from the future (2023-12-17) erronis Dec 2023 #1

erronis

(16,825 posts)
1. Thanks, unonian. I came here from the future (2023-12-17)
Sun Dec 17, 2023, 12:54 PM
Dec 2023

via your reply to post https://www.democraticunderground.com/125624652.

See, time travel works!!!

I'll give this a try (Windows/Firefox user) and sublime-text is my goto editor for years.

Latest Discussions»Culture Forums»Apple Users»GhostText is a big help f...