a better editor?

Archives Forums/Linux Discussion/a better editor?

Captain Wicker (crazy hillbilly)(Posted 2012) [#1]
is there any other editor or ide available for linux at the moment? Perhaps with a more complete syntax highlighting? I have already tried the MaxIDE CE but is there anything else that can be used? Something like BLIde would really be useful.


Derron(Posted 2012) [#2]
geany

place into :
/home/YOURNAME/.config/geany/filedefs

filetypes.Blitzmax.conf (case may differ)
format_code('
#change /home/USERNAME/PATH/ to correct values

# For complete documentation of this file, please see Geany's main documentation

[styling]
# foreground;background;bold;italic
default=0x000000;0xffffff;false;false;
comment=0x808080;0xffffff;false;true;
commentrem=0x808080;0xffffff;false;false;
number=0x007f00;0xffffff;false;false;
word=0x00007f;0xffffff;true;false;
string=0xff901e;0xffffff;false;false;
preprocessor=0x007f7f;0xffffff;false;false;
operator=0x301010;0xffffff;false;false;
identifier=0x000000;0xffffff;false;false;
date=0x1a6500;0xffffff;false;false;
stringeol=0x000000;0xe0c0e0;false;false;
word2=0x007f7f;0xffffff;true;false;
word3=0x991111;0xffffff;false;false;
word4=0x0000d0;0xffffff;false;false;
constant=0x007f7f;0xffffff;false;false;
# asm is still unused
asm=0x105090;0xffffff;false;false;
label=0x007f7f;0xffffff;false;false;
error=0xd00000;0xffeeee;false;false;
hexnumber=0x007f00;0xffffff;false;false;
binnumber=0x007f00;0xffffff;false;false;
primary=0x007f00;0xffffff;false;false;
brace_good=0xff0000;0xFFFFFF;true;false
folding_style=2;2;

keyword=0xf0007f;;true;false
# usually type keywords and library type names
keyword2=0x9911f1;;true;false
# user type names
type=0x0000d0;;true;false
# user function names
function=0x000080
extra=0x404080


[keywords]
# all items must be in one line
#secondary=method function drawimage
user1=abs abstract and appargs appdir appfile apptitle asc as assert async bool break byte case cast catch char chr class const construct continue date datetime debuglog debugstop decimal dedent def default delay delegate delete dict div do double downto dynamic else elseif end endextern endfunction ensures enum errordomain event except exception extern false final finally float for next foreach get hash identifier if then endif implements implements in init inline int int16 int32 int64 int8 interface internal is isa list lock long max min namespace namespace new not null object of or otherwise out override owned params pass print private prop protected public raise raises readonly ref requires return sbyte set short single sizeof size_t ssize_t static string struct super to true try typeof uint uint32 uint64 uint8 ulong unichar unit16 unless unowned uses uses ushort var virtual void volatile weak when while wend writeonly yield elseif repeat until
user2=method function endfunction endmethod end type extends import include const local eachin field self global select endselect
#primary=string

secondary=acos asin atan2 atan activategadget activatewindow activegadget addgadgetitem addhook addtextareatext addtreeviewnode allocchannel allochookid allocusereventid allocuserid appsuspended appterminate arraytypeid atomicadd atomicswap audiodriverexists audiodrivers autoimageflags automidhandle bankbuf bankcapacity banksize bigendianstream bin bindsocket broadcastcondvar buttonstate bytetypeid canvasgraphics casedfilename ceil changedir channelplaying checkmenu cleargadgetitems clearlanguagetokens clearlist clearmap clearpixels cleartreeview clientheight clientwidth closecondvar closedir closefile closegnethost closegnetobject closegraphics closemutex closesemaphore closesocket closestream cls collapsetreeviewnode collideimage colliderect compareandswap confirm connectsocket convertpixmap copybank copybytes copydir copyfile copymap copypixmap copystream cos cosh countgadgetitems countgraphicsmodes countlist counttreeviewnodes createaudiosample createbank createbankstream createbutton createcanvas createcombobox createcondvar createdir createevent createfile creategnethost creategnetmessage creategnetobject creategraphics createhtmlview createhyperlink createimage createlabel createlanguage createlist createlistbox createmap createmenu createmutex createpanel createpixmap createprogbar createramstream createscrollpanel createsemaphore createslider createsocketstream createsplitter createstatic createstatic createstatic createstaticaudiosample createstaticbank createstaticpixmap createtcpsocket createtabber createtextarea createtextfield createthread createthreaddata createtimer createtoolbar createtreeview createudpsocket createwindow createwithcstream cuesound current currentdate currentdir currentevent currentthread currenttime d3d7max2ddriver d3d9max2ddriver defaultgraphicsflags definelanguagetoken deletedir deletefile delocalizegadget deselectgadgetitem desktop desktopdepth desktopheight desktophertz desktopwidth detachthread disablegadget disablegadgetitem disablemenu dottedip doubletypeid drawimage drawimagerect drawline drawoval drawpixmap drawpoly drawrect drawsubimagerect drawtext emitevent emiteventhook enablegadget enablegadgetitem enablemenu enableopenalaudio endgraphics enumtypes eof eventdata eventextra eventid eventmods eventsource eventsourcehandle eventtext eventx eventy exp expandtreeviewnode extractdir extractext filemode filesize filetime filetype fitscrollpanelclient flip fliphook floattypeid floor flushjoy flushkeys flushmouse flushstream fontname fontsize fontstyle forname forobject formattextareatext freegadget freemenu freetreeviewnode fromarray gladjusttexsize gldrawpixmap gldrawrect gldrawtext glgraphics glgraphicsdriver glmax2ddriver glsharecontexts gltexfrompixmap gnetconnect gnetlisten gnetmessageobject gnetmessages gnetobjectlocal gnetobjectremote gnetobjectstate gnetobjects gnetsync gadgetclass gadgetcopy gadgetcut gadgetdisabled gadgetextra gadgetgroup gadgetheight gadgethidden gadgetitemextra gadgetitemflags gadgetitemicon gadgetitemtext gadgetitemtooltip gadgetlocalized gadgetpaste gadgetprint gadgetsensitivity gadgettext gadgettooltip gadgetwidth gadgetx gadgety getalpha getblend getchar getclscolor getcolor getgnetfloat getgnetint getgnetstring getgnettarget getgraphicsdriver getgraphicsmode gethandle getimagefont getlinewidth getmaskcolor getorigin getrotation getscale getthreaddatavalue getviewport grabimage grabpixmap graphics graphicsdepth graphicsflags graphicsheight graphicshertz graphicsmodeexists graphicsmodes graphicswidth hex hidegadget hidemouse hostip hostips hostname htmlviewback htmlviewcurrenturl htmlviewforward htmlviewgo htmlviewrun htmlviewstatus imageheight imagewidth imagescollide imagescollide2 input insertgadgetitem inserttreeviewnode instr inttypeid isinf isnan joyaxiscaps joybuttoncaps joycount joydown joyhat joyhit joyname joypitch joyr joyroll joyu joyv joywheel joyx joyy joyyaw joyz keydown keyhit lset languagename languagetokendefinition left listaddfirst listaddlast listcontains listfindlink listfromarray listisempty listremove listtoarray littleendianstream loadanimimage loadaudiosample loadbank loadbytearray loaddir loadguifont loadiconstrip loadimage loadimagefont loadlanguage loadpixmap loadpixmapjpeg loadpixmappng loadsound loadstring loadtext localizationlanguage localizationmode localizegadget localizestring lockbank lockimage lockmutex locktextarea log10 log longbin longhex longtypeid lookupguicolor lookupguifont lower luaregisterobject main mainthread mapcontains mapinsert mapisempty mapkeys mapremove mapvalueforkey mapvalues maskpixmap maximizewindow menuchecked menuenabled menutext mid midhandleimage minimizewindow modifygadgetitem modifytreeviewnode mousedown mousehit mousex mousexspeed mousey mouseyspeed mousez mousezspeed movemouse movevirtualmouse nextfile notify objecttypeid openalinstalled openfile openfile openstream openurl pausechannel peekbyte peekdouble peekevent peekfloat peekint peeklong peekshort pixmapformat pixmapfromiconstrip pixmapheight pixmappitch pixmappixelptr pixmapwidth pixmapwindow playsound plot pokebyte pokedouble pokefloat pokeint pokelong pokeshort pollevent pollsystem popupwindowmenu postevent postsemaphore print proceed querygadget rset rand readbank readbyte readdir readdouble readfile readfloat readint readline readlong readpixel readshort readstream readstring realpath redrawgadget removegadgetcolor removegadgetitem removehook removehotkey removelanguagetoken removelink renamefile replace requestcolor requestdir requestfile requestfont requestedblue requestedgreen requestedred resetcollisions resizebank resizepixmap restorewindow resumechannel reverselist right rnd rnddouble rndfloat rndseed runhooks savebank savebytearray savelanguage savepixmapjpeg savepixmappng savestring savetext scrollpanelclient scrollpanelx scrollpanely scrollscrollpanel seedrnd seekstream selectgadgetitem selecttextareatext selecttreeviewnode selectedgadgetitem selectedgadgetitems selectedtreeviewnode sendgnetmessage setalpha setaudiodriver setblend setbuttonstate setchanneldepth setchannelpan setchannelrate setchannelvolume setclscolor setcolor setfilemode setgnetfloat setgnetint setgnetstring setgnettarget setgadgetalpha setgadgetcolor setgadgetextra setgadgetfilter setgadgetfont setgadgethotkey setgadgeticonstrip setgadgetlayout setgadgetpixmap setgadgetsensitivity setgadgetshape setgadgettext setgadgettextcolor setgadgettooltip setgraphics setgraphicsdriver sethandle sethotkeyevent setimagefont setimagehandle setlanguagename setlinewidth setlocalizationlanguage setlocalizationmode setmargins setmaskcolor setmaxwindowsize setmenutext setminwindowsize setorigin setpanelcolor setpanelpixmap setpointer setrotation setscale setsliderrange setslidervalue setsplitterbehavior setsplitterorientation setsplitterposition setstatustext settextareacolor settextareafont settextareatabs settextareatext setthreaddatavalue settoolbartips settransform setviewport setvirtualresolution shorttypeid showgadget showmouse signalcondvar sin sinh slidervalue socketaccept socketconnected socketlisten socketlocalip socketlocalport socketreadavail socketremoteip socketremoteport socketstreamsocket sortlist splitterbehavior splitterorientation splitterpanel splitterposition sqr standardiostream stopchannel stoptimer streampos streamsize stringtypeid stripall stripdir stripext stripslash swaplists taudiosample taudiosampleloader tbank tbankstream tcstream tchannel tcondvar tevent tfield tio timage tlink tlist tlistenum tluaclass tluaobject tmember tmethod tmutex tpixmap tpixmaploader tsemaphore tsound tstream tstreamexception tstreamfactory tstreamreadexception tstreamwrapper tstreamwriteexception tthread tthreaddata ttypeid tan tanh textareachar textareacharx textareachary textareacursor textarealen textarealine textareasellen textareatext textfieldtext textheight textwidth threadrunning tileimage timerticks togglegadgetitem treeviewroot trim trylockmutex uncheckmenu unlockbank unlockimage unlockmutex unlocktextarea updateprogbar updatewindowmenu upper virtualmousex virtualmousexspeed virtualmousey virtualmouseyspeed virtualresolutionheight virtualresolutionwidth waitchar waitcondvar waitevent waitkey waitmouse waitsemaphore waitsystem waitthread waittimer windowmaximized windowmenu windowminimized windowstatustext writebank writebyte writedouble writefile writefloat writeint writeline writelong writepixel writeshort writestream writestring xflippixmap yflippixmap albuffer3f albuffer3i albufferdata albufferf albufferfv albufferi albufferiv aldeletebuffers aldeletesources aldisable aldistancemodel aldopplerfactor aldopplervelocity alenable algenbuffers algensources algetboolean algetbooleanv algetbuffer3f algetbuffer3i algetbufferf algetbufferfv algetbufferi algetbufferiv algetdouble algetdoublev algetenumvalue algeterror algetfloat algetfloatv algetinteger algetintegerv algetlistener3f algetlistener3i algetlistenerf algetlistenerfv algetlisteneri algetlisteneriv algetprocaddress algetsource3f algetsource3i algetsourcef algetsourcefv algetsourcei algetsourceiv algetstring alisbuffer alisenabled alisextensionpresent alissource allistener3f allistener3i allistenerf allistenerfv allisteneri allisteneriv alsource3f alsource3i alsourcepause alsourcepausev alsourceplay alsourceplayv alsourcequeuebuffers alsourcerewind alsourcerewindv alsourcestop alsourcestopv alsourceunqueuebuffers alsourcef alsourcefv alsourcei alsourceiv alspeedofsound alccaptureclosedevice alccaptureopendevice alccapturesamples alccapturestart alccapturestop alcclosedevice alccreatecontext alcdestroycontext alcgetcontextsdevice alcgetcurrentcontext alcgetenumvalue alcgeterror alcgetintegerv alcgetprocaddress alcgetstring alcisextensionpresent alcmakecontextcurrent alcopendevice alcprocesscontext alcsuspendcontext compress compress2 lual_addchar lual_addlstring lual_addsize lual_addstring lual_addvalue lual_argcheck lual_argerror lual_buffinit lual_callmeta lual_checkany lual_checkint lual_checkinteger lual_checklong lual_checklstring lual_checknumber lual_checkstack lual_checkstring lual_checktype lual_checkudata lual_dofile lual_dostring lual_getmetafield lual_getmetatable lual_gsub lual_loadbuffer lual_loadfile lual_loadstring lual_newmetatable lual_newstate lual_openlibs lual_optint lual_optinteger lual_optlong lual_optlstring lual_optnumber lual_optstring lual_prepbuffer lual_pushresult lual_ref lual_register lual_typename lual_typerror lual_unref lual_where lua_atpanic lua_call lua_checkstack lua_close lua_concat lua_cpcall lua_createtable lua_dump lua_equal lua_error lua_gc lua_getallocf lua_getfenv lua_getfield lua_getglobal lua_gethook lua_gethookcount lua_gethookmask lua_getinfo lua_getlocal lua_getmetatable lua_getstack lua_gettable lua_gettop lua_getupvalue lua_insert lua_isboolean lua_iscfunction lua_isfunction lua_islightuserdata lua_isnil lua_isnone lua_isnoneornil lua_isnumber lua_isstring lua_istable lua_isthread lua_isuserdata lua_lessthan lua_load lua_newstate lua_newtable lua_newthread lua_newuserdata lua_next lua_objlen lua_pcall lua_pop lua_pushboolean lua_pushcclosure lua_pushcfunction lua_pushinteger lua_pushlightuserdata lua_pushlstring lua_pushnil lua_pushnumber lua_pushstring lua_pushthread lua_pushvalue lua_rawequal lua_rawget lua_rawgeti lua_rawset lua_rawseti lua_register lua_remove lua_replace lua_resume lua_setallocf lua_setfenv lua_setfield lua_setglobal lua_sethook lua_setlocal lua_setmetatable lua_settable lua_settop lua_setupvalue lua_status lua_toboolean lua_tocfunction lua_tointeger lua_tolstring lua_tonumber lua_topointer lua_tostring lua_tothread lua_touserdata lua_type lua_typename lua_xmove lua_yield uncompress


[settings]
# Vala uses the C lexer
lexer_filetype=FreeBasic
tag_parser=basic

# default extension used when saving files
extension=bmx

# the following characters are these which a "word" can contains, see documentation
#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789

# this is an alternative way, so multiline comments are used
comment_single='
comment_open=rem
comment_close=endrem


[build-menu]
FT_00_LB=Compile & _Run
FT_00_CM=./bmk makeapp -x -r "%d/%f"
FT_00_WD=/home/USERNAME/PATH/BlitzMax/bin
FT_01_LB=Compile & Run (_DEBUG)
FT_01_CM=./bmk makeapp -x -d "%d/%f"
FT_01_WD=/home/USERNAME/PATH/BlitzMax/bin
FT_02_LB=Compile & Run (_Threaded)
FT_02_CM=./bmk makeapp -x -r -h "%d/%f"
FT_02_WD=/home/USERNAME/PATH/BlitzMax/bin
FT_03_LB=Compile & Run (Threaded DEBUG)
FT_03_CM=./bmk makeapp -x -d -h "%d/%f"
FT_03_WD=/home/USERNAME/PATH/BlitzMax/bin

error_regex=\\[(.+);([0-9]+);[0-9]+

[build_settings]
compiler="/home/USERNAME/PATH/BlitzMax/bin/bmk" makeapp -d -o "%e.debug" "%f"
linker="/home/USERNAME/PATH/BlitzMax/bin/bmk" makeapp -r -o "%e" "%f"
run_cmd="./%e"
')


Rest is described in the geany-docs.

PS: in the German forum you will find a modified geany-source (to provide better rem-endrem-block-recognition).

Feel free to add Keyword-recognition to geany.


bye
Ron


Yasha(Posted 2012) [#3]
Wow! I love Geany! That's very cool.


Derron(Posted 2012) [#4]
in case you want to modify geany itself (more advanced things than syntax highlighting involve the support in the geany core):

geanysrc/scintilla/lexers/LexBasic.cxx

There you can add further things like 'bbdoc: etc.
Feel free to also modify the catalogue-files (i don't use it ... so no details here) or parts to automate the recognition of custom types.

What you get with geany: unintelligent autocomplete (it autocompletes words you used in the opened documents, so not "appwide" by default),
integrated compiler output, with a bit of work maybe inclusion of gdb-debugging functions (for debugging purposes I compile within maxIDE ... which looks ugly in GTK-themes).


If you don't like geany... just install wxMax(wxWidgets) and use wxScintilla (and the LexBasic.cxx of geany/your mods).
An simple editor with (geany like) autocomplete, code folding, easy compilation shortcuts/icons, output/errorlogs aka pipes,... is written in one day (already done it but library-updates make it not as easy to keep it runnable - and wxMax still has some mindbraking errors coming along).

bye
Ron