Geany は Genie プログラミング言語のコードをうまく扱えないようです。コードの折りたたみや特定のスニペットは提供しません。
Genie プログラミング言語の Geany でコードを折りたたむにはどうすればよいですか?
誰かが共有するスニペットを持っていますか?
Geany は Genie プログラミング言語のコードをうまく扱えないようです。コードの折りたたみや特定のスニペットは提供しません。
Genie プログラミング言語の Geany でコードを折りたたむにはどうすればよいですか?
誰かが共有するスニペットを持っていますか?
コードを折りたたんでファイルを開く (または作成する) には、次のようにします。
~/.config/geany/filedefs/filetypes.Genie.config
セクション [lexer_properties] を次のように追加または編集します。
[settings]
# Vala uses the C lexer
lexer_filetype=Python
tag_parser=Python
スニペットについては、Genie のチュートリアルに基づくスニペットを次に示します。メニューから [ツール] > [構成ファイル] > [snippets.conf] に移動して、以下を追加するだけです。
[Genie]
if=if %cursor%a > 0\n\t%cursor%
ifdo=if %cursor%a > 0 do %cursor%
else=else if %cursor% is %cursor%\n\t%cursor%
for=for var %cursor%i = 1 to 10\n\t
fordo=for %cursor%s in %cursor%args do %cursor%print s
whiledo=while %cursor% do %cursor%
while=while %cursor%\n\t%cursor%
do=%cursor%count:int = 1\ndo\n\t%cursor%print "%i", count\n\tcount++\nwhile %cursor%count <= 10
case=case %cursor%a\n\twhen %cursor%0,1,2\n\t\t%cursor%print "a is less than 3"\n\twhen %cursor%3 \n\t\t%cursor%print "a is 3"\n\tdefault\n\t\t%cursor%print "a is greater then 3"
try=try%block%\ncatch (%cursor%)%block_cursor%
def=def %cursor%(%cursor%a:%cursor%string):%cursor%Type\n\t%cursor%
class=class %cursor%Foo:%cursor%Object\n\t%cursor%i:int\n\t%cursor%init\n\t\t%cursor%print "something"\n\tfinal\n\t\t%cursor%print "finalizing"\n\tconstruct( %cursor%:%cursor% )\n\t\t%cursor%a=b
array=%cursor%tokens : array of string = {%cursor%"This", "Is", "Genie"}
list=var %cursor%l = new list of string\n%cursor%l.add()
dictstrg=var %cursor%d = new dict of string,string
dictint=var %cursor%d = new dict of string,int
try=try\n\t%cursor%fn("home/jamie/test")\nexcept %cursor%ex : %cursor%IOError\n\t%cursor%print "Error: %s", ex.message
私はただの学習者なので、自由に変更してください。