vim-unimpaired icon indicating copy to clipboard operation
vim-unimpaired copied to clipboard

RFC: Toggled settings in netrw windows will be reset on FocusGained

Open kiryph opened this issue 7 years ago • 0 comments

netrw manages vim settings for netrw windows in a separate variable called g:netrw_bufsettings with the default value of noma nomod nonu nowrap ro nobl. If you are not familiar with all the abbreviations, I give here the unabbreviated versions

  • noma = nomodifiable
  • nomod = nomodified
  • nonu = nonumber
  • nowrap (not abbreviated)
  • ro = readonly
  • nobl = nobuflisted

The two settings number and wrap can conveniently be toggled by unimpaired with yon and yow.

Another netrw variable is g:netrw_cursor which contains the settings for cursorline and cursorcolumn which also can be changed by unimpaired with yo-, yo| and yo+.

I do not mind that netrw can have different default settings, but I like to use the unimpaired toggles and do not want to lose my current setting on FocusGained which right now happens.

I am not sure how to solve this:

Either netrw does not enforce their settings on FocusGained or unimpaired adjusts the netrw variables if one presses a command in a netrw window as well. BTW they are all (number, wrap, cursorline, cursorcolumn) local to window.

kiryph avatar Aug 06 '18 10:08 kiryph