How to change jEdit autoclose html tag functionality? - tags

jEdit autocloses the last open html tag when typing
I want jEdit to close the open tag automatically (as it closes a bracket) and places the cursor between the tags.
How can I do this?

jEdit does not auto-close any brackets.
I guess you are using the FirstMate plugin or something similar which is providing that functionality.
The functionality you are searching is in the XML plugin which also handles HTML.
In its settings you have an option for autoclosing on typing "

Related

Brackets auto tag completion like dreamweaver?

I've just about had as much as I can stand with Brackets, and NPP isn't much better. I'm so used to coding in Dreamweaver that I have become very accustomed to Adobe's auto tag completion - for example -
When I type
<div>
div content
misc. stuff
etc
</ (at this point, dreamweaver will complete the </div> tag)
In brackets, as soon as I type
<div>
it will automatically turn it into:
<div></div>
with the cursor in the middle, to insert content between the opening and closing tags.
Notepad++ will do neither of the above, unless I go into settings>preferences and turn on tag autocomplete, where it will do the exact same thing as brackets.
I absolutely hate this, I love the way Dreamweaver completes their tags but I don't like Dreamweaver in general. Is there a setting for this type of auto-completion in Brackets or Notepad++ that I may have overlooked? I've spent literally hours looking for a solution to this, everything from editing backets' JSON file to trying different HTML editors to almost throwing my G** D*** laptop against a wall from infuriation.
Is there a setting I can change, or a specific line of code I can add to Brackets' config.json file? If not, if you know of another program that has dreamweaver style tag closing, please please PLEASE let me know, I've been desperately looking for something to replace it!
Thank you very much in advance.
Yes, in Brackets you can get that behavior by adding this line to your preferences JSON file:
"closeTags": {"whenOpening": false, "whenClosing": true, "indentTags": [], "dontCloseTags": []}
To edit your preferences file, choose Debug > Open Preferences File from the menu. If the file is currently blank, be sure to wrap the above line in {}s.
For more details, check out the full list of Brackets preferences.

How to add a macro to an umbraco page when using the markdown editor

EDIT:
What I really need is an editor that'll allow me to write html directly and allow inserting macros.
I'm using WMD editor in umbraco 7 and need to add a partial view macro to the page.
The editor does not have an insert macro button and if I pasted the following code in the editor, it is not shown in the page. I think the markdown processor removes it from the page ; <umbraco:Macro Alias="YourMacroAlias" \>
How can I add the macro to the page ?
Out of the box, the WMD editor does not support embedding Macros in the same way as the Richtext Editor does. You could raise a feature request at http://issues.umbraco.org and see if they'll add it, or you could take the source of the WMD from the Umbraco source at https://github.com/umbraco/Umbraco-CMS and create your own version of the markdown editor based on it.
The way the Richtext editor does it is that it stores the macro details as a specially formatted bit of markup, and there's some code in the front end that looks for that markup and replaces it with the output of the Macro.
Go to the developer section. Open the Macros.
In your macro there is a checkbox "Use in rich text editor and the grid" and "Render in rich text editor and the grid" check this.
For Using in Rich Text the option must be checked in the Data Type.
In the Developer section there is below Data Types, the Richtext editor data type check umbmacro.
In the Rich Text editor there is a "Insert Macro" Button, the 2 gears icon.
But for a markdown datatype there is no button, no support, An option is invent a tag a replace you tag in the template with somethings else. To come a bit near a macro functionality.
Instead of using Markdown editor for less options, you can disable excess commands for the tinyMce too. Extra tags added by tinyMce can also be disabled, see at end
Firstly there is file in config folder named tinyMceConfig.config. It handles the options in all datatypes using tinyMce. Below is entry for macro
<command>
<umbracoAlias>umbracomacro</umbracoAlias>
<icon>images/editor/insMacro.gif</icon>
<tinyMceCommand value="" userInterface="true" frontendCommand="umbmacro">umbracomacro</tinyMceCommand>
<priority>62</priority>
</command>
Go to
Developer -> DataTypes -> Rich Text Editor
There will be toolbar checkbox list. Select umbmacro from the list and save the data type. You will see the macro on the WYSIWYG editor. Uncheck all unwanted options. Also you can create new datatype say "RTE Lite" using property editor "Rich Text Editor" and use this "RTE Lite" where less options are needed.
Edit: Okay, if you do not like extra p tag added by tinyMce, go to "tiny_mce_src.js" file from your umbraco solution, search for forced_root_block : 'p' and change it to forced_root_block : ''

Way to use a native editor for textarea (or JS-powered WYSIWYG editor)?

I'm looking for a way to use my favorite "native" editor, Sublime Text 2, to fill textareas and/or WYSIWYG-editors like TinyMCE.
I'd like to have some kind of daemon, service or browser extension that waits for, say, a focus event on a textarea and opens a new Sublime Text 2 window for me to type in. Everytime I save (could be to a file in a temporary directory for all I care), the background daemon/service/extension/… updates the contents of the web form field.
So much for my ideal scenario. Is there any way you know of to make this possible (FYI, I'm working under OS X Lion)?
I don't know what browser you're using, but there's an extension for Firefox called "It's all text" where you can:
Right click on a textarea, select "It's All Text!" and edit the text in the editor of your choice.
You can also make a shortcut instead of rightclicking.
[EDIT] And for Google Chrome now there is: https://github.com/Cacodaimon/GhostTextForSublimeText
P.S. In an ideal world all textareas should be small ST2 windows...
Sure, this is possible.
You'll need to write a browser extension for it.
Look for a snippet saving addon on whichever browser you use, go through the source code, figure out how it works, then make one to fit your use-case.
In the meantime, repeat: Ctrl+C, Alt-Tab, Ctrl-V!

Is there a way to copy code from the Eclipse IDE without the rich-text formatting?

Recently every time I copy a block of code from Eclipse and paste the code into TextEdit or a online forum using the code tags, I get the code with the rich-text or html formatting, so I have to copy into a text editor remove the formatting copying and pasting again, In the past this was not a problem I used to copy from eclipse and paste the code without any formatting at all just as plain-text, I dont know if I turn on a property or what I did for this to happen, any ideas how to fix this?
There is an Eclipse bug filed for this that can be voted for:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=45969
It has been open for 10 years though!
There are applications out there that think they can handle rich text but can't. So for those it looks like we'll have to carry on with "Copy-Switch to Notepad-Paste-Select All-Copy-Switch to final app-Paste" for some time yet.
Note: the rich formatting from a SWT editor seems to have always been available (bug 64498).
You could use "Edit, Paste and Match Style" in TextEdit.
From the Edit menu, choose Paste and Match Style,
or use the keyboard shortcut, Shift Option Command V.
The pasted text will pick up all the formatting from the character to the left of the flashing insertion point. This technique works in Mail as well.

How to enable completiion in Coda like Textmate & Notepad++?

Textmate & Notepad++ can complete all words which appeared in the current document, how to enable this in Coda?
e.d. I have typed "some_text" in a document, then when I type "some_" then press ESC - "some_text" should appear in the suggestions list.
Auto-complete in Coda is automatically enabled, and as far as I know, it can't be disabled. It is a lot like Dreamweaver with auto-complete, it will show you your starting tags and should automatically close some tags.
As for words, I'm pretty sure that it doesn't do that.