We’re rewarding the question askers & reputations are being recalculated! Read more.

Hot answers tagged

19

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 fix this issue: Make sure you don't have any unsaved files in Scratch when run as root (with the sudo command). This fix will delete those files. Open Terminal ...


14

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 as an empty list. gsettings set org.pantheon.scratch.settings opened-files []


10

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 styles in different places). All color schemes are defines as XML files, located at /usr/share/gtksourceview-3.0/styles/. You can either create a copy of an ...


9

Open Scratch Open Preferences Switch to Extensions Terminal (Close Preferences) Click new Terminal icon in headerbar. Execute Python in attached Terminal.


8

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-text-editor /path/to/file & exit setsid setsid scratch-text-editor /path/to/file ; exit disown scratch-text-editor /path/to/file & disown ; exit All ...


5

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 to open scratch, open terminal and run: gsettings set org.pantheon.scratch.settings show-at-start welcome The problem here is because scratch stores ...


5

You can reinstall apps / packages with apt-get with the following command: sudo apt-get install --reinstall scratch-text-editor


4

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 [_LOG_LEVEL_WARN 11:26:52.180479] Scratch.vala:236: Error when getting information for file '/hello': No such file or directory Which means that the file/...


4

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 process. Now to close the terminal, simply hit Ctrl + D. If you forget to use & then you can detach it. First press Ctrl + Z to suspend the program. This can ...


4

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: Valadoc : Glib.Module TypeModules at gnome.org However, there is other way, used by Scratch, to add plugins: You can use libpeas-1.0 library. You can find ...


3

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. You can read about the format and contents of the .gitignore file here. Best of luck!


3

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


3

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 indentation as the previous line. Automatic Indentation will not actually indent based on brackets or code you write.


3

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.settings opened-files []


3

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 submitted the necessary code changes to bring it back here so hopefully it will make it into the next update of Code. Edit: This option has now been restored.


2

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 someone else. I installed dconf-editor via sudo apt install dconf-editor, then I opened it and followed the route org » pantheon » scratch » settings and there I ...


2

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 located in /usr/share/gtksourceview-3.0/styles and the preinstalled schemes are solarized-light (default) classic kate solarized-dark cobalt oblivion tango Here ...


2

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 change back their names. You can find a nicer solution in the answer by Suici Doga of this question.


2

Try removing the spaces between the equals sign. So change: alias code = 'io.elementary.code' To: alias code='io.elementary.code'


2

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 for you now is to wait for the new Scratch update to be released.


2

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 other major Open Source projects. Moving forward, an elementary app with a generic name Baz would have a repository of github.com/elementary/baz, an app ...


2

Besides writing io.elementary.code or creating an alias there isn't any way to open a app from the command line.


2

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 & will automatically open my pdf document in Document Viewer. I need the & to put the terminal command into the background. Beware - you might end up with ...


2

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 (with the sudo command). This fix will delete those files. Open Terminal and use root permissions to remove the directory. sudo rm -rf ~/.local/share/scratch-...


2

I really don't know You should ask in their Github page https://github.com/elementary/code/issues Maybe ask for this new feature or some info on where to write the syntax definition... UPDATE (time:1543427125) Thanks for the downvote, you made me learn a new thing. I followed my own suggestion and went to their Github page (as I said could be the best ...


2

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 the package is installed. Open dconf Editor from the Applications menu. Navigate to /io/elementary/terminal/settings You can now edit any of these settings by ...


2

Hmm,Ctrl P doesn't work either... Amazingly enough, it seems, the printing functionality hasn't been implemented into Code. Well, if you need this feature, you can suggest to implement it via the dedicated elementary/code github page.


1

You can change between the editor tabs and the terminal with Ctrl+Alt+t.


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