Melodeon.net Forums

Discussions => Tunes => ABC => Topic started by: Mike Hirst on September 17, 2021, 10:22:04 AM

Title: text editors
Post by: Mike Hirst on September 17, 2021, 10:22:04 AM
Which text editors have syntax highlighting for abc notation?
Title: Re: text editors
Post by: Rick St. John on September 17, 2021, 10:59:02 AM
What platform are you using?

On Linux, vi (or vim) does ABC syntax highlighting, as does the standard KDE text editor Kate
Title: Re: text editors
Post by: Mike Hirst on September 17, 2021, 12:34:21 PM
Didn't know about vim.

I'm using Linux (debian). I'm running several different set ups. Some 32bit and others 64bit.

I have tried Kate and Gedit. Both have good support for abc editing. I wanted to try something new, preferably with the same editor on all systems.

I'm told that atom and sublime-text have abc syntax highlighting, but I was struggling to install on 32bit.

I've been looking for a definitive listing of text editors with abc syntax support, but I can't find anything, so I thought I'd look what other people are using.

Title: Re: text editors
Post by: Anahata on September 17, 2021, 02:19:54 PM
My current favourite is VS Code. Yes, it's a Microsoft product, but it's free software and it's available for Linux. Best of all, there's an ABC extension which not only does syntax highlighting (which vscode doesn't by itself) but will show rendered music notation on the right hand side of the window, updated as you type ABC in.
I'm on Debian and can confirm it works here.
It's a good programmer's editor too. I ditched Sublime text despite originally paying good money for it, and I've never looked back.

This should tell you enough about how to get it:
Quote
$ cat /etc/apt/sources.list.d/microsoft-prod.list
deb [arch=amd64,arm64,armhf] https://packages.microsoft.com/debian/10/prod buster main

Hmm... I'm on bullseye now, should probably update that...

Also don't know if 32 bit available.
Title: Re: text editors
Post by: Mike Hirst on September 17, 2021, 02:53:19 PM
My current favourite is VS Code. Yes, it's a Microsoft product, but it's free software and it's available for Linux. Best of all, there's an ABC extension which not only does syntax highlighting (which vscode doesn't by itself) but will show rendered music notation on the right hand side of the window, updated as you type ABC in.
I'm on Debian and can confirm it works here.
It's a good programmer's editor too. I ditched Sublime text despite originally paying good money for it, and I've never looked back.

This should tell you enough about how to get it:
Quote
$ cat /etc/apt/sources.list.d/microsoft-prod.list
deb [arch=amd64,arm64,armhf] https://packages.microsoft.com/debian/10/prod buster main

Hmm... I'm on bullseye now, should probably update that...

Also don't know if 32 bit available.

Thanks Anahata.

I had been wondering about VScode. The most recent version with 32bit support came out in 2019:

https://code.visualstudio.com/updates/v1_35

Install and set up worked well, but syntax highlighting requires a more recent version.

Short of writing my own highlighting definitions, I think I'm going to have to fall back on using kate or gedit.
Title: Re: text editors
Post by: Pete Dunk on September 20, 2021, 06:24:30 PM
This thread made me curious about VS Code so I downloaded and installed the 64 bit Windows version just to try it out. I’m never going to use it as the programmer’s tool it is intended to be but it’s actually a pretty nifty ABC writing tool. No frills, bells or whistles but it splits the screen down the middle with the text window on the left and the sheet music on the right. It displays a full page of music and if you open a large abc file you are able to scroll through all of the sheet music without moving the cursor in the text file. It doesn’t play midi, it doesn’t render PDFs but it is a very usable environment to create abc source files and check your work as you go. I like it and I will be using it a lot!
Title: Re: text editors
Post by: Tone Dumb Greg on September 20, 2021, 06:30:09 PM
This thread made me curious about VS Code so I downloaded and installed the 64 bit Windows version just to try it out. I’m never going to use it as the programmer’s tool it is intended to be but it’s actually a pretty nifty ABC writing tool...

Snap! I thought it was going be like Visual Basic, which I used a bit at work. It wasn't (so far as I could tell) but I like the way it lays out ABC.
Title: Re: text editors
Post by: Pete Dunk on September 20, 2021, 06:41:11 PM
Great minds think alike.
Fools seldom differ.
Take your pick!
Title: Re: text editors
Post by: Anahata on September 20, 2021, 07:13:11 PM
No frills, bells or whistles but it splits the screen down the middle with the text window on the left and the sheet music on the right. It displays a full page of music and if you open a large abc file you are able to scroll through all of the sheet music without moving the cursor in the text file. It doesn’t play midi, it doesn’t render PDFs but it is a very usable environment to create abc source files and check your work as you go. I like it and I will be using it a lot!
...and unlike some other editors that also show you the music notation as you type, it saves the ABC in the file that you specify in the place where you want it, not hiding it away in some management scheme of its own devising. (I can't remember which of the Windows ABC tools did that, but I hated it.)
Title: Re: text editors
Post by: Pete Dunk on September 20, 2021, 07:42:56 PM
I think that was ABC Navigator Anahata. I started my ABC journey using that software but very quickly changed to Explorer, it was clunky in more ways than one!
Title: Re: text editors
Post by: Roger Hare on September 21, 2021, 06:53:32 AM
This thread made me curious about VS Code so I downloaded and installed the 64 bit Windows version
just to try it out...

Moi aussi! I also installed the ABC extension. It looks interesting, but...

I habitually use EasyABC (1.3.7.7) as my 'goto' choice for manipulating ABC files. I use Notepad2
for day-to-day general purpose editing. I back this up with a 40+ year old plain-text editor for
'special' editing (which allows me to specify alternative edits in the case of failure of the primary
edit).

I'm pretty well settled into this mode of operation, but I'm open to persuasion if something comes
along which is capable of revolutionising my current approach.

Maybe some kind soul who is familiar with both EasyABC and VSCode can point up the advantages
of VSCode for me? Powerful as VSCode clearly is, I can't really see any major advantages at the
moment. As I say, I'm willing to be persuaded...

Title: Re: text editors
Post by: Anahata on September 21, 2021, 09:42:30 AM
I'm not familiar with EasyABC. Judging by the screen shot on its web site, and seeing it's multi-platform, it looks quite promising.
Title: Re: text editors
Post by: Roger Hare on September 21, 2021, 10:32:15 AM
I'm not familiar with EasyABC. Judging by the screen shot on its web site, and seeing it's multi-platform, it looks quite promising.
Yes, when I started this music lark, I looked at EasyABC, ABCEdit, ABCMus and ABCEditor before
going for EasyABC. Later, I also looked at alternative systems to ABC - MuseScore and lilypond.

It was a fairly easy choice to make - and to stick with, but VSCode looks like it might be a possible
fall-back option or second string to my bow....
Title: Re: text editors
Post by: Andrew Wigglesworth on September 22, 2021, 11:21:37 PM
Anyone who knows me would guess what I use ... GNU Emacs.   8)

Out of curiosity I just had a look and there is an abc-mode in the package repositories these days, which apparently generates midi and postscript outputs etc.

I don't use that (well, I might try it to see). I picked up an abc-mode a number of years ago that sort of worked. I hacked on it a bit and it now has a nice syntax highlighting etc, and I have commands to send a single entry (or a whole file if I like) to a bash script I have for playing abc files (it uses things like abc2midi and timidity). It has a number of other functions that I occasionally use like outputting sheet music in PDF files.

Abc files are just text, so searching for tunes, editing them etc are all pretty straightforward just using normal Emacs editing functions.

PS. I use Debian GNU/Linux
Title: Re: text editors
Post by: Roger Hare on September 23, 2021, 05:29:46 AM
Anyone who knows me would guess what I use ... GNU Emacs.   8)

[1] Out of curiosity I just had a look and there is an abc-mode in the package repositories these days, which apparently generates midi and postscript outputs etc.

I don't use that (well, I might try it to see). [2] I picked up an abc-mode a number of years ago that sort of worked....

[1] I wonder if you could highlight the location of the version of emacs with the ABC extension which you 'don't use'? I'm not sure I'm seeing it when I do a search?

[2] Are you talking about the abc-mode.el extension by Matthew K Junker? Looks interesting but I don't think I could use it as I don't have a compiler...

I'm a Windows user - I wonder if this would all work an a Windows machine...

Ta.


Title: Re: text editors
Post by: Anahata on September 23, 2021, 09:17:41 AM
I'm sure there are versions of EMACS for Windows, and as the extensions are usually written in LISP they'll run anywhere...

Beware though. Once you get into EMACS, you'll become addicted and you'll be using it for everything from reading your mail to feeding the cat.
Title: Re: text editors
Post by: Andrew Wigglesworth on September 23, 2021, 09:48:52 AM
Anyone who knows me would guess what I use ... GNU Emacs.   8)

