You will not be able to post if you are still using Microsoft email addresses such as Hotmail etc
See here for more information viewtopic.php?f=20&t=7296
BOOKMARK THIS PAGE !
https://www.exxosforum.co.uk:8085/IP_CHECK/
You can unban yourself if needed. It also sends me reports to investigate the ban.
DO NOT USE MOBILE / CGNAT DEVICES WHERE THE IP CHANGES CONSTANTLY!
At this time, it is unfortunately not possible to whitelist users when your IP changes constantly.
You may inadvertently get banned because a previous attack may have used the IP you are now on.
So I suggest people only use fixed IP address devices until I can think of a solution for this problem!

Linux lightweight code editor with easy code folding?

This chat forum will appear to guests and bots. IE will appear on search engines etc. If you do not want your appearing publicly then please use the original chat forum.
User avatar
mrbombermillzy
Moderator
Moderator
Posts: 2284
Joined: 03 Jun 2018 19:37

Linux lightweight code editor with easy code folding?

Post by mrbombermillzy »

As some of you know, my W10 laptop has seen better days and has been semi-retired for now.

I am now using a light Linux distro on a i3-3xxx CPU as a daily driver for both web browsing and Atari code development, but really need a code editor that does 'simple' code folding.

By simple, I mean, non language dependant, or not requiring me to write a thorough script to get it working.

Ive tried CodeBrowser, TextAdept Kate and NotePadqq, with no luck. Not really looking at stuff like VSCodium, as I need a lighter editor.

I will literally resort to writing code on the Atari at this rate, as XEDIT can do this easily. Surely theres something out there? :roll:

Any help would be much appreciated. :)
User avatar
alexh
Site sponsor
Site sponsor
Posts: 1325
Joined: 17 Oct 2017 16:51
Location: Oxfordshire

Re: Linux lightweight code editor with easy code folding?

Post by alexh »

For code folding to work it has to be somewhat language sensitive.

https://www.geany.org/
Senior Principal ASIC Engineer - SystemVerilog, VHDL
Thalion Webshrine - http://thalion.atari.org
ST,STf,STfm,STe,MegaST,MegaSTe,Falcon060
A500+,A600,A4000/060,CD32,CDTV
User avatar
chronicthehedgehog
Site sponsor
Site sponsor
Posts: 383
Joined: 08 May 2022 18:11
Location: The Midlands

Re: Linux lightweight code editor with easy code folding?

Post by chronicthehedgehog »

There is only vi(m) :D

vim does code folding - though never used that feature tbh, so can't say whether it's good or not
User avatar
rubber_jonnie
Site Admin
Site Admin
Posts: 14819
Joined: 17 Aug 2017 19:40
Location: Essex

Re: Linux lightweight code editor with easy code folding?

Post by rubber_jonnie »

Visual Studio Code is available for Linux, probably worth a look.
Collector of many retro things!
800XL and 65XE both with Ultimate1MB,VBXL/XE & PokeyMax, SIDE3, SDrive Max, 2x 1010 cassette, 2x 1050 one with Happy mod, 3x 2600 Jr, 7800 and Lynx II
Approx 20 STs, including a 520 STM, 520 STFMs, 3x Mega ST, MSTE & 2x 32 Mhz boosted STEs
Plus the rest, totalling around 50 machines including a QL, 3x BBC Model B, Electron, Spectrums, ZX81 etc...
User avatar
mrbombermillzy
Moderator
Moderator
Posts: 2284
Joined: 03 Jun 2018 19:37

Re: Linux lightweight code editor with easy code folding?

Post by mrbombermillzy »

alexh wrote: 26 Sep 2023 10:52 For code folding to work it has to be somewhat language sensitive.

