Hot answers tagged

19 votes
Accepted

Can't open a new tab or new file on scratch

This is due to a permissions bug that occurs when the first time you've run Scratch is as a privileged user. You end up with a directory in ~/.local/share/scratch-text-editor that you don't own. To ...
user avatar
  • 9,734
14 votes
Accepted

How can I clear currently opened files in Scratch?

You can view your currently open files with gsettings get org.pantheon.scratch.settings opened-files ['file:///home/lewis/image.svg'] You can clear your currently open files by setting the same key ...
user avatar
  • 4,929
10 votes
Accepted

How can I add a color scheme to Scratch?

Scratch is using the same technology (which is named gtksourceview) as gedit (the text editor for the GNOME desktop) and is therefore using the way of defining color schemes (also named themes or ...
user avatar
  • 2,872
10 votes
Accepted

How can I make Scratch execute scripts

Open Scratch Open Preferences Switch to Extensions Terminal (Close Preferences) Click new Terminal icon in headerbar. Execute Python in attached Terminal.
user avatar
  • 4,929
8 votes
Accepted

How can I launch a command from terminal and then close the terminal?

You can use: nohup nohup scratch-text-editor /path/to/file & Then close terminal with Ctrl+D If you want direct in single command: Use exit at the end of the command. like, nohup scratch-...
user avatar
  • 7,877
6 votes

Dark theme on Elementary Code instead of "Solarized Dark"

So, I managed to hack Code a bit in order to set a different theme. I like to have a consistent theme when using various editors, so I tried to make them look as close as possible. At the same time, I ...
user avatar
  • 2,150
5 votes

How can I clear currently opened files in Scratch?

This is only an alternative, Lewis answer is the accurate one. To clear currently opened files: Open scratch --> settings --> preferences --> Behavior --> Show Welcome Screen. If you are not able ...
user avatar
  • 7,877
5 votes

How can I purge Scratch's configuration and / or re-install it?

You can reinstall apps / packages with apt-get with the following command: sudo apt-get install --reinstall scratch-text-editor
user avatar
  • 2,869
4 votes
Accepted

Why can I not use Scratch text editor to create files from the Terminal?

I don't think it's possible, if you do open scratch text editor in the debug mode using scratch-text-editor test.py -d if the file does not exists, you will see someting like this in the terminal ...
user avatar
4 votes

How can I launch a command from terminal and then close the terminal?

In the future use this command: scratch-text-editor /file/to/open.txt for this: scratch-text-editor /file/to/open.txt & Note the & on the end there. That will start it as a separate ...
user avatar
  • 1,051
4 votes

How to write plugin for scratch text editor from elementary os?

Scratch is developed in Vala, so you have at least two ways to create a plugin for a vala application: You can use Glib.Module class from gmodule-2.0 library to develop it. You can find more info at: ...
user avatar
  • 2,268
4 votes

How can I clear currently opened files in Scratch?

Just in case someone runs into this on Juno: gsettings set io.elementary.code.settings opened-files-view1 "[]"
user avatar
3 votes
Accepted

Prevent Scratch from making files with tilde

Although not a direct resolution to your problem, you should probably add tilde files to your .gitignore file anyways. This will prevent git from even noticing them, and should solve your problem. ...
user avatar
  • 158
3 votes
Accepted

how can I add indents to code in scratch manually or automatically?

You can indent manually in Scratch by selecting several lines and pressing the Tab key, or pressing Shift + Tab. Automatic Indentation should occur, where every new line is inserted with the same ...
user avatar
  • 4,929
3 votes

Scratch is not responding when I try to edit a file

You can try clearing the currently opened files in Scratch since I had this problem because I opened a big file. To clear the currently opened files list run gsettings set org.pantheon.scratch....
user avatar
  • 2,733
3 votes
Accepted

Open elementary apps from the command-line

Besides writing io.elementary.code or creating an alias there isn't any way to open a app from the command line.
user avatar
  • 1,974
3 votes

How to toggle text wrapping in Code?

This is currently not possible. The feature was removed in this PR: https://github.com/elementary/code/pull/73 After feedback, I think it was agreed to bring it back (discussion here) I've just ...
user avatar
  • 1,419
3 votes
Accepted

How To Configure the Terminal in Code

The terminal plugin in Code follows the settings of the main Terminal application. To edit these settings: Close Code and open Terminal. Run sudo apt install dconf-editor, then close Terminal once ...
user avatar
  • 160
3 votes
Accepted

Code - Spell check extension - where to add/remove dictionaries?

I'll try to help with this one: First, obviously, enable the extension in Code's Preferences. Now, right-clicking inside a document will let you choose from one of the pre-existing languages: If, ...
user avatar
  • 2,150
2 votes

Scratch is not responding when I try to edit a file

If I type gsettings set org.pantheon.scratch.settings opened-files [] I get The key "opened-files" doesn't exist"(something like that. My System is in Spanish). I write what I did in case it helps ...
user avatar
  • 41
2 votes
Accepted

How to change Text Color in Scratch Freya built in text editor?

You can set a different style scheme in org.pantheon.scratch.settings.style-scheme See this link for how to edit a setting in dconf https://elementaryos.stackexchange.com/a/176/37 Schemes are ...
user avatar
  • 2,869
2 votes

Scratch editor binary file load and session restoring problems

You could try moving those binary files to some other directory or just changing their names. Then open up scratch and it wont try to open those files. After that you can just move back those files or ...
user avatar
2 votes
Accepted

Where does Scratch saves temporary files?

Scratch saves temporary files at ~/.local/share/scratch-text-editor/unsaved/
user avatar
  • 9,734
2 votes
Accepted

Can't launch Code via alias

Try removing the spaces between the equals sign. So change: alias code = 'io.elementary.code' To: alias code='io.elementary.code'
user avatar
  • 36
2 votes

Make Scratch stop asking to save a file before closing a file

This bug is already fixed in trunk (the current developement branch of Scratch). See for more details: https://code.launchpad.net/~vishalrao/scratch/fix-1547327/+merge/317063 The only thing to do ...
user avatar
  • 161
2 votes
Accepted

io.elementary.code application name

The name won't change. Further, we’re adopting RDNN across our apps. This is encouraged by FreeDesktop.Org projects like D-BUS as well as by GNOME, so we’re being consistent both with ourselves and ...
user avatar
  • 1,246
2 votes

Open elementary apps from the command-line

I find that I don't want to open apps specifically from the command line, I just want to open a document and have whatever app is needed open it. xdg-open to the rescue! So xdg-open ~/mypdf.pdf &...
user avatar
  • 81
2 votes

code text editor problem in elementary os juno

I think this is the solution for your problem Can't open a new tab or new file on scratch To fix this issue: Make sure you don't have any unsaved files in Scratch when run as root (...
user avatar
  • 1,942

Only top scored, non community-wiki answers of a minimum length are eligible