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?
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.
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
rto refresh the directory the cursor is in, orRto refresh your whole NERDTree.Hope that helps.