[1] Out of curiosity I just had a look and there is an abc-mode in the package repositories these days, which apparently generates midi and postscript outputs etc.

I don't use that (well, I might try it to see). [2] I picked up an abc-mode a number of years ago that sort of worked....

[1] I wonder if you could highlight the location of the version of emacs with the ABC extension which you 'don't use'? I'm not sure I'm seeing it when I do a search?

[2] Are you talking about the abc-mode.el extension by Matthew K Junker? Looks interesting but I don't think I could use it as I don't have a compiler...

I'm a Windows user - I wonder if this would all work an a Windows machine...

Ta.

Looking at this, it's curious what you discover.

I'm using GNU Emacs 27.1 on Debian. I did a package list ( M-x list-packages ) and it's there as abc-mode, though it's in the MELPA package repositories. These are not standard on Emacs and need to be added.

https://melpa.org

Yes, it's by Matthew K Junker It seems that I'm a bit behind the times. My version of abc-mode is from 2002, and the latest is 2021. I installed it before there were inbuilt package repos, and then hacked to make it work in the way I wanted. I suppose I should try the one at MELPA, but I'm not having any actual problems with what I've got.

btw. the abc-mode on my Emacs is not compiled. You don't need to compile Emacs Lisp to make it work, it's just that with larger packages, or ones doing certain tasks, compiled code may run more quickly. I had the whole of org-mode running for years without ever compiling it.

