B.A.S.I.C. I encountered a few thousand lines of code from the 80's I need to edit, and would like to save a couple hours it may take me to roll my own VIM syntax defs file.
Asked
Active
Viewed 243 times
-2
-
Google "basic.vim". You might also want to specify a dialect of BASIC... – nneonneo Sep 27 '12 at 05:38
-
@nneonneo good point, thanks. – MountainMan Sep 27 '12 at 05:44
-
1BTW: It's _syntax definition_, not _colorscheme_. The latter is a mapping of syntax elements to colors, and this is a global setting in Vim. – Ingo Karkat Sep 27 '12 at 06:53
2 Answers
2
Vim 7.3 ships with the syntax file referenced by nneonneo, and automatically detects *.bas
files as filetype=basic
. You may simply have to upgrade to the latest Vim version (or tweak the filetype detection).

Ingo Karkat
- 167,457
- 16
- 250
- 324
-
@ Ingo Karkat Hmmm, interesting. There it was, in vim/vim73/syntax. Thing is, the code itself was handed down in .txt files, so yeah, that was I'd guess why vim was not matching any filetype and the colours were not being applied. Cheers. – MountainMan Sep 27 '12 at 15:43
1
VIM ships with basic.vim
now. This has been updated in 2011.
https://github.com/vim/vim/blob/d07969093a9b3051511c478d71c36de6fc33c0d6/runtime/syntax/basic.vim
-
2I don't usually do "link-only" answers, but in this case there's literally nothing else I could add (except maybe the word "Yes"). – nneonneo Sep 27 '12 at 05:39
-
Yeah, probably true. Was just scanning the review queue and didn't really read. – Dan Sep 27 '12 at 05:40
-
That is awesome, thank so much! I can adapt that and tune it right up. And I spent an hour looking at about 30 S.O. questions none of which addressed this admittedly narrow subject, and went through 2 screens of google without encountering that. Cheers! – MountainMan Sep 27 '12 at 05:49