Can't open the file in a vertical split
Description
Can't open the file in a vertical split with default mapping (<C-v>). Nvim shows Error executing lua: vim/_editor.lua:0: Vim:E21: Cannot make changes, 'modifiable' is off^@stack traceback:^@^I[C]: in function 'nvim_put'^@^Ivim/_editor.lua: in function <vim/_editor.lua:0>
Neovim version
NVIM v0.9.0-dev-531+gf04087d8b
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Operating system and version
Linux 5.15.79.1-microsoft-standard-WSL2
nvim-tree version
87409bb
Minimal config
vim.cmd [[set runtimepath=$VIMRUNTIME]]
vim.cmd [[set packpath=/tmp/nvt-min/site]]
local package_root = "/tmp/nvt-min/site/pack"
local install_path = package_root .. "/packer/start/packer.nvim"
local function load_plugins()
require("packer").startup {
{
"wbthomason/packer.nvim",
"nvim-tree/nvim-tree.lua",
"nvim-tree/nvim-web-devicons",
-- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
},
config = {
package_root = package_root,
compile_path = install_path .. "/plugin/packer_compiled.lua",
display = { non_interactive = true },
},
}
end
if vim.fn.isdirectory(install_path) == 0 then
print "Installing nvim-tree and dependencies."
vim.fn.system { "git", "clone", "--depth=1", "https://github.com/wbthomason/packer.nvim", install_path }
end
load_plugins()
require("packer").sync()
vim.cmd [[autocmd User PackerComplete ++once echo "Ready!" | lua setup()]]
vim.opt.termguicolors = true
vim.opt.cursorline = true
-- MODIFY NVIM-TREE SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
_G.setup = function()
require("nvim-tree").setup {}
end
### Steps to reproduce
1. nvim -nu /tmp/nvt-min.lua
2. :NvimTreeOpen
3. Try to open file with default mappings `<C-v>` or `<C-h>`
### Expected behavior
Should open file horizontally or vertically
### Actual behavior
`Error executing lua: vim/_editor.lua:0: Vim:E21: Cannot make changes, 'modifiable' is off^@stack traceback:^@^I[C]: in function 'nvim_put'^@^Ivim/_editor.lua: in function <vim/_editor.lua:0>`
Attempted replication on linux with
NVIM v0.9.0-dev-531+gf04087d8b
Build type: Debug
LuaJIT 2.1.0-beta3
<C-x> and <C-v> functioned correctly.
Does this happen with 0.8.2 or stable?
@alex-courtis just stumbled on this since I'm experiencing the same error (with my "maximal" config) and just confirmed I built 0.8.2.
NVIM v0.8.2
Build type: Release
LuaJIT 2.1.0-beta3
Edit: In case it helps, neovim is running in WSL2 (Ubuntu 22.04.1 LTS) on Windows 11.
Edit: In case it helps, neovim is running in WSL2 (
Ubuntu 22.04.1 LTS) on Windows 11.
We have a common factor there. Perhaps you could take a look at the neovim issues for the WSL version.
Do you have an approximate date at which this started occurring?
Encountering same issue. Using LVIM in WSL2. Just installed Lvim. Out of the box Lvim configs.
OS Windows 11 with WSL2 Ubuntu 22.04
NVIM v0.9.0-dev-661+ga37c686d2
RelWithDebInfo
LuaJIT 2.1.0-beta3
I'm not quite sure what to do here as I don't have access to windows.
Please attempt a different mapping. It could be that the control character is causing an issue:
mappings = {
list = {
{ key = "v", action = "vsplit" },
{ key = "s", action = "split" },
Sorry, I previously noticed this issue while messing with a certain configuration and have heavily modified it since then — with no history since I've just been tinkering — and can't reproduce. I think for me it was related to my CTRL+L keybinding.
Wish I could help more 🙁
I think for me it was related to my
CTRL+Lkeybinding.
Is ctrl-v paste on windows? How about the terminal?
I think for me it was related to my
CTRL+Lkeybinding.Is ctrl-v paste on windows? How about the terminal?
Yes, ctrl-v is past in windows terminal. I have mapped ctrl-shift-v to paste in windows terminal and that fixed the issue.
I think that's it. Closing this issue.
@sagartomar thank you for resolving this. I'd be most grateful if you could add this to the wiki Tips with a quick description on how to remap. Don't forget to credit yourself ;)
I have added it to the wiki Tips.