Understanding modifiable in Vim
up vote
3
down vote
favorite
During a OS upgrade (Linux), Vim or some part of it has been updated as well.
Now it happens that sometimes when I save a file (the file is not saved) I get this error:
E21: Cannot make changes, 'modifiable' is off
I did :help E21
and the manual says:
{not in Vi} *E21*
When off the buffer contents cannot be changed. The 'fileformat' and
'fileencoding' options also can't be changed.
Can be reset with the |-M| command line argument.
It's not clear to me what it means. I use and start the editor the usual way, nothing is changed. The workflow is the same, too. I open different windows with CTLR-W N
, then load and edit files there and switch between windows, etc.
I'd like to know how to disable this behavior and about side effects.
linux vim
add a comment |
up vote
3
down vote
favorite
During a OS upgrade (Linux), Vim or some part of it has been updated as well.
Now it happens that sometimes when I save a file (the file is not saved) I get this error:
E21: Cannot make changes, 'modifiable' is off
I did :help E21
and the manual says:
{not in Vi} *E21*
When off the buffer contents cannot be changed. The 'fileformat' and
'fileencoding' options also can't be changed.
Can be reset with the |-M| command line argument.
It's not clear to me what it means. I use and start the editor the usual way, nothing is changed. The workflow is the same, too. I open different windows with CTLR-W N
, then load and edit files there and switch between windows, etc.
I'd like to know how to disable this behavior and about side effects.
linux vim
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
During a OS upgrade (Linux), Vim or some part of it has been updated as well.
Now it happens that sometimes when I save a file (the file is not saved) I get this error:
E21: Cannot make changes, 'modifiable' is off
I did :help E21
and the manual says:
{not in Vi} *E21*
When off the buffer contents cannot be changed. The 'fileformat' and
'fileencoding' options also can't be changed.
Can be reset with the |-M| command line argument.
It's not clear to me what it means. I use and start the editor the usual way, nothing is changed. The workflow is the same, too. I open different windows with CTLR-W N
, then load and edit files there and switch between windows, etc.
I'd like to know how to disable this behavior and about side effects.
linux vim
During a OS upgrade (Linux), Vim or some part of it has been updated as well.
Now it happens that sometimes when I save a file (the file is not saved) I get this error:
E21: Cannot make changes, 'modifiable' is off
I did :help E21
and the manual says:
{not in Vi} *E21*
When off the buffer contents cannot be changed. The 'fileformat' and
'fileencoding' options also can't be changed.
Can be reset with the |-M| command line argument.
It's not clear to me what it means. I use and start the editor the usual way, nothing is changed. The workflow is the same, too. I open different windows with CTLR-W N
, then load and edit files there and switch between windows, etc.
I'd like to know how to disable this behavior and about side effects.
linux vim
linux vim
edited Nov 25 at 23:57
Rui F Ribeiro
38.3k1477127
38.3k1477127
asked Jun 10 '12 at 20:49
Paolo
5,04772136
5,04772136
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
5
down vote
accepted
You can use :verbose set modifiable?
to find out if a plugin is setting the option. If the option has been modified by a plugin, it will show Last set from /path/to/plugin/file
(in addition to showing the value).
Maybe you are using the Netrw plugin. It comes bundled with Vim and handles “editing” local directories (listing the contents, picking files to view/edit) and remote file/directory access. I know it twiddles modifiable
(and some other options). There may be a bug in the version bundled with your updated Vim. You can check the version number of the active installation of Netrw with :echo g:loaded_netrwPlugin
.
If the problem seems to be related to Netrw, you might try installing another released version, or maybe a development version.
Thanks for the info. That was indeed a bug in Netrw. groups.google.com/d/msg/vim_dev/8K6qsQrpD5Y/MPQi5CHS89cJ
– Paolo
Jun 11 '12 at 10:08
add a comment |
up vote
4
down vote
This happens when you open a file that is read-only. Check the file permissions: it seems that your user doesn't have write permission on the file. Or maybe the filesystem is mounted read-only (check with df /path/to/file
to see on what filesystem the file is, and use mount
or cat /proc/mounts
to see the mount options).
A different possibility would be a buggy decoding plugin, but then I'd expect other error messages.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
accepted
You can use :verbose set modifiable?
to find out if a plugin is setting the option. If the option has been modified by a plugin, it will show Last set from /path/to/plugin/file
(in addition to showing the value).
Maybe you are using the Netrw plugin. It comes bundled with Vim and handles “editing” local directories (listing the contents, picking files to view/edit) and remote file/directory access. I know it twiddles modifiable
(and some other options). There may be a bug in the version bundled with your updated Vim. You can check the version number of the active installation of Netrw with :echo g:loaded_netrwPlugin
.
If the problem seems to be related to Netrw, you might try installing another released version, or maybe a development version.
Thanks for the info. That was indeed a bug in Netrw. groups.google.com/d/msg/vim_dev/8K6qsQrpD5Y/MPQi5CHS89cJ
– Paolo
Jun 11 '12 at 10:08
add a comment |
up vote
5
down vote
accepted
You can use :verbose set modifiable?
to find out if a plugin is setting the option. If the option has been modified by a plugin, it will show Last set from /path/to/plugin/file
(in addition to showing the value).
Maybe you are using the Netrw plugin. It comes bundled with Vim and handles “editing” local directories (listing the contents, picking files to view/edit) and remote file/directory access. I know it twiddles modifiable
(and some other options). There may be a bug in the version bundled with your updated Vim. You can check the version number of the active installation of Netrw with :echo g:loaded_netrwPlugin
.
If the problem seems to be related to Netrw, you might try installing another released version, or maybe a development version.
Thanks for the info. That was indeed a bug in Netrw. groups.google.com/d/msg/vim_dev/8K6qsQrpD5Y/MPQi5CHS89cJ
– Paolo
Jun 11 '12 at 10:08
add a comment |
up vote
5
down vote
accepted
up vote
5
down vote
accepted
You can use :verbose set modifiable?
to find out if a plugin is setting the option. If the option has been modified by a plugin, it will show Last set from /path/to/plugin/file
(in addition to showing the value).
Maybe you are using the Netrw plugin. It comes bundled with Vim and handles “editing” local directories (listing the contents, picking files to view/edit) and remote file/directory access. I know it twiddles modifiable
(and some other options). There may be a bug in the version bundled with your updated Vim. You can check the version number of the active installation of Netrw with :echo g:loaded_netrwPlugin
.
If the problem seems to be related to Netrw, you might try installing another released version, or maybe a development version.
You can use :verbose set modifiable?
to find out if a plugin is setting the option. If the option has been modified by a plugin, it will show Last set from /path/to/plugin/file
(in addition to showing the value).
Maybe you are using the Netrw plugin. It comes bundled with Vim and handles “editing” local directories (listing the contents, picking files to view/edit) and remote file/directory access. I know it twiddles modifiable
(and some other options). There may be a bug in the version bundled with your updated Vim. You can check the version number of the active installation of Netrw with :echo g:loaded_netrwPlugin
.
If the problem seems to be related to Netrw, you might try installing another released version, or maybe a development version.
edited Jan 2 '16 at 18:38
Community♦
1
1
answered Jun 11 '12 at 3:16
Chris Johnsen
14.5k64847
14.5k64847
Thanks for the info. That was indeed a bug in Netrw. groups.google.com/d/msg/vim_dev/8K6qsQrpD5Y/MPQi5CHS89cJ
– Paolo
Jun 11 '12 at 10:08
add a comment |
Thanks for the info. That was indeed a bug in Netrw. groups.google.com/d/msg/vim_dev/8K6qsQrpD5Y/MPQi5CHS89cJ
– Paolo
Jun 11 '12 at 10:08
Thanks for the info. That was indeed a bug in Netrw. groups.google.com/d/msg/vim_dev/8K6qsQrpD5Y/MPQi5CHS89cJ
– Paolo
Jun 11 '12 at 10:08
Thanks for the info. That was indeed a bug in Netrw. groups.google.com/d/msg/vim_dev/8K6qsQrpD5Y/MPQi5CHS89cJ
– Paolo
Jun 11 '12 at 10:08
add a comment |
up vote
4
down vote
This happens when you open a file that is read-only. Check the file permissions: it seems that your user doesn't have write permission on the file. Or maybe the filesystem is mounted read-only (check with df /path/to/file
to see on what filesystem the file is, and use mount
or cat /proc/mounts
to see the mount options).
A different possibility would be a buggy decoding plugin, but then I'd expect other error messages.
add a comment |
up vote
4
down vote
This happens when you open a file that is read-only. Check the file permissions: it seems that your user doesn't have write permission on the file. Or maybe the filesystem is mounted read-only (check with df /path/to/file
to see on what filesystem the file is, and use mount
or cat /proc/mounts
to see the mount options).
A different possibility would be a buggy decoding plugin, but then I'd expect other error messages.
add a comment |
up vote
4
down vote
up vote
4
down vote
This happens when you open a file that is read-only. Check the file permissions: it seems that your user doesn't have write permission on the file. Or maybe the filesystem is mounted read-only (check with df /path/to/file
to see on what filesystem the file is, and use mount
or cat /proc/mounts
to see the mount options).
A different possibility would be a buggy decoding plugin, but then I'd expect other error messages.
This happens when you open a file that is read-only. Check the file permissions: it seems that your user doesn't have write permission on the file. Or maybe the filesystem is mounted read-only (check with df /path/to/file
to see on what filesystem the file is, and use mount
or cat /proc/mounts
to see the mount options).
A different possibility would be a buggy decoding plugin, but then I'd expect other error messages.
answered Jun 11 '12 at 0:38
Gilles
523k12610441576
523k12610441576
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f40457%2funderstanding-modifiable-in-vim%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown