10

How to open BAT (windows batch) file in Eclipse? When I am doing Open File... the file runs, not opens. How to open it in editor?

Dragging file on Eclipse also runs it.

Suzan Cioc
  • 29,281
  • 63
  • 213
  • 385
  • right-click - open with - Text Editor See also https://stackoverflow.com/questions/1090355/how-to-run-a-batch-script-bat-file-from-eclipse – Paul Verest Nov 09 '17 at 15:52

3 Answers3

10

The ShellEd plugin doesn't seem to be for Windows BAT files--only Linux/Unix shell languages.

Going to Preferences->General->Editors->File Associations is how to have Eclipse open BAT files in a text editor, though.

Daniel 'Dang' Griffith
  • 1,641
  • 2
  • 13
  • 13
  • I've set Eclipse to open `.bat` files in [Notepad++](https://notepad-plus-plus.org/) by that same dialog. – watery Jan 16 '17 at 14:09
4

try with this plugin: http://sourceforge.net/apps/trac/shelled/

And also I think you chould go to preferences->general -> editors->file associoations and add bat to the list

npocmaka
  • 55,367
  • 18
  • 148
  • 187
0

Theres is a new open source plugin called Batch-Editor available on eclipse market place. It has syntax color support for dark and white theme included and has an outline view + quick outline for labels.

Here an example screenshot: Batch-Editor example screenshote (dark theme.

It supports also echo and escaping: Batch-Editor example screenshot (echo handlig white theme)

PS: I am the author of the mentioned plugin.

de-jcup
  • 1,402
  • 12
  • 27