Does any one know if textmate has a visual way to denote a nested block? I just started using coffee script (which uses tabbed nesting) and thought it would be great to have something similar to this:
http://www.mathworks.com/help/matlab/matlab_prog/section_thirdlevel_highlight.png
Would it be possible to write a plugin that does something along these lines in textmate 2?
Thanks!
Edit: After some more searching I found this is sometimes called "indentation guides". I still havne't found any way to do this in textmate 2 but sublime text has the feature on by default.
Related
Is there any way with TextMate to hide comments when editing code? Sometimes I want to see my code with the full comments and other times just want to see the code itself with all comments hidden. I was hoping there would be a way to toggle the display of comments, but haven't been able to find anything about this.
It is something you will need to edit on a language by language basis, but it is very doable. Inside of Bundles -> Bundle Editor -> Edit Languages you will find the language definition that TextMate uses to highlight that particular syntax. Inside of the syntax definition you will find foldingStartMarker and foldingStopMarker.
You can add comment syntax to those to allow the folding off comments themselves. It might be pretty tricky for single line comments, but multiline comments, that have both a clear and unique start and stop syntax, should work fine.
For PHP, for example, we are going to want to add \/\* to the start syntax, and \*\/ to the end syntax. You will need to reload the bundle for these changes to take effect (or restart TM).
I generally use Sublime as a text editor to keep my notes as I like the feel of sublime.
I was wondering if there is a way I can choose to selectively color/highlight some of my texts (not the whole content).
For the list of to-do things, this coloring can help me to differentiate the processed items in the list and pending items easily. Same for differentiating between important notes and non-important notes, etc.
I suppose you could write your own syntax for it... take a look at other syntaxes.
In your case it would just be regex matching something like this presumably:
- not done
+ done
~ important
* not important
which would be pretty easy to manage.
The good thing about editing the syntaxes is that the results are immediately visible in the file, so you can see if what you did worked.
Does any one know how to create a tab bar like this:
I mean that simple tab, without rounded corners or texture, with "Untitled" string
Is this a standard control? Or is there an open source library for such tabs? I think I saw it in a open source editor or something but totally forgot which one.
There are no doubt other ways to do this, but one I've used often in the past is PSMTabBarControl. It's been around for a while, and forked a few times. The version at https://github.com/dorianj/PSMTabBarControl can be used with Xcode 4.
Documentation can be found http://www.positivespinmedia.com/dev/PSMTabBarControl.html.
Can anyone tell me if there's a quick way to format your code in Text Mate, similar to pressing ctrl K+D in Visual studio?
Thanks!
Edit by Damien_The_Unbeliever:
For those not familiar with Ctrl K+D, it doesn't just indent code - it reformats it using the generally established formatting conventions in the editor - it may replace spaces with tabs or vice-versa for the indentation, ensure code is consistently indented, move braces to separate lines, etc.
TextMate reindenting and reformatting varies a little depending on the language you're using.
You can generally use the Text menu, that depending wether you have an active selection or not it will show you different commands under it. For example, if you have selected a section of code, there will be a Indent Selection menu item. If you have no active selection, it will be Indent Line.
To have this working properly, be sure to select the current language, if it isn't assigned yet (like on unsaved documents). If you're working with HTML, it will simply indent the lines depending on what's above it. It will keep line breaks intact.
If you need something to break out tags on new lines and properly format the document, you should use the Tidy command that is found in the Bundles menu, under HTML (or simply by using the shortcut CTRL+SHIFT+H. If you have a selection active at the moment that you use it, it will simply reindent that section. If instead you have no selection, it will properly reformat the whole document, including checking for tag validity and other errors.
The Bundles for other language have similar commands, like XML (still Tidy) and Javascript (that has a Reformat Document command).
As an ending note, I simply suggest to look into the Bundles menu; there are many little gems in it. ;)
Did you look in the menu bar? Under Text you have a couple of Reformat… entries that may fit your needs.
Beside these native features, some bundles — like the JavaScript one — have custom Reformat… commands : click on the little cog button at the bottom and explore your current language's bundle's content.
Is there any way to have syntax highlighting in the "editor" of dokuwiki?
By this I mean to have syntax highlighting in the actual editing window (in real time) just like using a text editor.
I have never seen anything like this but I was wondering if this is possible. Since I'm inputting a lot of LaTeX math thing into my dokuwiki, it would be great if it can be done.
Have a look at http://www.dokuwiki.org/plugin:aceeditor - I never tried it myself, but it seems to do what you're looking for.