https://www.geany.org/
Like I said, thats a problem, as most of the editors dont cater for code folding with 68k asm. (Even enabled on plain text would be ok, I dont care for code completion/keyword highlight/etc anyway). I could set language to C/C++, but then the comment characters /* would cause errors in asm files.
rubber_jonnie wrote: 26 Sep 2023 11:11 Visual Studio Code is available for Linux, probably worth a look.
Again, VSCode/VSCodium are a bit too heavyweight/overkill for a low spec laptop. Ideally something like Notepad++ would be great.
chronicthehedgehog wrote: 26 Sep 2023 11:08 There is only vi(m) :D

vim does code folding - though never used that feature tbh, so can't say whether it's good or not
I havent tried that yet. I will have a look. Hopefully it can do 'dumb' folding out of the box rather than have the end user conform to some prerequisite code language use, or needing to code in-depth plugin scripting. :roll:

Many thanks for the input guys. :)
User avatar
sporniket
Site sponsor
Site sponsor
Posts: 1162
Joined: 26 Sep 2020 21:12
Location: France

Re: Linux lightweight code editor with easy code folding?

Post by sporniket »

Hello, I think gedit will suffice, with a little plugin https://github.com/aeischeid/gedit-folding

Installation :

Code: Select all

mkdir -p ~/.local/share/gedit/plugins
cd ~/.local/share/gedit/plugins
git clone https://github.com/aeischeid/gedit-folding
Then, start gedit, and activate the plugin : go to the "preferences" menu

Capture d’écran du 2023-09-26 14-16-41.png

In the plugins tab, enable "folding"

Capture d’écran du 2023-09-26 14-17-07.png

Now, go to a label in your source :

Capture d’écran du 2023-09-26 14-17-35.png
Type Alt-Z, and voilà...
Capture d’écran du 2023-09-26 14-18-04.png
You do not have the required permissions to view the files attached to this post.
User avatar
alexh
Site sponsor
Site sponsor
Posts: 1325
Joined: 17 Oct 2017 16:51
Location: Oxfordshire

Re: Linux lightweight code editor with easy code folding?

Post by alexh »

mrbombermillzy wrote: 26 Sep 2023 11:50 most of the editors dont cater for code folding with 68k asm. Even enabled on plain text would be ok, I dont care for code completion/keyword highlight/etc anyway
The editor needs to understand the language syntax somewhat to know where to fold. You can't code-fold plain text as where would the delimiters be? Every line?

https://www.scintilla.org/

This definitely supports Motorola 68k asm and code folding.
Senior Principal ASIC Engineer - SystemVerilog, VHDL
Thalion Webshrine - http://thalion.atari.org
ST,STf,STfm,STe,MegaST,MegaSTe,Falcon060
A500+,A600,A4000/060,CD32,CDTV
User avatar
mrbombermillzy
Moderator
Moderator
Posts: 2284
Joined: 03 Jun 2018 19:37

Re: Linux lightweight code editor with easy code folding?

Post by mrbombermillzy »

Thank you so much @sporniket for literally spoon feeding me a solution.

Unfortunately, even still, after putting the 2 files in the plugins folder, they dont appear in the Preferences>plugins box. Im running gedit v44.2.

It doesnt appear to have the same layout as your example on the plugin screen (mine is less colourful), so I maybe need to check for version differences. Stay tuned. I will try that next.

alexh wrote: 26 Sep 2023 13:40
mrbombermillzy wrote: 26 Sep 2023 11:50 most of the editors dont cater for code folding with 68k asm. Even enabled on plain text would be ok, I dont care for code completion/keyword highlight/etc anyway
The editor needs to understand the language syntax somewhat to know where to fold. You can't code-fold plain text as where would the delimiters be? Every line?
I understand that it seems like most code folding is done in this manner.
However, as an end user, I dont care how they achieve that goal. Like I said earlier, I can use an editor on the Atari that does this without the above excuse, so it shouldnt be an impossible ask, surely? (I think XEDIT uses another file to record the folding, but Im not 100% sure; thats the whole point; I want to just use it, not learn the whole makeup of the app, as I do not have the time. I dont really want to tinker with linux distros/apps, just get work done with the minimal setup fuss).
alexh wrote: 26 Sep 2023 13:40 https://www.scintilla.org/

This definitely supports Motorola 68k asm and code folding.
Great! I will see how I get on with gedit and look into this if I dont get good results with that.

Again, thanks guys. I will keep going until I hopefully find something that works.

(Otherwise, Its a case of using HATARI with TT high and I can do everything I need from there).
User avatar
sporniket
Site sponsor
Site sponsor
Posts: 1162
Joined: 26 Sep 2020 21:12
Location: France

Re: Linux lightweight code editor with easy code folding?

Post by sporniket »

mrbombermillzy wrote: 26 Sep 2023 16:18 Unfortunately, even still, after putting the 2 files in the plugins folder, they dont appear in the Preferences>plugins box. Im running gedit v44.2.
I moved the plugin files to the same location as you, and it was working as well. I have gedit v41.0.

A little peek at the file `folding.plugin`, and it turns out it require python3. Do you have python3 installed ? (if so, typing `which python3` in a terminal should output something, typically `/usr/bin/python3`.
User avatar
mrbombermillzy
Moderator
Moderator
Posts: 2284
Joined: 03 Jun 2018 19:37

Re: Linux lightweight code editor with easy code folding?

Post by mrbombermillzy »

sporniket wrote: 26 Sep 2023 16:54 Do you have python3 installed ?
Ive just checked the Synaptic File Manager and I have installed 3.11.2-1+b1. I dont have any other libraries/etc installed though, just the basic Python 3 language.

I wonder what Im missing here?

Return to “CHAT FORUM PUBLIC”

Who is online

Users browsing this forum: CCBot and 65 guests