Active2 years, 8 months ago
- We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand.
- E138: Can't write viminfo file [NULL]! Hit ENTER or type command to continue That you get 'NULL' here is a bug in the code. I'll fix that. I can't remember if this was the first file I edited today or not, but I don't think it was. I certainly wasn't mucking with anything to do with vim.
Are.vimrc and.viminfo the same files but with different names? In every tutorial there are advices to change.vimrc, but I don't have this file, only.viminfo. How To Stop Vim Logging Info Into.viminfo. In this case, what follows after n indicates the file system path on a windows operating system. The above should work for many versions of VIM, including 7.2, and 7.4. You can access the Vim Help, while using Vim. If you try to edit the.viminfo file by deleting the lines that show things you do not want, those changes will be logged and updated to the.viminfo file. So, if you edit the.viminfo file itself and close it and then open it again, you will see what you removed continue to be mentioned in some form. If you are getting below error, most likely this is happens because the home directory has run out of disk space and no free inode is left on the server that’s why any new vim operation is unable to write in the.viminfo file.
I have already checked several similar links but nothing worked. Before i explain the issue, i was earlier getting following message while saving any file:
While searching for solution, i came across several links which suggested creating .vimrc file. So i created one and entered the following contents in it:
I also created the ~/.vim/backups directory. Also, there is no .viminfo file. I think i removed it while trying to fix things.
Can't Rename Viminfo File
Few other details that might be of interest are:
Now with the above permissions in place (no write for any user in any of the parent dirs), whenever i switch to git user and try saving any file, i am now getting the following error:
Is the above error expected or am i doing something wrong? GitLab application creates git user as part of the install process so i am not sure whether changing the permissions will be a good idea.
TechnextTechnext
2 Answers
It looks like you need to set the location of your viminfo file as well, with something like:
blmblm62011 gold badge55 silver badges1313 bronze badges
For me the problem was that
kenorb~/.vim/files/info/viminfo
was a directory instead of a file.12.8k1818 gold badges8787 silver badges132132 bronze badges
Mark McWiredMark McWired
Not the answer you're looking for? Browse other questions tagged vimpermissionsvimrc or ask your own question.
Problem : E212: Can’t open file for writing – vi Error in Suse Linux
Here is my problem:
I installed Suse linux on Virtual Machine. I logged in as a regular user and then switched to root. Afterwords, i typed this command:
#> /usr/sbin/useradd -g oinstall -G dba,oper oracle
In other words, i created a user called Oracle and then switched to Oracle user from root and tried to created .bash_profile from vi. When i do: wq, i get this error:
“.bash_profile” E212: Can’t open file for writing
Press ENTER or type command to continue
Press ENTER or type command to continue
When i type this command q!, i get this error:
E138: Can’t write viminfo file /home/oracle/.viminfo!
Press ENTER or type command to continue
Press ENTER or type command to continue
After i press enter, vi exits and i get back to the command prompt.
I have no idea why does this happen. Any help/suggestions/advice will be appreciated.
Solution: E212: Can’t open file for writing – vi Error in Suse Linux
make sure that the oracle home dir is created and owned by user oracle
Can T Write Viminfo File Root Viminfo
Related Posts: