Closed GoogleCodeExporter closed 8 years ago
This problem occurs in eclipse, please disregard textmate.
Original comment by expectat...@gmail.com
on 4 Jan 2010 at 7:58
ok, looks like what is occurring is that ZC isn't able to determine the correct
editor type for css entries. If I alter line 24 of the ExpandAbbreviation.js
file
from:
editor_type = getEditorType() || 'html';
to:
editor_type = getEditorType() || 'css';
I can now expand CSS abbreviations (though not HTML ones anymore). I'll see if
I can
add some hints in zen_eclipse.js to encourage the CSS editor.
Original comment by expectat...@gmail.com
on 5 Jan 2010 at 5:13
ok, after trying this out on my mac I've found that TextMate uses cmd-e to
expand
HTML abbreviations, and a tab to expand CSS. For eclipse I've added an Expand
CSS
Abbreviation.js file to my scripts directory, and have assigned alt-s to expand
CSS
as noted below. (alt-e still expands HTML)
The issue of ZC not finding the correct editor may be due to the fact that I'm
running the plugin on Eclipse 3.4.1 vs Aptana studio.
In any event, below is my Expand CSS Abbreviation.js content, if anyone is
interested. I manually force CSS as the editor for this key combination.
/*
* Menu: Zen Coding > Expand CSS Abbreviation
* Kudos: Sergey Chikuyonok (http://chikuyonok.ru)
* License: EPL 1.0
* Key: M3+S
* DOM:
http://download.eclipse.org/technology/dash/update/org.eclipse.eclipsemonkey.lan
g.jav
ascript
*
* @include "/EclipseMonkey/scripts/monkey-doc.js"
* @include "lib/core.js"
* @include "settings.js"
*/
// init engine
include('zen_settings.js');
try {
include('my_zen_settings.js');
} catch(e){}
include('lib/zen_coding.js');
include('lib/zen_eclipse.js');
function main() {
var editor_type = 'css'
try {
if (!editor_type) {
if (use_tab)
expandTab();
else
printMessage('"Expand CSS abbreviation" doesn\'t work
in this editor.');
return;
}
} catch(e) {
if (use_tab)
expandTab();
}
mainExpandAbbreviation(editor_type, guessProfileName());
}
Original comment by expectat...@gmail.com
on 5 Jan 2010 at 5:50
Do you use Aptana HTML editor for coding? ZC uses internal Aptana utils to
determine current editing region
(HTML, CSS, JS). If you're using other editor (like WTP), ZC will fallback to
HTML abbreviations
Original comment by serge....@gmail.com
on 5 Jan 2010 at 5:58
Hello Serge, I'm using Eclipse 3.4.1 - it uses a variety of editors. For most
of the
front end work, it's using the JSP editor (Aptana isn't even listed). I fully
realize
that you don't list Eclipse as a supported editor, though Aptana is built upon
it.
Since I'm using Eclipse, do you feel that targeting a separate key-combination
for
CSS expansion was the correct route? OR was there a more simplified way to get
the
same effect?
In any event, it's good to know that zen-coding works on another editor. Thanks
for
the hard work.
Original comment by expectat...@gmail.com
on 5 Jan 2010 at 9:09
I'll try to add independent editing region recognition for the next version. It
will check if you're writing
abbreviations inside <style> tag
Original comment by serge....@gmail.com
on 7 Jan 2010 at 10:47
Original comment by serge....@gmail.com
on 9 Feb 2010 at 10:58
Original comment by serge....@gmail.com
on 13 Feb 2010 at 2:03
Original issue reported on code.google.com by
expectat...@gmail.com
on 4 Jan 2010 at 7:46