Showing reSturctured text (.rst) structure overview in Sublime Text - sublimetext2

Sublime Text 2 only has an additional side bar window, but it's inconvenient with bigger file, such as reStructuredText file with lots of contents.
So is there a plugin to show file structure in Sublime Text (haven't Google out so far), or it is possible to create a plugin to show the file structure?
Thanks!

There is no such plugin as far as I know.
For your code files you can see the structure in Go to Symbol menu (CMD+R on OSX)
if the files are supported by Sublime Text. SublimeCodeIntel provides "code intel" support for many programming languages.
Sublime Text did not have a decent .RST structure parser last time I checked few months ago, but I would be really grateful if someone creates such plugin (willing to donate).
You can create syntax colorizer with the base Sublime Text (no Python coding needed), but for language analysis a full fetched plugin is required. I suggest you open another question for how to write such plugins.

Related

Search for files in Sublime Text 2

How do i search for files in Sublime Text 2 inside a project?
I don't want to search the contents of files, just file names.
This should be ridiculously simple but I can't figure out (Google points some answers to the Sublime Text Forum but it is offline right now)
A keyboard shortcut would be amazing.
Press Ctrl+P (or Cmd+P) to open Goto Anything and just start typing the filename you're looking for!
source

How do I program different languages in Sublime Text?

I recently downloaded Sublime Text, but I could only find 9 languages, all of which I don't program. I would like to code HTML, CSS, and JavaScript, and I would like to know how to add these build systems onto my computer.
SublimeText is just a text editor with some 'extra bits' plugged in.
HTML, CSS and JavaScript aren't compiled languages, so you don't need a compiler, just save the file with the correct extention (.html, .cs or .js).
For syntax highlighting, click the box on the far right of the status bar, it'll list some languages that SublimeText knows about, including those three and will helpfully provide syntax colouring and formatting to help you along.
Sublime text is only a text editor. As for HTML, CSS, and JS, those are all present in sublime, and don't require a build system, just a web browser.
If you want to use those languages, use shift-command(control?)-p to open the command pallet and type sshtml, sscss, ssjavascript, etc. to set the syntax highlighting.
To run it, simply open the HTML file in your browser, and reload the page if you've made changes.

How can I modify User Preferences in Sublime Text 2 via a Build System?

What I want
How can I 'build' an HTML file so that it opens in my browser and Sublime Text 2 does not display a build panel?
More generally, how can I interact with Sublime Text 2 settings from my .sublime-build files?
I'm on Mac OS X/Chrome 32.0.1700.102.
I'd like to suppress the build panel in Sublime Text 2 (ST2) on a per-build-system basis. If necessary, I'd be OK suppressing depending on the syntax of the open window. Basically, I want to be able to open an HTML file I'm editing in my browser without seeing the [Finished in 0.01s] output at the bottom of the screen. An analogous question has been asked on superuser.
The setting to change is show_panel_on_build and my HTML.sublime-build is simply
{
"cmd": ["open", "$file"]
}
What I've tried
When I add "show_panel_on_build": false to HTML.sublime-build my builds hang and do not complete (and the panel shows up!).
I also tried installing Better Build System, but then my build stopped working entirely. I did not investigate the issue in detail.
Obviously, I could so something silly like write a script which modifies my User Preferences file outside of ST2, but I'm hoping for a more elegant solution.
Any thoughts (or pointers to appropriate plugins) appreciated. Thanks!

Is it possible to add information to the head tag of multiple HTML files, without going into each file manually?

Basically, I have a stylesheet I need to add to a LOT of HTML files. It would take so long to add it to each one manually that it wouldn't even be worth it. Is there any script or application I can use to help me with this, or any tricks in HTML I can take advantage of? Thanks.
Most IDE's have a function called 'find and replace'. I work with Netbeans, but I imagine almost every IDE can do this, perhaps even a decent text editor may be sufficient. Usually you can find it in the 'edit' menu somewhere.
You could search for </head> and replace it with <link href=.../></head> or something similar.
Ususally you can tell the replace function which folder it should search in, and even wich file types to check for. Should be easy and done in a couple of seconds.
Do these HTML pages share some resource? You can consider 2 options:
1 - Make a script to insert those stylesheets to the HTML files head automatically or;
2 - Insert the stylesheet once in an resource(Require the file for an script i.e) already shared by those files;
use php include(); and paste it on top of files. wont take you more than 5sec per page.
You can do this fairly easily using a good text editor like Sublime Text 2 or TextMate (Mac OS X). Here are instructions for how to do this in Sublime Text 2:
Open Sublime Text 2
Create A New Window (File » New Window)
Make sure the Side Bar is visible (View » Side Bar…)
Drag and drop the HTML files (you want to add the stylesheet to) onto the Side Bar
Find » Find in Files… (Note the mini find-replace dialog at the bottom of the window)
Search: </head>
Where: (Clear this field so it will look in: Open files and folders)
Replace: <link href=.../></head> (Hat tip to: #PeterVR)
Click Replace
Confirm dialog and be sure to save all your files!
Good luck!

How to configure Sublime Text 2 editor for easier working with ATK4 framework?

How to configure Sublime Text 2 editor for easier working with ATK4 framework?
I'm interested in some standard macros (snippets) for page, view, model files and maybe some more Sublime Text 2 editor configuration details useful for developing in ATK4.
I had two and I've contributed them into atk4/tools folder. You can found them here:
https://github.com/atk4/atk4/tree/master/tools
Feel free to contribute more!
I cannot find any plugins for ATK4. You could make requests for plugins on the ST2 UserEcho and see if you get any bites.