Nerdtree: E21: Cannot make changes, 'modifiable' is off when refreshing tree view

Created on 20 Jul 2016  路  2Comments  路  Source: preservim/nerdtree

I got this

Error detected while processing function repeat#wrap:
line    2:
E21: Cannot make changes, 'modifiable' is off
Press ENTER or type command to continue

when trying to refresh NERDTree tree view with C-r. Here is my .vimrc file symlinked to home directory .vimrc

I can easily avoid this with :set modifiable but I want to be able to refresh tree view without it.

I also run :verbose set modifiable? and get the below result, but I dont know what to do with it

        Last set from ~/.vim/plugged/nerdtree/lib/nerdtree/ui.vim

Is there a configuration to always set modifiable for NERDTree?

Most helpful comment

You are using the wrong keystroke for refreshing. <C-R> is the Vim command to redo the latest change that was undone. Since we don't edit the NERDTree directly, there are no changes to undo or redo.

You need to use r to refresh the directory the cursor is in, or R to refresh your whole NERDTree.

Hope that helps.

All 2 comments

You are using the wrong keystroke for refreshing. <C-R> is the Vim command to redo the latest change that was undone. Since we don't edit the NERDTree directly, there are no changes to undo or redo.

You need to use r to refresh the directory the cursor is in, or R to refresh your whole NERDTree.

Hope that helps.

@PhilRunninger thanks for the quick response. That was it - wrong keystroke. r and R works perfect.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MuhammadMouradG picture MuhammadMouradG  路  6Comments

sunnyguan picture sunnyguan  路  4Comments

DapperFox picture DapperFox  路  4Comments

NikosEfthias picture NikosEfthias  路  3Comments

BigfootN picture BigfootN  路  5Comments