1
似乎Geany不能很好地處理Genie編程語言中的代碼。它不提供代碼摺疊或特定的片段。如何在Geany IDE中爲Genie(.gs文件)進行代碼摺疊
如何在Geany中爲Genie編程語言進行代碼摺疊?
有沒有人有片段可以分享?
似乎Geany不能很好地處理Genie編程語言中的代碼。它不提供代碼摺疊或特定的片段。如何在Geany IDE中爲Genie(.gs文件)進行代碼摺疊
如何在Geany中爲Genie編程語言進行代碼摺疊?
有沒有人有片段可以分享?
爲了得到代碼摺疊打開(或創建)該文件:
~/.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
我只是一個學生,所以可以自由地將其更改爲你的意志。
無需添加新的配置它已經是Geanys核心發行版的一部分https://github.com/geany/geany/blob/master/data/filetypes.Genie.conf - 請升級並填寫bugreport 。 – frlan
嗨! @路易斯,我必須說這是完美的!但在評論線,(或線)?它不能正確顯示, – Zee
是的,我後來也注意到了。不知道如何解決這個問題。 –