I hope you're using SublimeText 3 newer than 3085 with the new syntax format. if not let me know and I'll give a converted version of the old tmLanguage format.
Caveats:
This only supports 8 level of indentation (for more than that you probably want a custom tmTheme file)
This only work with tab indented files, not space intended ones. (it's easy to convert them using the status bar)
Code:
%YAML 1.2 --- # http://www.sublimetext.com/docs/3/syntax.html name: Indented scope: text.indented contexts: main: - match: ^(\t{1})(?!\t).+$ scope: 'keyword' - match: ^(\t{2})(?!\t).+$ scope: 'constant' - match: ^(\t{3})(?!\t).+$ scope: 'storage' - match: ^(\t{4})(?!\t).+$ scope: 'entity' - match: ^(\t{5})(?!\t).+$ scope: 'string' - match: ^(\t{6})(?!\t).+$ scope: 'support' - match: ^(\t{7})(?!\t).+$ scope: 'comment' - match: ^(\t{8})(?!\t).+$ scope: 'invalid'
https://stackoverflow.com/questions/21190392/how-to-change-default-code-snippets-in-sublime-text-3
command palette
Package Resource Viewer: Open Resource
python
for.sublime-snippet
Not a fan. Each of the three different shapes used for Yosemite-style icons (circle, square, and tilted rectangle) communicate at a high level what the app's primary function is (more discussion on this design language here). Sublime Text is an application meant to get work done (it's a productivity app) and therefore should use the tilted rectangle. Otherwise the icon shape is incorrectly communicating what the app's function is. For a true Yosemite-themed Sublime Text icon I'd instead recommend Rafael's on Dribbble.
To further expand on the windows location, you can use the %APPDATA% Windows Environment Variable as a shortcut:
%APPDATA%\Sublime Text 2\Settings\License.sublime_license
Here's a list of more that may come in handy for other projects.
There's a project called Lime Text which aims to be an open source clone of Sublme Text. I haven't tried it, but probably will in a few months. It looks like it's under active development from their Github page.
Edit: I see they're using a thing call Bountysource. Haven't seen this before. Looks like you can put bounties on features. We could donate this way.
Yeah, just run 'subl .' and Sublime will open with the current directory in the folders list. Or, to open Sublime with every file in the directory in a tab, run 'subl *'.
If you don't have the subl command on your command line yet, follow these instructions:
Just for reference, Jon's style seems to be a pattern of going dark working on things and then appearing with a series of iterations. If you look at this forum post from 2008, you can see users wondering if it was dead back then: http://www.sublimetext.com/forum/viewtopic.php?f=2&t=150. This was during Sublime Text 1 days, when it only ran on Windows.
Sure, it's Luxi Mono. I used to go with Ubuntu Mono but eventually switched over to Luxi. It's a great, great font!
Kinda reminds me of writing tons of Delphi code in Courier, which I think was Borland's default font back in the day :D
Hope that helps you out :)
I use GitHub for Mac as it's great for diffs and easy commits. But there should be a git plugin for Sublime if you don't like switching apps.
For pulling into the server, if you're comfortable with the command line then setting up a bare repo on your server and using a post-commit hook is the best method (in that case you don't even need GitHub). Tutorial here: https://www.digitalocean.com/community/tutorials/how-to-set-up-automatic-deployment-with-git-with-a-vps
GitHub also lets you specify git hooks in the settings, but I don't know if there's an easy way to transfer files from GitHub to your server.
I have not checked out all the different packages out there for Markdown. Maybe there is one that already does this. Alternatively, you can do it yourself by making a new .sublime-syntax
file. You could copy an existing such file, and modify it. Or, you could start from scratch, write the new bit, and "import" everything from an existing file.
Going for the second option, here is a quick and dirty example. with_prototype
does the magic here, for reference see the official docs.
%YAML 1.2 --- # http://www.sublimetext.com/docs/3/syntax.html name: Markdown Custom file_extensions: - md - mdown - markdown - markdn scope: text.html.markdown.custom contexts: main: - match: '' push: scope:text.html.markdown with_prototype: - match: '(^)([)([^]]*)(])' captures: '1': punctuation.separator.footnote.markdown '2': punctuation.definition.footnote.begin.markdown '3': support.function.footnote.markdown '4': punctuation.definition.footnote.begin.markdown
I borrowed the regex from u/Asmor, and chose some placeholder scope names.
To use it, place it anywhere Sublime Text can find it, e.g. in sublime-text/packages/user/
. With a markdown file open you can navigate to View/Syntax/Open all with current extension as...
in the menu and select whatever you called it (the bit name: Markdown Custom
in the above snippet).
There is this other one I liked better but it is clearly made to fit with yosemite's new icon set and I'm still using mavericks. The one I chose fit perfectly near chrome, ADT, the launchpad and some others.
how about this:
replace all results with the first capture followed by a space, then the second capture: \1 \2
notes:
that recipe works across the whole file. If you want it to work just on certain tags, it is more complicated and I will have to think of something else.
there's always many ways to achieve the same goal when using regex. The key is to keep trying variations and use lots of buffers and lots of undo in Sublime to help you get there. And don't be afraid to use multiple steps i.e. multiple search/replace/copy/paste/edit steps to get to the end goal.
there are many slight variations of regex syntax, depending on the application, the programming language, the regex library, and how they are configured. Last time I checked, Sublime was using the Boost regex library (although not 100% sure about this) which is documented here: (http://www.boost.org/doc/libs/1_55_0/libs/regex/doc/html/boost_regex/syntax/basic_syntax.html).
In the editor space, $70 is not a lot. (Yes, I realize this is an IDE and does a lot more, and also that there is a free edition)
What justifies the price tag is the amount of work that went into developing the core, almost entirely being done by one guy. Atom and VSCode are fancy, but they're not platform native. They're slow. Anyone can build an editor using web tech relatively easily, but to make a native cross platform editor that runs as fast as Sublime does is not quite as easy.
here's a way you can do it:
Also, I recommend you make a custom keybinding for uploading files, here's how I did it (under preferences -> key bindings -- user):
[ {"keys": ["ctrl+shift+enter"], "command": "sftp_upload_file"}, ]
Finally, your question sounds like you're not using version control (correct me if I'm wrong), you should really look into it if you want to get anywhere serious with coding, try git.
I recorded a macro, saved it, and assigned it a shortcut.
Then you can assign a macro to a keyboard shortcut : http://superuser.com/questions/609057/how-do-i-assign-a-keyboard-shortcut-to-recorded-macro-in-sublime-text
Only downside is that you loose your old clipboard.
No problem! Did a quick bit of Googleing after giving it a go on my own and found this gist from someone with a similar idea.
The important lines are the #Persistent
and SetCapsLockState, AlwaysOff
lines. After that, you can add the commands you need, having both commands for the key combo downstroke and commands for the key combo upstroke.
Once you have your script set up, you can setup your computer so that the script will always run on startup. See here for instructions.
This can be done but it depends on your operating system, Sublime doesn't implement this directly.
For example on macOS you could use BetterTouchTool to add a Launch/Show App action for whatever hotkey you want.
In Windows, you can do this nativelynatively or with AutoHotkey if you want more control.
In Linux, xbindkeys can help you with this.
Thanks for reading! Glad you found it useful :)
Yeah, I noticed the Command Palette has a "UI: Select Theme" and "UI: Select Color Scheme" options. Apparently, this was shipped with Sublime Text v3 - Added color scheme and theme switchers with live preview via the command palette
Thanks for pointing that out! I will update the article accordingly this week :)
Plugins must wait until the sublime
code loads before calling it. Try putting the code inside of a plugin_loaded
function.
def plugin_loaded(): settings = sublime.load_settings("MyPlugin.sublime-settings") name = settings.get("name") print(name)
Reference: "Plugin Lifecycle" in API docs http://www.sublimetext.com/docs/3/api_reference.html
Your question is not about SublimeText…
Your question is about how to load custom fonts into a HTML page via CSS.
Installing a new font into your computer via FontBook.app will allow you to see the custom font in your HTML page, but only in your computer (because that's where the font is). If you want another person to see the HTML page with the same font you have to either put the font in a web server and link it via CSS (as described by the link above) or use CSS to reference a font that is already available on the internet, you can do this using Google Fonts.
Asking "[…] is there away to connect fontbook to sublime text?" in this sub-reddit will confuse the readers to think that you want to install a new font into your computer so you can change the font used by SublimeText, and — if I understood your question correctly — that's not what you want to do, SublimeText has nothing to do here. If you want to know more, I suggest you to ask for help in /r/css or /r/webdev .
Libre Office is what comes with Ubuntu and most other Debian related distros. Open office is the other popular alternative that Libre Office is based on. I'd go to /r/libreoffice and ask if what you use MS Office for will work or not. If it doesn't, some Windows applications work really well with Wine. If it won't work for you, no one loses anything so just take your time and make your own decision.
I agree with most of what you're saying. Whether or not it's "fair" ... well Blender almost went kaput but the community rallied and worked with NaN to open source the product that a community desperately wanted to keep alive and look at it today. The Blender community certainly wouldn't be the same otherwise (https://www.blender.org/foundation/history/). Atom, VSCode and others have already surpassed Sublime in certain very visible areas and it's not like users haven't noticed (https://news.ycombinator.com/item?id=10900355). What is the number one issue users have every single time one of these threads start almost anywhere you read it? Sublime is really great but development has stagnated or is dead, etc.. Again just because it works for some today isn't going to keep the community and therefore the product alive. Does that mean you should stop using Sublime because development appears to be waning, no? Keep using by all means, I still do depending on the project at hand. As I've previously commented, in its current form, Sublime Text is on a path to irrelevance if you use history as any valid measure. The flip-side to this argument is that even if Mr. Skinner were to say today, "hey it's open source, go nuts" that still doesn't guarantee a bright future, only opens the door to the very possibility. I've already stated that Mr. Skinner is fully within his rights and wishes to do as he pleases, hell, who am I to tell him otherwise? He's done brilliant work with it, I just want its bugs fixed, plugin system to evolve and be extended and its community to be as vibrant as the competition.
Using ST3 for LaTeX exclusively here. With plugins like latexing and latex-cwl it's still the best editor i've ever used. Tried out Atom multiple times, but the auto-complete feature there tries to complete command in languages I don't even know and i haven't found where to disable this.
So even though ST3 development might stand still, it's still the best editor out there.
So long i'll be patiently waiting for http://limetext.org/ to get a stable release for windows.
you should type in the video so that you can follow along in the environment they set up.
You can download the processing language IDE from here, which will let you run the code they are teaching you in the tutorial:
That tutorial uses JavaScript, and specifically the processing library inside JavaScript (think of the library as an extension of the language, that you usually need to install separately).
For example, when you type “ellipse()” you’re actually using this function here:
http://processingjs.org/reference/ellipse_/
JavaScript is the language used in your web browser, so it can run on any computer that has a web browser.
As with any language, you need something to write the code (sublime is an excellent choice) but you also need something to interpret (this is a simplification but it is correct for JavaScript) the code. If you wanted to make this work on your own computer, you would need to download the processing javascript library, make a simple web page using HTML, and then have a processing script loaded by that web page.
Vim doesn't have multi-cursors, but the two other things are supported either out of the box or with plugins.
A vim-like editor with multi-cursor support you might want to check out is kakoune.
When you see the triple angular brackets in the terminal, like >>>
it means that you are inside the Python Interpreter prompt. You can only input Python code in that prompt, but in the screenshot you are trying to execute an Unix command, in this case python3
, later you tried to execute a file with starter.py
and finally tried ls
which is also an Unix command. Executing all these things in the Python Interpreter will always fails because that's not Python code, it's just a bunch of Unix commands.
To execute a Python script, you have two options:
• Open the Terminal, but don't type python
, simply type python3 starter.py
• Another option (which I don't recommend in this case) is to do what you already did, which is to open the Terminal and execute python
, then —when the triple angular brackets appear— copy and paste every single line from the "starter.py" into the Python Interpreter prompt, one by one, including the indentation.
An even better option is to install a proper Python IDE, I recommend PyCharm [1]. Everything is already configured there to work on a Python project, no need to waste your time configuring things by yourself or figuring out how to execute the scripts. Later when you are more experienced, you can learn more about these things that right now are irrelevant for your programming classes.
Just added a couple Key Bindings. Leaving them here for prosperity
// F9 = sort (default) // Ctrl+F9 = Sort + Unique // Alt+F9 = Reverse // Ctrl+Alt+F9 = Sort + Unique + Reverse { "keys": ["ctrl+f9"], "command": "run_multiple_commands", "args": { "commands": [ {"command": "sort_lines", "case_sensitive": true }, {"command": "permute_lines", "args": {"operation": "unique"} }, ]}}, { "keys": ["alt+f9"], "command": "permute_lines", "args": {"operation": "reverse"} }, { "keys": ["ctrl+alt+f9"], "command": "run_multiple_commands", "args": { "commands": [ {"command": "sort_lines", "case_sensitive": true }, {"command": "permute_lines", "args": {"operation": "unique"} }, {"command": "permute_lines", "args": {"operation": "reverse"} }, ]}},
(<code>run_multiple_commands</code>)
// Ctrl+T = new Tab (every browser) // Ctrl+N = new Window (every browser) { "keys": ["ctrl+t"], "command": "new_file" }, { "keys": ["ctrl+n"], "command": "new_window" }, { "keys": ["ctrl+shift+n"], "command": "new_window" },
// Alt+N = New View into File { "keys": ["alt+n"] , "command": "clone_file" },
Find in Files results can appear in 2 ways depending on a toggle in the search panel:
This can be generated by window.new_file()
http://www.sublimetext.com/docs/3/api_reference.html#sublime.Window
This can be opened via the window command open_panel
. Here is the code I use in Find++:
window.run_command("show_panel", {"panel": "output.find_results"})
Find in files results are inserted as you and I would type them. The collapsable sections are defined because it uses a custom .tmLanguage
. To get a similar effect, you can use
window.run_command("insert", {"characters": "\n"})
next_view
and prev_view
will still cycle between groups. next_view_in_stack
and prev_view_in_stack
stays in a group, but tabs switching order is not linear.
I also found this link where my problem is exactly the same. It also mentions this plugin which used to work on ST2, but not in ST3. I guess I'll try to port it somehow to ST3 a bit later.
https://launchpad.net/~nilarimogard/+contactuser is the closet I've found, worth a shot. (requires a launchpad login)
Though the PPA has only been for versions available from https://www.sublimetext.com/3, not dev builds so it's not out of date.
Give Karabiner a try. Not positive you can use it for the tab key (I don't have it installed any more), but I think it is commonly used to re-map the CAPS LOCK key, so maybe you can re-map that to tab.
There is a Plug-in called Hermes, which adds the functionality of basic Jupyter connections to subline text. The programming structure is oriented to hydrogen, which is available for atom and vs code. A code cell is created by a line containig #%%. The Plug-in sends the code to a connected kernel and displays the results.
Sadly the maintainer does not have the time to continue the development of the Plug-in and there are some bugs in the current code base. Currently I try to figure out how it works and build a development flow for sublime plugins, so I can take over fixing some of this bugs.
https://packagecontrol.io/packages/Hermes https://atom.io/packages/hydrogen
You can fix this through the registry. Skip to step 5 here: https://winaero.com/blog/change-color-of-inactive-title-bars-in-windows-10/
You might try this Autohotkey script. I did what you're describing for a while, but I don't remember if this was the script I used. If not, there's definitely another AHK script that works.
Also, I've sometimes had trouble with Sublime key combinations not working for some reason. I ended up assigning a really random key combo just to make sure that wasn't the issue, then changing it to something that made more sense once I determined that things actually worked.
Browser Refresh works for me, but I only use it for a single browser.
https://stackoverflow.com/questions/21671116/sublime-text-2-how-to-change-tab-font-for-the-soda-theme the question in that stackoverflow link have a picture of what I'm talking about, did you changed the tabs font for a bigger number than 13?
This is the Incremental diff functionality. Use this in settings: ""mini_diff": false,". Read all about it in ST official documentation here.
I will start with obvious questions:
You can also go here and click on "direct downloads" in the same line as the link to the "Linux repos", then install the DEB package which will hopefully configure it for future updates via the system package manager, although SublimeText already has a built-in update feature so I wouldn't worry too much about it.
congratz, they work for me though. Else you should submit a PR to fix the wording if you think this will improve the documentation.
Else there is http://www.sublimetext.com/docs/3/scope_naming.html#color_schemes if you want to follow the convention
....... but you didn't answer the question. What is missing for you? Are you a power user? If there was not a change log, could you tell the differences between 3080 and 3083?
> I would be fine if the ST3 beta is updated on a weekly or even monthly timeframe.
from http://www.sublimetext.com/3
>"Even more bleeding-edge versions are available in the dev builds."
> Also, it shouldn't be that development stops because there aren't any more features to add/bugs to fix
From what I can tell he more or less burnt himself out. Jon is a bit of a perfectionist, so there been times when he was about to do a release, and trashed it completely.
but I have been eyeing VScode, the absolute speed of development, the great blog that showcase changes...
Atom is left in the distance, especially when microsoft owns both...
This is one of the reasons to use cygwin over WSL. I find that not being able to edit the linux-side files with Windows apps particularly annoying, so until it gets fixed, I'm using cygwin.
Ah, I see. They've had an installer since I've been using it, but I installed through chocolatey with no issues.
I actually find it to be the best editor if you work on multiple operating systems. Vim and Emacs are difficult to get working properly in Windows.
Awesome, thanks for the detailed response. I think I even bumped into a post/video from you explaining your Terminus config and set up when googling this issue earlier, but can't remember exactly where that was. I did bookmark the screencast though - with deigns to explore further if I couldn't get REPL to behave as expected consistently.
Did you ever post a full youtube video for the topic? Either way I'm looking forward to subscribing to and going through all your videos now.
Will also def. look into Terminus more as it seems very promising.
The additional information re: SublimeREPL breakage is helpful as well.
Something that might help is Notepad Replacer . It’s a free standalone program. Just run the installer if or when you want to change your Notepad.exe. I’ve used it successfully for years.
Do just one thing and do it well.
That was and is a good philosophy. Try devd
Start it on your project directory and use Sublime as usual.
Livereload When livereload is enabled, devd injects a small script into HTML pages, just before the closing head tag. The script listens for change notifications over a websocket connection, and reloads resources as needed. No browser addon is required, and livereload works even for reverse proxied apps. If only changes to CSS files are seen, devd will only reload external CSS resources, otherwise a full page reload is done. This serves the current directory with livereload enabled:
-
$ devd -l .
In case any of you are curious, there is already an open-source text editor based on Sublime called Lime Text. I believe the creators tried to reverse engineer ST to make it, although I don't really know much about it.
If you are very new to sublime (or programming in general) I would highly recommend laracasts. https://laracasts.com/series/sublime-text-mastery
It is not free, but you can learn a lot. Also check out Vim mastery, I think you will like it if you like to make your text editor looking great and helping you program :)
That shows the tree but where are the commits? Can I zoom? Why is it oblique? Can I get the state of the file at a specific commit?
I just checked out both VS Code and Atom. Apart from doing simple things they wont even let you see things. There are plugins for some of the trivial things like git-log but I didn't found them even close to what Magit offers me. I can literally switch to any version of the file, see any kind of diff, apply any commit, merge in my own way, rebase, stash, run git commands and lots more.
Quoting from their site:
> While many fine Git clients exist, only Magit and Git itself deserve to be called porcelains
I am not sure what the motivation is, but usually I try to stay away from Windows specific stuff. Unfortunately there is sometimes a windows.h that comes in. Clang seems to be targeting MSVC compatibility http://clang.llvm.org/docs/MSVCCompatibility.html, so there might be a way to get SublimeClang to work
All these features are available in a single sublime plugin. Atom and VSCode even ship with full git GUIs out of the box.
I use a more visual app when I need more than manipulating the working index.
(And yeah, I hit space to open up a visual diff that let's me tab between the files and do a whole bunch of keyboard mashing.)
Hmm, that's not the most descriptive error message.
Just want to do a sanity check. So you've got your main file, main.scss
. Inside that you've got @import 'badtastepartial'
.
In the same directory as main.scss
, you've got a file called _badtastepartial.scss
. If you put the contents of that inside main.scss
and remove the @import 'badtastepartial'
statement, it works fine?
Your sassbuilder config file is only pointing to main.scss
, is that right?
Can you try running sass directly on the file from the command line? You should be able to navigate to the /scss/ directory and type in sass main.scss main.css
and get a properly converted CSS file.
If all the above is true, then it does sound like SassBuilder is kinda screwed. You could check you've got the latest version, or try using another program. The simplest option is just typing sass --watch input.scss:output.css
or sass --watch /scss/input.scss:/css/output.css
to your command line.
If you're not a fan of the command line, then you can try using one of several applications to compile sass. Codekit works very well, or I hear that Mixture and Koala are both very good free apps.
Color schemes only control file views; if you want to modify the overall look of the application you need to create a Theme for that.
This is possible but is more involved than simply modifying a color scheme. I'm not aware of any publicly available alternate themes for Sublime Merge currently other than the ones it ships with.
The Official Documentation includes documentation on themes and how to create them; the process is very much like that used for Sublime Text (since they share the same code base to a large degree).
Altering the theme is (to my knowledge) not allowed at all without a license, although it may be possible to alter color schemes in the evaluation copy.
The download page very clearly says:
>Sublime Merge may be downloaded and evaluated for free, however a license must be purchased for continued use. There is currently no enforced time limit for the evaluation.
Many people also think that Sublime Text is free, but it also is not.
> What does "advice a function" mean?
https://www.gnu.org/software/emacs/manual/html_node/elisp/Advising-Functions.html
> Why do I need to change what my editor does?
Because it might not work the way you want it to work. Sure, today's editors don't force you to program them because their core philosophy might not be to change their behaviour. The reason why Emacs is both being hated and loved is because it is not immune to change and provides a full programming language to configure itself which might throw off simple people.
2, 6, 7: If you're using the Package Control (which you definitely should, https://packagecontrol.io/) you can install the package FindKeyConflicts to list key combinations that are set in multiple places. You can then modify these in the user key bindings file, just open the command palette (cmd/ctrl+shift+p) and type "key user". More info on customizing the keys can be found here: http://www.sublimetext.com/docs/key-bindings
Ah, I see. There are the set_status
, get_status
, and erase_status
commands but I couldn't find any Default packages that leveraged these. Otherwise, you are going to be shooting in the dark trying to find out what the key is for those status items (if any).
http://www.sublimetext.com/docs/3/api_reference.html#sublime.View
There is this, but I'm not sure if this is what you're looking for.
It sounds like you want to be able to output whatever you want to this sort of view, though, which means you'd basically need to write your own plugin to do so.
Because he has a guy for that.
>However, development is still active: when I spoke to Jon today he advised me that not only does he expect an update to the beta in August, he has also started mapping out some frameworks for version 4 which will help guide future development.
>Many of you have kindly offered your assistance in the development of Sublime; Jon has made the decision that he will complete version 3.0 himself, and from there we will begin expanding the team of developers. I'm the only other employee at the moment, and my job relates to sales and day to day operations.
I see that in the REPL config you can set it to see line numbers from this forum post. Mind you I am on mobile so I haven't tried it myself.
Another suggestion is to switch the REPL from Python to IPython.
Which issues: I posted this in the Sublime text forum some time ago bit of course nothing ever happend: http://www.sublimetext.com/forum/viewtopic.php?f=3&t=11199&p=56733#p56733
I will have a look at SublimeHaskell today, thanks. Does it work with ST3?
If that is your suggestion for OP, why not suggest him to use Atom altogether? That "vmd" thing works using Electron, and Atom already has a Markdown preview among its core packages. If OP wants to keep getting advantage of the speed that Sublime Text offers then a program like Mou is much more better/faster than an Electron-powered web application.
> "goto-last-edit" is immature and allows to go only to a last edit. But not allows to navigate through history longer than one step.
Sorry, this is the one I use.
> Atom can't do that.
Atom can indeed do it. What you are saying is that nobody has made package that does that, which may be true. And my answer is the same: make it yourself.
Except for 'Preview files when scrolling through dropdown menu' which I have no idea what you are referring to, Atom can do all those things.
There are packages that do already what you are asking, and there are APIs to allow you to build those functionalities yourself.
I'm not trying to build partials. What I want is to be able to build my main Sass file when I save a partial, which is possible with this atom package but not in anything I've found with ST so far.
Ye its sort of sad, like the editor quite a bit my self... But for me I'll wait and have a look at githubs atom.io, just need to get out of beta, and have multiple platform support - but looks quite interesting.
Install Infinality to get a better font rendering, I suggest selecting the OSX profiles.
Then restart your computer to apply changes