2

I found a plugin (sublimelinter) for this task but it is for specific languages.

Do you know a way to highlight/detect unique word in Sublime Text for all programming languages ?

To be clear I'm looking for a way to detect unused variable via a plugin wich detect unique word in a code since a unique word is generally also unused (It is not totally true but still it is not a problem if it wrongly detects few words such as "static","serial" and so on for c++. Ideally I should be able to list words to exclude).

Important : I do not want a solution in which I have to compile my code.

MattDMo
  • 100,794
  • 21
  • 241
  • 231
Malick
  • 6,252
  • 2
  • 46
  • 59
  • 2
    Seems like a lofty goal for a text editor. You can also compile your code with `-Wunused-variable`. – erip Dec 11 '15 at 13:06
  • thanks for the compilation trick but I"m looking for an answer for a text editor. It will help me a lot to clean my code at "writting" time. – Malick Dec 11 '15 at 13:40
  • Text editors are just that: programs that *edit* text. If it doesn't compile the code, it can't tell you what's being used and, thereby, what's **not** being used. Typically these utilities are available for IDEs, but I haven't seen one for a text editor. – erip Dec 11 '15 at 13:43
  • You'll have to use the `clang` plugin which basically just runs your code against the `clang` compiler anytime you make a change and then marks lines with problems. – Gillespie Dec 11 '15 at 14:51
  • Thanks but I do not want to compile the code, in fact it is not a c++ code but a very similar programming language (ox). So I look for a way to identify unique word in my code, since if it is unique it is unused. – Malick Dec 11 '15 at 14:57
  • @Malick if you're not using C++, then **don't tag the question C++**. Otherwise you get answers that aren't useful, and annoy the hell out of other users. – MattDMo Dec 11 '15 at 22:34
  • sorry and thanks for the edit. – Malick Dec 11 '15 at 22:40

1 Answers1

2

There is plugin SublimeClang. It provides auto complete suggestions and error / warning reporting.

Roman Zaitsev
  • 1,328
  • 5
  • 20
  • 28