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 ...
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 ...
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 ...
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.
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-...
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 ...
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 ...
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
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
...
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 ...
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:
...
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 "[]"
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.
...
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 ...
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....
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.
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 ...
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 ...
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, ...
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 ...
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 ...
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 ...
2
votes
Accepted
Where does Scratch saves temporary files?
Scratch saves temporary files at ~/.local/share/scratch-text-editor/unsaved/
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'
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 ...
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 ...
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 &...
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 (...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
code × 67editor × 4
release-loki × 3
applications × 3
files × 3
release-freya × 2
release-juno × 2
settings × 2
keyboard-shortcuts × 2
themes × 2
ubuntu × 2
development × 2
command-line × 2
search × 2
display × 1
wifi × 1
pantheon-files × 1
pantheon-terminal × 1
plank × 1
mouse × 1
vala × 1
window-management × 1
gtk × 1
release-odin × 1
elementary-project × 1