문제

구문 강조 표시와 편집을위한 기타 니스를 추가하는 일식 플러그인이 있습니까? 그리고 사스? Google 검색은 a를 가리키는 것 같습니다 Lucky-dip.net의 죽은 프로젝트.

참고 : 내가 가장 관심이있는 Sass입니다. Sass (또는 그와 비슷한 것과 같은 것을 사용하는 솔루션) 더 적은) 일식에서 내 필요에 맞게 될 것입니다.

또한 Eclipse 용 App Engine 플러그인을 사용하여 Google App Engine (Java)을 위해 개발 중입니다. 따라서 다른 IDE로 전환하는 것은 옵션이 아닙니다.


업데이트: 그래서 지금 사용하는 구문 강조 표시가 있습니다 파스칼의 대답 그리고 설치했습니다 루비 그리고 나침반 Sass를 CSS로 컴파일합니다.

그러나 나는 그것을 알고 있습니다 Sass의 구문은 2.4로 변경됩니다 그래서 나는 여전히 Aptana와 함께 제공되는 Haml과 Sass 편집자를 일하게하고 싶습니다. 내가 그것들을 사용하려고 할 때 그들은 예외를 던지고 파일을 표시하지 않을 것입니다. Aptana를 잘못 구성했거나 편집자의 실제 버그이기 때문인지 알고 싶습니다.

나도있을거야 매우 ECPlise와 통합 된 SASS를 컴파일하는 방법에 관심이있어서 별도의 것을 실행할 필요가 없습니다. (또는 Ecplise 빌드 프로세스에 Sass/Compass를 넣는 방법.)

도움이 되었습니까?

해결책

글쎄, 어때요 aptana? 에 따르면 aptana/eclipse에서 Haml/SaaS 구문 강조 블로그 게시물:

최근에 나는 사용하고 있습니다 일부 레일 프로젝트에서. 그것은 단순히 당신의 견해를 깨끗하고 읽을 수있게합니다. 내가 가진 한 가지 문제는 내가 좋아하는 IDE에서 구문 강조 표시였습니다. Aptana Studio. Haml 구문 강조 지원 지원 Aptana의 최근 업데이트 이후에 더 많은 문제가 발생했으며 더 많은 문제가 발생했습니다.

일부 연구 후 Haml Google Group의 회원 인 Max Kostovetski가 게시 한 솔루션을 발견했습니다. 이제 단계에 :

  1. 하드 드라이브로 다음 파일을 다운로드하십시오.
  2. 에서 aptanaEclipse "Window"메뉴, "기본 설정 ..."를 선택하십시오.
  3. 기본 설정 창에서 "편집자"> "일반 텍스트"를 선택하십시오.
  4. 새 파일 확장을 추가하려면 "Add ..."를 누르십시오. *.haml 그리고 *.sass
  5. 새 확장자 각각의 경우 클릭하고 "Browse ..."를 누르면 적절한 Lexer 파일을 선택하십시오 (*.lxr)
  6. 색상화를 위해 "가져 오기 ..."를 눌러 *.col 파일
  7. "OK"를 누릅니다.
  8. Haml Views를 즐기십시오

추신 : 최신 링크를 제공하므로 원래 블로그 게시물을 참조하십시오.

메모: 이것은 다음과 함께 사용할 수 있습니다 Aptana Radrails Eclipse 플러그인 Aptana 스튜디오뿐만 아니라

업데이트: 글을 쓰는 시점에서 Radrails와 Studio는 Haml과 Sass를 지원하는 것처럼 보이므로 이제 위의 단계를 따르기에 불필요 할 수 있습니다.


Eclipse 내부의 "통합 된"방식으로 SaaS를 컴파일하려면 외부 도구 (실행> 외부 도구). 더 정교한 또 다른 옵션은 A를 추가하는 것입니다.프로그램 빌더"프로젝트에 건축업자 이것과 마찬가지로 블로그 게시물. 물론 설명 된 솔루션은 SAA에 적응해야하지만 그 배후의 원칙은 적용되는 것 같습니다. 주의 : 나는 그것을 직접 구현하지 않았다. 그것은 단지 아이디어 일 뿐이며 그것이 의미가 있다고 확신한다.

다른 팁

최신에 주목하십시오 Eclipsecolorer 실제로 Haml & Sass를 모두 지원합니다. 전체 기능이있는 Aptana IDE가 필요하지 않고 편집자를 찾고 있다면 좋은 대안 선택 일 수 있습니다.

Eclipsecolorer는 또한 더 나은 구문 믹스 지원을 제공합니다. Haml 내부의 다른 언어는 구문 (Ruby, JavaScript, CSS, Sass)과 관련하여 강조 표시됩니다.

