Skip to content

How to get hints on compiler errors ? And jump into editor on error file and line ? #4491

Description

@akharrou

Consider this:

❯ gcc -Wall main.c
main.c:6:3: error: implicitly declaring library function 'printf' with type 'int (const char *, ...)' [-Werror,-Wimplicit-function-declaration]
  printf("Hello world\n");
  ^
main.c:6:3: note: include the header <stdio.h> or explicitly provide a declaration for 'printf'
main.c:4:7: warning: unused variable 'bla' [-Wunused-variable]
  int bla;
      ^
1 warning and 1 error generated.

How can you get hints on just main.c:6 and open vim directly on that line ?


Bonus: can you additionally include columns in this ? i.e hint selection would include them and vim opens cusor directly in that file, on that line, on that column.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions