As regards line numbers, when doing normal file editing, I prefer to have the following setting
set number
set relativenumber
because the formers tells me where I am, the latter helps me using j and k effectively.
However, when debugging with gdb, I often want to set breakpoints; hence, I'd like to turn the latter option off, executing the set norelativenumber command on a global scope, so that all files I'm editing show the actual line numbers.
In this respect,
- I kinda know how to trigger the action (when I execute the
:Termdebugcommand, I should also executeset norelativenumber), - but, this is the question, I don't know how to apply that setting to all the buffer (well, not all the buffer, as I don't need numbers in the
gdbwindow, nor in the program's output window, nor in the help, if I open one, and so on); - furthermore, I'm not sure how to handle the case that I quit the debugger (in that case I should set again
set relativenumberglobally).