Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kiryph opened this issue Aug 6, 2018 · 0 comments
Open

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

kiryph opened this issue Aug 6, 2018 · 0 comments

Comments

@kiryph
Copy link
Contributor

kiryph commented Aug 6, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant