Reputation: 1538
I know that there is shortcut in Eclipse Command+/ (CTRL+/) to comment line or block but not for .txt file. So how to do that instead of commenting each line manually?
Upvotes: 0
Views: 29716
Reputation: 8849
As @Bob Kuhar commented you can open the .txt file in Java editor. Right click on the text file, go to Open with > Other. Choose Java Editor in the editor selection dialog box.
Select a single line or block of lines then press
Ctrl + / --> All line will be commented in // style comments(Single line comments)
Ctrl + Shift + / --> All line will be commented in /* style(Multi line comment)
Note that if you type Jay keyword like class, for, while etc then these will be highlighted in coloured text.
Upvotes: 2