vim-readonly

:eyes: Automatically set readonly option on specific files (by Xvezda)

Vim-readonly Alternatives

Similar projects and alternatives to vim-readonly

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better vim-readonly alternative or higher similarity.

vim-readonly reviews and mentions

Posts with mentions or reviews of vim-readonly. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-11-22.
  • Protect rust source files under ~/.rustup/toolchains/ with NeoVim
    2 projects | /r/neovim | 22 Nov 2021
    _G.protect_rust_files = function() -- protect rust source files under ~/.rustup/toolchains/ -- idea from https://github.com/Xvezda/vim-readonly/blob/master/plugin/readonly.vim -- and https://github.com/rust-lang/rustup/issues/2550 local protect_dirs = { "" .. vim.fn.expand "~" .. "/.rustup/toolchains/", "" .. vim.fn.expand "~" .. "/.cargo/git/", } for _, prefix in ipairs(protect_dirs) do if string.match(vim.fn.expand "%:p", prefix) ~= nil then vim.bo.readonly = true vim.bo.modifiable = false end end end
    3 projects | /r/rust | 22 Nov 2021
    _G.protect_rust_toolchain = function() -- protect rust source files under ~/.rustup/toolchains/ -- idea from https://github.com/Xvezda/vim-readonly/blob/master/plugin/readonly.vim -- and https://github.com/rust-lang/rustup/issues/2550 local rustup_toolchain_root = "" .. vim.fn.expand "~" .. "/.rustup/toolchains/" if string.match(vim.fn.expand "%:p", rustup_toolchain_root) ~= nil then vim.bo.readonly = true vim.bo.modifiable = false end end vim.api.nvim_command("autocmd BufReadPost *.rs lua protect_rust_toolchain()")

Stats

Basic vim-readonly repo stats
2
4
0.0
over 3 years ago

Xvezda/vim-readonly is an open source project licensed under MIT License which is an OSI approved license.

The primary programming language of vim-readonly is Vim Script.


Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com