nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC] Improve external tools


From: Marco Diego Aurélio Mesquita
Subject: [RFC] Improve external tools
Date: Sat, 2 Jan 2021 19:17:27 -0300

I'd like nano interaction with external tools to be more powerful. The
external tools plugins for gedit allows some interesting features like
enabling different behavior for different file types, interface
directly with git, using zenity to get user input, preview with
another tool, make, build, compile, run, etc...

Considering nano macros and external tools, I thought about how to get
most of the described features with minimal changes to gnu nano. Part
of the power of gedit external tools plugin come from the environment
variables that gedit passes when the external program/script is run. I
think we can mimic that and gain some very interesting features in
nano.

The minimal set of environment variables that can be passed to enable
these features, that I came up with, were (names are
self-explanatory):

DOCUMENT_PATH
LINE
LINE_NUMBER
ROW_NUMBER

These can be achieved with very small changes to gnu nano source code
and would enable much more advanced interactions with external tools.
It would allow me, for example, to (I think):
  - compile and preview a latex project,
  - check for compile warnings on cursor's current line,
  - run make for the current project and launch it on another terminal window,
  - run git diff on the current file and easily show what was changed
since last commit,
  - run git add or checkout on current file,
  - etc...

Also, it is something I'm willing to and think I'm capable of
implementing myself.

Please tell me I'm not the only one interested in these features.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]