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

Make opened modules read-only by default #30

Open
nfischer opened this issue Jan 12, 2016 · 2 comments
Open

Make opened modules read-only by default #30

nfischer opened this issue Jan 12, 2016 · 2 comments

Comments

@nfischer
Copy link

To me, it makes a lot of sense to make some modules open in read-only when opened by gf or :Nedit and the like. It doesn't make much sense to be able to edit the fs module, which is a standard module.

On the other hand, it makes more sense to be allowed to edit locally downloaded modules. The distinction of course can be easily made, since standard modules such as fs must be curled, while local modules are found locally. So the same logic could be used to set readonly and set nomodifiable.

@nfischer
Copy link
Author

This is resolved by #31.

Core modules are opened in readonly mode, and local files are opened with standard permissions.

A possible extension to this would be to open dependencies (things inside node_modules/ and the equivalent for global packages) in readonly as well.

@moll
Copy link
Owner

moll commented Jan 12, 2016

Surprising that Netrw itself doesn't set them readonly... I can understand not doing so for protocols that have a standard for uploading files, but for HTTP...

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

2 participants