私は仕事でEPICを使用し、最近Komodo IDEを試し始めました。 しかし、システム上の軽量の「毎日」エディターとして、
mooeditがインストールされています。 すべてが完璧というわけではありませんが、いくつかの点はねじれている可能性があります。
まず、配色を選択します。 それらはすべてGtk-shnyhから取得されているため、ここに移動
して選択します。 なんらかの理由で、私は白い背景を消化せず、青色で止めます。 そして、私たちはそれを味わうために仕上げ、真夜中の司令官、FAR-ovsky Colorer、そして正直なところ、Borlandsの時代のTurbo Visionのような平均的なものを得ました。 すぐに目を引くのは、ブラケットに別の色がないことです。 これは
perl.langの def:special-constantのために修正し
ます (他の言語では、おそらく同様に、
def:special-constantの使用を考慮に入れています)。 ファイルを
〜/ .local / share / medit-1 / language-specs /にコピーして追加します:
<styles> <style id="special-constant" _name="Brackets" map-to="def:special-constant"/>
<definitions> <context id="perl" class="no-spell-check"> <include> <context ref="special-constant"/>
<define-regex id="special-constant" extended="true"> \( | \) | \[ | \] | \{ | \} </define-regex> <context id="special-constant" style-ref="special-constant"> <match>\%{special-constant}</match> </context>
したがって、ファイル
〜/ .local / share / medit-1 / language-specs / our-style.xmlで :
<style name="perl:special-constant" foreground="#66FFFF"/>
結果:

次に、構文チェックを追加します。

何かが間違っています...エラーのある行ジャンプが十分ではありません。

このため、出力の行は
file_name:line_number [:position]の形式である必要があります。 位置は利用できませんが、行番号で問題を解決できます。
〜/ bin /に 、次のコードを
含むスクリプトを入れます。
perl -cの代わりにユーティリティとして記述します。 エラーのある行をクリックすると、エディターウィンドウの適切な場所に移動します。

次のステップは、
perltidyを使用してソースのフォーマットを構成すること
です 。 ここではそれほど単純ではありません。 実際、構文エラーがある場合、エディターウィンドウのソースは単純に上書きされます。 これを回避するには、まずテストを実行してからフォーマットします。 Luaではスクリプトを使用します。これは、必要な場合にのみ、エディターウィンドウに結果を無条件に表示できるようにするためです。

filename = doc.get_filename() codefile = os.tmpname() rc = os.execute(string.format("/usr/bin/perl -c \"%s\" > \"%s\" 2>&1",filename,codefile)) if rc == 0 then tidyfile = os.tmpname() os.execute(string.format("/usr/bin/perltidy -nsak=\"if elsif unless for while\" -pt=0 -i=4 -bl -vt=2 -vtc=2 -boc -st \"%s\" > \"%s\"",filename,tidyfile)) out = io.open(tidyfile,"r") doc.select_all() doc.replace_selected_text(out:read("*a")) doc.save() os.remove(tidyfile) else out = io.open(codefile,"r") moo.error_dialog(string.format("Run syntax check!\n\n%s",out:read("*a"))) end os.remove(codefile)
この方法には1つの欠点があります。出力ウィンドウを取得できないため、構文エラーの場合はダイアログを表示する必要があります。 Luaの代わりに同様のPythonスクリプトを使用してもあまり役に立ちません。出力用のオブジェクトを取得できますが、既に存在する場合のみ、新しいオブジェクトを作成することはできません。 mooeditの作者はこれについて既に通知されており、彼は考えることを約束しました:)
さて、これらのユーティリティはすべて別々のボタンに掛けます。


同様に、出力付きのスクリプト起動をエディターの通知領域(ここではすべてが簡単です)、外部デバッガー(ただし、これらは
個別の涙、個別の会話)、およびその他に追加できます。