https://github.com/xvezda/vim-readonly
:eyes: Automatically set readonly option on specific files
https://github.com/xvezda/vim-readonly
neovim nvim readonly vim vim-plugins vim-scripts
Last synced: about 2 months ago
JSON representation
:eyes: Automatically set readonly option on specific files
- Host: GitHub
- URL: https://github.com/xvezda/vim-readonly
- Owner: Xvezda
- License: mit
- Created: 2020-03-22T14:06:16.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-22T00:53:35.000Z (over 4 years ago)
- Last Synced: 2025-02-26T15:40:08.285Z (2 months ago)
- Topics: neovim, nvim, readonly, vim, vim-plugins, vim-scripts
- Language: Vim script
- Homepage: https://www.vim.org/scripts/script.php?script_id=5896
- Size: 13.7 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# readonly.vim
[](https://github.com/Xvezda/vishop)Automatically set readonly option on specific files.
This plugin is useful when if you are person like me,
who likes to look around internal or package manager managed (i.e. pip, npm, etc.)
source codes with vim.It protects original source code from modifying accidentally by user.
## Installation
Using vim-plug:
```vim
Plug 'Xvezda/vim-readonly'
```or
```sh
make install
```## Usage
`g:readonly_automatic` is enabled by default.
Use `:Readonly` to manually enable readonly option, and `:Readonly!` to disable.
## Global options
| Flag | Description | Default |
| ---------------------- | -------------------------------------------------- | ------- |
| `g:readonly_automatic` | Automatically set readonly when patterns are match | `1` |
| `g:readonly_paths` | Set patterns of path to set readonly option | `['/usr/bin/lib/', '/usr/local/lib/', '/usr/local/include/']` |
| `g:readonly_nodejs` | Add NodeJs package path to readonly paths | `1` |
| `g:readonly_python` | Add python package path to readonly paths | `1` |
| `g:readonly_check_virtualenv` | Add python virtualenv path to readonly paths when virtualenv is activated | `1` |## Homepage
https://github.com/Xvezda/vim-readonly
## Copyright
Copyright (C) 2020 Xvezda
MIT License