Haml 또는 Sass Syntax Highlighters가있는 것으로 보이지는 않지만, 몇 가지 사용 가능한 플러그인을 통해 Vim (Haml Syntax Highlighting을 지원하는)을 Eclipse로 가져 오는 줄을 따라 무언가를하는 것을 고려할 수 있습니다. eclim 가능성이있을 수 있습니다 (그러나 다른 대안을 제공하려고 노력하지는 않았습니다).

또 다른 옵션은 이미 기존의 Eclipse 구문을 사용하여 플러그인을 강조 표시하고 SASS 및/또는 HAML에 대한 구문 강조 표시를 추가하는 것입니다. 같은 것 일식 색상 조사 할 가치가있을 수 있습니다.

나는 이것이 오래된 질문이라는 것을 알고 있지만, 나와 같은 Sass Aond Compass를 처음 접하는 사람에게는 방금 Aptana Studio 3을 설치했으며 이제 .Scss, .sass 및 .haml을 지원하고 있습니다. 즐기다.

Aptana는 나에게 너무 많은 문제를 일으키기 때문에 많은 검색을 한 후 (이 스레드를 켜면) liclipsetext를 발견했습니다 (https://marketplace.eclipse.org/content/liclipsetext)

SASS/SCSS 파일에 대한 구문 강조 표시를 제공하는 플러그인입니다. 그것은 작동하는 것처럼 보이고 "구문 강조 (liclipse, textmate 또는 sublimetext 기반)가 있습니다. 아마도 잘 구성 가능할 것입니다 (나는 그것으로 많이 연주하지 않았지만 기본 구문 강조 표시 기능은 나에게 작동합니다. Eclipse WST CSS 편집기는 SCSS 파일에 대해 할 수 있습니다).

상용 LICLIPSE 플러그인의 개방형 편집자 구성 요소입니다 (https://marketplace.eclipse.org/content/liclipse) 내가 사용하지 않은 것.

Igor의 답변에서 Colorer 플러그인을 찾았지만 .scss 파일 Extention을 사용하고 .sass 파일에만 작동합니다. 지원하는 방법은 다음과 같습니다 .SCSS 파일 확장자 :

먼저 플러그인을 정상적으로 설치하십시오. 고르다 Install New software Eclipse의 도움말 메뉴에서 다음 저장소를 추가하십시오. http://colorer.sf.net/eclipsecolorer. 이제이 저장소를 선택하면 Eclipse Colorer 설치 옵션이 표시됩니다. 드래그 내장 옵션 AFAIK가 없습니다.

설치 후 Eclipse의 플러그인 디렉토리 내부의 Goto Colorer 플러그인 폴더. 내 경우에는 그게 그렇습니다 eclipse/plugins/net.sf.colorer_0.9.9/. 거기에서 3 개의 파일을 수정해야합니다.

  • Colorer/HRC/Common.jar
  • Colorer/HRC/Proto.hrc
  • /plugin.xml

아래 명령어를 수행하기 전에 폴더의 모든 파일을 백업하여 문제가 발생하면 복원하려면 폴더의 모든 파일을 백업하십시오.

Common.jar 수정

Common.jar를 빈 폴더로 추출하십시오. 이것은 일반적인 tar.gz 파일로 수행됩니다. 추출되면 2 개의 파일을 수정해야합니다.

라인 53 및 53 인치를 복제합니다 inet/haml.hrc SCSS로 변경하십시오. 결과는 다음과 같아야합니다.

<block start='/^((\s\s)*):(sass)/' end='/^\M (\s*$|\y1\s)?! /ix' region='def:Insertion' region01='def:Outlined'
    region00='def:PairStart' region10='def:PairEnd' content-priority='low' scheme='sass:sass'/>
<block start='/^((\s\s)*):(scss)/' end='/^\M (\s*$|\y1\s)?! /ix' region='def:Insertion' region01='def:Outlined'
    region00='def:PairStart' region10='def:PairEnd' content-priority='low' scheme='scss:scss'/>

이제 복사하십시오 inet/sass.hrc 에게 inet/scss.hrc 관련 줄을 변경하십시오. 결과 scss.hrc 다음과 같아야합니다.

<?xml version="1.0" encoding='Windows-1251'?>
<!DOCTYPE hrc PUBLIC "-//Cail Lomecb//DTD Colorer HRC take5//EN"
  "http://colorer.sf.net/2003/hrc.dtd">
<hrc version="take5" xmlns="http://colorer.sf.net/2003/hrc"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://colorer.sf.net/2003/hrc http://colorer.sf.net/2003/hrc.xsd">

  <type name="scss">

    <annotation>
     <documentation>
      SCSS Sassy CSS 
     </documentation>
     <contributors><![CDATA[
     Igor Russkih irusskih at gmail dot com
     ]]></contributors>
    </annotation>

    <region name="ClassSelector" parent="def:TypeKeyword"/>
    <region name="IDSelector" parent="def:Keyword"/>
    <region name="IncludeMixin" parent="def:Label"/>

    <scheme name='PropertyNames'>
      <regexp match="/(\$)([\w\d\-]+)/" region='def:Var'/>
      <inherit scheme='css:PropertyNames'/>
    </scheme>

    <scheme name="PropertyWrapper">
       <block start="/~/" end="/(:|\s|$)/" scheme="PropertyNames" region10="def:Symbol"/>

       <regexp match="/(\$)([\w\d\-]+)/" region='def:Var'/>

       <inherit scheme="css:Property"/>
    </scheme>

    <scheme name="scss">
       <!-- property value after colon -->
       <block start="/\M([\$\w\d\-]+)\s*(:)/" end="/\M([\x22\x27]|$)/"
              scheme="PropertyWrapper" region02="def:Symbol"
       />
       <block start="/(:)\s*\M([\w\d\-]+)?/" end="/\M([\x22\x27]|$)/"
              scheme="PropertyWrapper" region02="def:Symbol"
       />
       <regexp match="/^ \s* \M[\.\#\=\@\!] (?{def:Outlined}[\w\d\-]+ ) /x" />

       <regexp match="/ \. (?{ClassSelector}[\w\d\-]+ ) /x" />
       <regexp match="/ \# (?{IDSelector}[\w\d\-]+ ) /x" />
       <regexp match="/ [\=\+] (?{IncludeMixin}[\w\d\-]+ ) /x" />

       <regexp match="/[\(\)&apos;&quot;]/" region='def:Symbol'/>

       <regexp match="/\/\/.*$/" region='def:Comment'/>

       <regexp match="/\@(import|extend|mixin)/" region='def:Keyword'/>

    </scheme>

  </type>
</hrc>
<!-- ***** BEGIN LICENSE BLOCK *****
   - Version: MPL 1.1/GPL 2.0/LGPL 2.1
   -
   - The contents of this file are subject to the Mozilla Public License Version
   - 1.1 (the "License"); you may not use this file except in compliance with
   - the License. You may obtain a copy of the License at
   - http://www.mozilla.org/MPL/
   -
   - Software distributed under the License is distributed on an "AS IS" basis,
   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
   - for the specific language governing rights and limitations under the
   - License.
   -
   - The Original Code is the Colorer Library.
   -
   - The Initial Developer of the Original Code is
   - Igor Russkih <irusskih at gmail dot com>
   - Portions created by the Initial Developer are Copyright (C) 2010
   - the Initial Developer. All Rights Reserved.
   -
   - Contributor(s): 
   -
   - Alternatively, the contents of this file may be used under the terms of
   - either the GNU General Public License Version 2 or later (the "GPL"), or
   - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
   - in which case the provisions of the GPL or the LGPL are applicable instead
   - of those above. If you wish to allow use of your version of this file only
   - under the terms of either the GPL or the LGPL, and not to allow others to
   - use your version of this file under the terms of the MPL, indicate your
   - decision by deleting the provisions above and replace them with the notice
   - and other provisions required by the LGPL or the GPL. If you do not delete
   - the provisions above, a recipient may use your version of this file under
   - the terms of any one of the MPL, the GPL or the LGPL.
   -
   - ***** END LICENSE BLOCK ***** -->

그런 다음 Common.jar를 추출하는 폴더에서 다음 명령을 실행하여 JAR 파일을 재현합니다.

jar cf common.jar *

그런 다음 원래 JAR 파일을 이것으로 대체하십시오.

다른 파일들

이제 SCSS Extension을 포함시킵니다 /plugin.xml 37 행 :

연장 = "XML, XSD, XSL, Dtd, HRC, HRD, HTML, HTM, XHTML, RHTML, ERB, YML, HAML, SASS, SCSS, CSS, ASP, ASPX, JSP, F, SVG, DBK, DURBOB, JHTML , JSPF, PHP, PHP3, PHP4, PHTML, SGM, SGML, SHTM, SHTML "

마지막으로, 라인 200-203 인치를 복제합니다 colorer/hrc/proto.hrc. 결과는 다음과 같아야합니다.

<prototype name="sass" group="inet" description="SASS">
  <location link="jar:common.jar!inet/sass.hrc"/>
  <filename>/\.(sass)$/i</filename>
</prototype>
<prototype name="scss" group="inet" description="SCSS">
  <location link="jar:common.jar!inet/scss.hrc"/>
  <filename>/\.(scss)$/i</filename>
</prototype>

이 후에 Eclipse를 다시 시작하면 .SCSS 파일에 대한 구문 강조 표시가 있어야합니다.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top