google / ci_edit

A terminal text editor with mouse support and ctrl+Q to quit.
Apache License 2.0
223 stars 54 forks source link

Is there a way to highlight the line in case of a syntax error? #199

Open gennad opened 5 years ago

gennad commented 5 years ago

I am thinking of the C-e check function that would try to compile the code and highlight the errors in the code if there are any.

dschuyler commented 5 years ago

Nope, but I'd like that.

This is another case where I'd like to consider a new-ish UI/UX.

For example, wdyt of having annotation in the document. So for a file like this

  1 impor os
  2 
  3 def cat():
  4    return "meow"

An annotation would be added after line 1 and before line 2, explaining the error.

  1 impor os
SyntaxError: invalid syntax
  2 
  3 def cat():
  4    return "meow"

The text SyntaxError: invalid syntax wouldn't really be part of the document. The cursor would skip it when going up and down (a cursor on line 1 would jump to line 2 when down arrow was pressed).