Does anyone know exact steps for adjusting notepad++ theme or look in sublime text 3.
There is one link which is not completely clear to me, and I am looking for some other solution.
Someone already made whole theme.
Here https://gist.github.com/rafaelmussi/3743237 is theme code. It says for sublime text 2, but it also work for sublime text 3.
Installation steps:
1) Open Sublime text and go to: Preferences->Browse packages... or on your hard disc go to: \AppData\Roaming\Sublime Text 3\Packages.
2) Create there some folder where you want to put your theme file, or you can put it in some of already created folder with other themes.
3) Create file Nodepad.tmTheme and put code from github link above into file.
4) Copy file in new created folder or some other folders with themes.
5) Open Sublime text 3 editor, go to: Preferences->Settings-User
6) Reference your new created theme here. Something like:
{
"color_scheme": "Packages/User/NotepadTheme/Nodepad.tmTheme",
}
save and that is it.
Related
Say I've got opened a project or a directory structure in Sublime Text. When I open a file with CTRL+P, I frequently navigate in the sidebar to the directory that contains it after opening the file, to get my bearings in a large project. It would be nice if this could be automated.
Is there a way to configure this, or a plugin for it? I wasn't able to find anything.
If I understand you correctly, you want to have the sidebar expand to some file that you find with Goto Anything. To do so, you can install the SyncedSideBar package.
SyncedSideBar
Sublime Text 2 plugin to sync project sidebar (folder view) with
currently active file.
Sublime Text 2 highlights only those files that are already expanded.
This plugin highlights all files (eg. opened with cmd+p).
When you save a project, Sublime Text will create a .sublime-workspace file. In this file, there is an array of buffers, and for each buffer there is a color_scheme property. This is set to whatever color scheme was chosen when the buffers and workspace were created.
I recently changed my theme and color scheme in my user settings file. How can I refresh all of my project's workspaces so that way it uses my new color_scheme provided in my user preference file without needed to edit each project's workspace file one-by-one?
Expanding on the answer given by Tot you can do this for all views in all windows that are open by using a nested list comprehension (remember this is Python so we can be pretty flexible):
[ v.settings().erase("color_scheme") for views in [ w.views() for w in sublime.windows() ] for v in views ]
This way you don't have to run the command in each tab individually.
The only way I found to reset tabs to user's chosen color scheme is to enter this in the console :
view.settings().erase("color_scheme")
This will reset the color scheme of the selected tab - unfortunately you'll have to do it for each tab. But it's still quicker than closing and reopening the tab.
I only have this issue with Sublime Text 3 on Mac OS X.
Source : https://www.sublimetext.com/forum/viewtopic.php?f=3&t=19310
P.S. : If you've just updated your color scheme file, you'll sometimes have to execute this command twice. Just type the up arrow in the console to write the last command again.
Windows 10 AppData-related Solution
Please make sure that you are in a similar situation as me before trying this solution (see below). Steps:
Note the language and package that the Error loading colour scheme reports (my case was: markdown and MarkdownEditing).
Go to your AppData directory (type %AppData% in file explorer address bar).
Open directory Sublime Text 3, or whatever your version is.
Open the .sublime-settings file that matches the language from step 1.
Remove any lines that refer to the package you noted from step 1.
Remember that this file should be a properly formatted JSON file when you remove lines manually. Save this file and restart Sublime Text.
Background
I've decided to post here in case some of the python script solutions didn't work for you and your situation is similar to mine. I'm using GitHub to sync my Sublime Text AppData (Windows 10), in order to keep my workflow settings the same on multiple machines. Recently, I noticed that when I uninstalled a certain package on one of my machines, I accidentally merged some configuration files for that non-existent package on my other machine. This resulted in a persistent Error loading colour scheme, in particular for me when changing syntax to markdown (the package was MarkdownEditing for reference).
In Sublime Text 3, how do I edit my pre-existing snippet files? Is there a way of doing this within ST?
At the time of writing, there doesn't seem to be a straightforward answer to this anywhere on the web.
Custom snippets are saved in a .sublime-snippet file that you create when you first save the snippet.
By default, these are placed in the "User" package. You can either browse to the file like you would any other file, or using PackageResourceViewer: Open Resource -> User -> [name of your snippet file]
For those of you that like a visual instruction here it is:
Then, you can find your snippet like this:
If someone (like me) is looking to edit a custom snippet:
open file *.sublime-snippet which exists in
[home_directory]/.config/sublime-text-3/Packages/User/
If you have another file organization:
Start to make new snippet - Tools->developer->new snippet
Try to save it. Sublime shows you the right directory with snippets
Tools -> Developer -> View package file -> search for the existing snippet.
Change and save.
Here are the steps I had to follow (figure out on my own) for anyone else who wants to edit the built-in snippets of Sublime (in my case Javascript's "fun" "function" snippet). Note: this assumes you've installed the Package "PackageResourceViewer" already:
--> PackageResourceViewer: Extract Package
Then specify which package(s) you want to extract. FWIW this process was a bit confusing for me ... somehow I managed to select everything? but I only wanted/needed "JavaScript".
Wait a second or three for Sublime to extract these (no idea what this does in background, I assume maybe unzipping/extracting loose files to your file system?)
You'll get a confirmation dialog about your successful extraction
NOW you can edit built-in snippets by --> PackageResourceViewer: Open Resource
--> Select "JavaScript" (in my case)
--> Select "/Snippets" (in my case)
--> Select your snippet (in my case it was "function-(fun).sublime-snippet" or something like that.
The file will open and you can modify/save your changes ... FINALLY!
WAY too complicated IMHO but at least it works.
Here is how to edit built-in snippets manually on macOS, in this case the JavaScript snippets. This is a way to do it without installing plugins:
Right click the Sublime Text app, select "Show Package Contents"
In the Finder, navigate to Contents -> MacOS -> Packages
Copy the JavaScript.sublime-package file to ~/Library/Application Support/Sublime Text 3/Installed Packages
Change the file name from JavaScript.sublime-package to JavaScript.zip and unzip the file
In your text editor, edit the contents of the unzipped JavaScript folder as required (e.g. delete the fun snippet from the Snippets folder)
Zip up the JavaScript folder again, rename it from JavaScript.zip to JavaScript.sublime-package and leave it in the Installed Packages folder.
Restart Sublime. Your new JavaScript package will override the built-in package.
In sublime I know even if you don't save the changes in a file later one you can start from where you left off. I opened a new tab in sublime and closed the application before I save my file. Does sublime save a temp file somewhere in the computer (I am using MAC OSx)
Sublime Text 2 stores the files in ~/Library/Application Support/Sublime Text 2/Settings, in the .sublime_session files that are located there.
The contents of those files are a large JSON blob that contains the individual tab contents. Search in the file for the file name / tab name / a key word in the document and you should be able to get what you need.
For Sublime Text 3, use the following path:
~/Library/Application Support/Sublime Text 3/Local/Session.sublime_session
Credit to: eebbesen
I know it's a late answer but here's where I found it.
Linux: ~/.config/sublime-text-3/Local/Session.sublime_session
Windows: %USERPROFILE%\AppData\Roaming\Sublime Text 2\Settings\Session.sublime_session
Hope this helps someone someday.
As far as I know, Sublime Text keeps open files when you quit the application. However, if you close the tabs or project window without saving, the changes are lost.
In the former case, the files are saved in Local/Session.sublime-session (I'm using ST3 though, could be different in ST2!) You can open ST's packages folder from the command palette using "Browse Packages".
For Sublime Text 3,
Windows: %USERPROFILE%\AppData\Roaming\Sublime Text 3\Local\Session.sublime_session
For Sublime Text 3 / For Sublime Text 4
If you used portable version(.zip) version then refer to
sublime_installation_folder\Data\Local\Session.sublime_session
PS: Make a backup, before replacing the file, in case, you want to revert
This gives you your unsaved files and opened files as per your recent view.
I remember being able to edit ST2 tabs colors and what not. How is it done in ST3 though?
I'd recommend copying the theme file to your user folder, then making the modifications there. Then, you can manually choose your custom version. Alternatively, you can override files in the packages folder. To assist with this, you can use PackageResourceViewier. I wrote it to help with viewing/overriding packages in ST3. With that being said, I haven't tried to edit theme files, so it may handle things in an odd way. So, I'd again recommend the first option of copying out the theme file, then manually choosing it.
For a reference on how to change the theme in your settings, see here.
For ST3
Backup Packages/Color Scheme - Default.sublime-package
Open Packages/Color Scheme - Default.sublime-package in some kind of archive manager program. (make sure you have write permissions)
Copy out the theme file you want to edit.
Edit the theme file.
Overwrite the theme file inside the Archive.
Restart Sublime
Smile