I have some Visual Basic Application (VBA) code that I need to tweak. Note: I don't need any help in the coding aspect of it; this is not a programming question.

When I opened the .vba file in Kate or Gedit, I saw that neither of them have highlighting/syntax knowledge of Visual Basic code. I understand that I cannot actually run vba code natively, but I would like to know if there exists a plugin that will run on some text editor to do basic code highlighting.

Does anyone know of a text editor or custom written plugin that I can use?

  • 1
    gedit supports VB.NET syntax out of the box. It's in view -> highlight mode -> sources – dougBTV Jun 27 '13 at 17:29
  • Ah! You're right. I missed that when I first looked, and I know Kate doesn't have it. If you put this as an answer, I'll mark it as accepted. Thanks. – Stephen Schrauger Jun 27 '13 at 17:32
  • @StephenSchrauger: gedit to write code is a very, very lousy piece of advice. – Emanuel Berg Jun 28 '13 at 1:46

gedit supports VB.NET syntax out of the box. It's in view -> highlight mode -> sources

  • 1
    Writing code in gedit is - well, not recommended to say the least. – Emanuel Berg Jun 28 '13 at 1:45
  • Why not? I use Emacs myself for everything, but I can understand why some people would prefer a more lightweight tool. Gedit does syntax highlighting, paren matching, and automatic backups, which I'd consider the top three most important features for a code editor. I would save your disapproval for programmers who use Nano, or Windows Notepad. – dodgethesteamroller Jun 28 '13 at 16:29

Vim supports Visual Basic syntax highlighting.


Apart from vim with visual basic highlighting as Evan indicated, there is also a visual basic mode for Emacs. I have not used it extensively as I seldom work with VBA.

You would have to follow the installations instruction in the file the link points to.

Emacs is not a lightweight editor like Gedit is, it is well worth learning to use something as powerful as Emacs.

  • Read this to understand why you should learn how to use a powerful editor such as Vim or Emacs: rudism.com/s/vimcreep. The article is about Vim but its points apply to Emacs as well. – user26112 Jun 27 '13 at 18:24
  • @EvanTeitelman I started with vi (actually ed) and learned Emacs much later, when I had a Sparcstation-1. For a long time I liked emacs (and its extensions) better. I never completely dropped using vi though, and with vim the usage has become about 50-50. Both are well worth learning. – Anthon Jun 27 '13 at 18:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.