As for Windows, sorry, I have no real idea. I know that my Emacs makes all sorts of calls onto software in the general GNU system, I don't really know how that works on a Windows system.
Title: Re: text editors
Post by: Andrew Wigglesworth on September 23, 2021, 10:10:32 AM
I'm sure there are versions of EMACS for Windows, and as the extensions are usually written in LISP they'll run anywhere...

Beware though. Once you get into EMACS, you'll become addicted and you'll be using it for everything from reading your mail to feeding the cat.

I object, I don't use it for feeding the cat ... though that may only be because I don't have a cat. There is famously a mode for operating coffee machines.

Yes, I fell down the GNU Emacs rabbit hole many years ago. And a nice warm, dry, pleasant rabbit hole it is too.
Title: Re: text editors
Post by: Roger Hare on September 23, 2021, 10:47:30 AM
Thank you for all that extra information folks.

I think it's looking a little iffy, as far as Windows is concerned?

I worked on massive Unix systems for the last 10 years before I retired. From what I
remember, not many folks used Emacs. I certainly never did, so I'm putting my toe
into seriously shark-infested waters here. Still, I'll give it a go - it's worth a try. Thanks.
Title: Re: text editors
Post by: Anahata on September 23, 2021, 10:56:51 AM
Quote
There is famously a mode for operating coffee machines.
HTCPCP (http://www.faqs.org/rfcs/rfc2324.html) compliant, I presume?
Title: Re: text editors
Post by: Chris Ryall on September 23, 2021, 01:15:21 PM
I tried Sublime Text for my text editing. It’s an absolute pleasure to use. Nag-ware, but after 6 weeks I took the plunge and paid $90.

ie you can try it … for as long as you want. You can programme it to recognise … anything! Bit of a learning curve, but once you’ve found the xml configuration files, just change them using sublime text (though nothing is quite as self contained as Lisp)? 😉

It might be overkill if only used for ABC, however?
SimplePortal 2.3.5 © 2008-2012, SimplePortal