Major mode for emacs
Major mode for emacs
Anybody know where I can find one for freebasic? Thx ..
Re: Major mode for emacs
I thought you'd never ask!
I have written one for myself, and have been slowly tweaking it over the years. It is a bit messy, and it still has a couple bugs. It does syntax highlighting, indentation, begin/end of defun, comments, and a half-working lookup in manual key. But it doesn't highlight all keywords because I like to use certain keywords like 'data' as identifiers.
I need a little time to clean up the code and remove the parts specific to me, but will do so and post it for you. Hopefully tonight. I've always been meaning to do so eventually.
Separately I also have a deadgrep-based function to jump to the definition of a function/sub/variable/constant/macro, but it's quite a hack. I guess I should include that?
There is also an emacs mode for Visual BASIC but I immediately gave up on it when I tried it years ago.
I have written one for myself, and have been slowly tweaking it over the years. It is a bit messy, and it still has a couple bugs. It does syntax highlighting, indentation, begin/end of defun, comments, and a half-working lookup in manual key. But it doesn't highlight all keywords because I like to use certain keywords like 'data' as identifiers.
I need a little time to clean up the code and remove the parts specific to me, but will do so and post it for you. Hopefully tonight. I've always been meaning to do so eventually.
Separately I also have a deadgrep-based function to jump to the definition of a function/sub/variable/constant/macro, but it's quite a hack. I guess I should include that?
There is also an emacs mode for Visual BASIC but I immediately gave up on it when I tried it years ago.
Re: Major mode for emacs
@TeeEmCee Much obliged - I'm sure! I'm just test-driving freeBasic at the moment though. I'd hate for you to go through all that trouble until I'm sure that I'll stick with it. :?
Re: Major mode for emacs
Alright, here you go:
https://github.com/rversteegen/fb-mode
No worries if you never try it. I had a bad habit of not finishing things, and if I do finish them, not posting them. This was the impetus I needed to finally do something I've been meaning to for years. Aside from cleaning up the code, I also fixed some bugs that have been annoying me. I rewrote half of the indentation code.
https://github.com/rversteegen/fb-mode
No worries if you never try it. I had a bad habit of not finishing things, and if I do finish them, not posting them. This was the impetus I needed to finally do something I've been meaning to for years. Aside from cleaning up the code, I also fixed some bugs that have been annoying me. I rewrote half of the indentation code.
Re: Major mode for emacs
I'm much obliged TeeEmCee!! Thx a bunch! It'll make learning a new language feel more comfortable doing so in a familiar setting!
[sidebar] Here in Western Canada were heading in Fall with -30C coming up - maybe. You guys are just coming out of winter I suppose! The Commonwealth sure is spread out - or was! LOL
Thanks again!!
[sidebar] Here in Western Canada were heading in Fall with -30C coming up - maybe. You guys are just coming out of winter I suppose! The Commonwealth sure is spread out - or was! LOL
Thanks again!!
Re: Major mode for emacs
Immediate feedback is very nice to have... and also when programming ;). It certainly makes leaning a language easier when you can see whether you have the syntax right. This mode does syntax highlighting of variable/function definitions by parsing, not just keywords, though FB has very quirky syntax with lots of edge cases. And as I said there are a couple keywords it doesn't highlight, nor does it highlight builtin functions.
I'll post a thread in the Projects forum and post any updates there.
Yikes, that's severe. You might be surprised to learn that because of the oceanic climate here, Spring is considered to start on Sept 1st, not Sept 23rd. Temperatures already often reaching 20's. But it's been a really wet Spring so far. Was a very mild winter with not a single frost :)
I'll post a thread in the Projects forum and post any updates there.
Yikes, that's severe. You might be surprised to learn that because of the oceanic climate here, Spring is considered to start on Sept 1st, not Sept 23rd. Temperatures already often reaching 20's. But it's been a really wet Spring so far. Was a very mild winter with not a single frost :)
Re: Major mode for emacs
That would be swell!TeeEmCee wrote:I'll post a thread in the Projects forum and post any updates there.
I keep wondering WHY I didn't moved to your neck-of-the-woods when my buddy did back in the early '70s. :/ Thanks again!!Yikes, that's severe. You might be surprised to learn that because of the oceanic climate here, Spring is considered to start on Sept 1st, not Sept 23rd. Temperatures already often reaching 20's. But it's been a really wet Spring so far. Was a very mild winter with not a single frost :)
Re: Major mode for emacs
I posted the thread.
Back in the early 70's my father was deciding which sparsely populated country to emigrate to from the Netherlands. He rejected Australia because it was too hot and Canada because it was too cold :)
Back in the early 70's my father was deciding which sparsely populated country to emigrate to from the Netherlands. He rejected Australia because it was too hot and Canada because it was too cold :)
Re: Major mode for emacs
Smart fellow - your father was!
Got your freebasic major mode on my Linux box. Haven't messed with it yet. Maybe this week.
Got your freebasic major mode on my Linux box. Haven't messed with it yet. Maybe this week.