Tuesday, May 6, 2014

Re: Odd behaviour with :q!

Interesting: I ran strace -f -o /tmp/vim_trace , and got this:

grep "open.*rc\>" /tmp/vim_trace

/tmp/vim_trace:47680 open("/etc/virc", O_RDONLY)       = 3
/tmp/vim_trace:47680 open("/root/.vimrc", O_RDONLY)    = -1 ENOENT (No such file or directory)
/tmp/vim_trace:47680 open("/root/_vimrc", O_RDONLY)    = -1 ENOENT (No such file or directory)
/tmp/vim_trace:47680 open("/root/.exrc", O_RDONLY)     = -1 ENOENT (No such file or directory)

As virc is the only open which succeeds, it must be the culprit.  Here's what it looks like:
ls -l /etc/virc 
-rw-r--r--. 1 root root 1962 Apr 19  2010 /etc/virc

<I did paste it here>


I'm too damn lazy to work out which bit is doing it - I think I'll just remove it.

UPDATE:  It's not that! renamed the file, and now:

grep "open.*rc\>" /tmp/vim_trace.48290 
48545 open("/etc/virc", O_RDONLY)       = -1 ENOENT (No such file or directory)
48545 open("/root/7ticks/.vimrc", O_RDONLY) = -1 ENOENT (No such file or directory)
48545 open("/root/7ticks/_vimrc", O_RDONLY) = -1 ENOENT (No such file or directory)

(The only other opens are for library files)

This is odd (and interesting).

Graham






On 6 May 2014 15:22, Tim Chase <vim@tim.thechases.com> wrote:
On 2014-05-06 07:09, Graham Nicholls wrote:
> On Tuesday, 6 May 2014 14:01:22 UTC+1, Tim Chase  wrote:
> >   vim -u NONE ...
>
> Hmmm, that's interesting:
> if I do
> # while true; do vim -u NONE ; done
> then I can run vi forever without getting the problem, which is a
> relief.

Well, that at least demonstrates that all is working correctly before
other files start mucking with your configuration.  So that's good
news.

> I don't think it's my .exrc - actually, I haven't got one (it's a
> shared root account, so in my .gnbashrc, I set EXINIT:

There are several files that are checked:

  :sp $VIM/vimrc
  :sp ~/.vimrc
  :sp ~/.gvimrc
  :sp ~/.exrc
  :sp $VIMRUNTIME/evim.vim

so if any of those exist you might want to check those locations (and
any files they reference) for weird mappings that are screwing with
your settings.

-tim




--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment