Loading ...
Sorry, an error occurred while loading the content.

Re: vim script can't create /tmp file

Expand Messages
  • Gary Johnson
    ... An even easier way is to put a line like this towards the top of your ~/.vimrc: let $TMPDIR = $HOME. /tmp Regards, Gary -- You received this message from
    Message 1 of 19 , Dec 11, 2012
    • 0 Attachment
      On 2012-12-11, Gary Johnson wrote:
      > On 2012-12-11, sinbad wrote:
      >
      > > there are two possibilities here, first one of vim
      > > script is deleting the tmpfile, the other is some cron
      > > job might be deleting it. in the first case can i put a
      > > watch on the tmpfile created from with in vim. In the
      > > latter case, can i force vim to create the tmp directory
      > > in my homedir rather than in /tmp so that the cron job
      > > won't have access to it. please suggest ways to achieve
      > > above.
      >
      > Somebody suggested earlier a way to put a watch on that tmpfile, but
      > you apparently don't have permission to do that.
      >
      > As for putting your tmp directory someplace else,
      >
      > :help tempfile
      >
      > says that on Unix, Vim uses the first of this list of directories:
      > $TMPDIR, /tmp, current-dir, $HOME. Therefore, you could set TMPDIR
      > in your environment before starting Vim, either by setting it in
      > your shell's .rc file (e.g., ~/.bashrc) or by setting it as you
      > start Vim, e.g.,
      >
      > TMPFILE=~/tmp vim
      >
      > You could put that in a wrapper script or in an alias:
      >
      > alias vim='TMPFILE=~/tmp vim'

      An even easier way is to put a line like this towards the top of
      your ~/.vimrc:

      let $TMPDIR = $HOME."/tmp"

      Regards,
      Gary

      --
      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
    • sinbad
      ... Gary, Christian, thanks for the help. setting $TMPDIR to my homedir solved the problem, so it s really one of the root s cron jobs screwing with my /tmp
      Message 2 of 19 , Dec 13, 2012
      • 0 Attachment
        On Tuesday, December 11, 2012 10:10:02 PM UTC+5:30, Gary Johnson wrote:
        > On 2012-12-11, Gary Johnson wrote:
        >
        > > On 2012-12-11, sinbad wrote:
        >
        > >
        >
        > > > there are two possibilities here, first one of vim
        >
        > > > script is deleting the tmpfile, the other is some cron
        >
        > > > job might be deleting it. in the first case can i put a
        >
        > > > watch on the tmpfile created from with in vim. In the
        >
        > > > latter case, can i force vim to create the tmp directory
        >
        > > > in my homedir rather than in /tmp so that the cron job
        >
        > > > won't have access to it. please suggest ways to achieve
        >
        > > > above.
        >
        > >
        >
        > > Somebody suggested earlier a way to put a watch on that tmpfile, but
        >
        > > you apparently don't have permission to do that.
        >
        > >
        >
        > > As for putting your tmp directory someplace else,
        >
        > >
        >
        > > :help tempfile
        >
        > >
        >
        > > says that on Unix, Vim uses the first of this list of directories:
        >
        > > $TMPDIR, /tmp, current-dir, $HOME. Therefore, you could set TMPDIR
        >
        > > in your environment before starting Vim, either by setting it in
        >
        > > your shell's .rc file (e.g., ~/.bashrc) or by setting it as you
        >
        > > start Vim, e.g.,
        >
        > >
        >
        > > TMPFILE=~/tmp vim
        >
        > >
        >
        > > You could put that in a wrapper script or in an alias:
        >
        > >
        >
        > > alias vim='TMPFILE=~/tmp vim'
        >
        >
        >
        > An even easier way is to put a line like this towards the top of
        >
        > your ~/.vimrc:
        >
        >
        >
        > let $TMPDIR = $HOME."/tmp"
        >
        >
        >
        > Regards,
        >
        > Gary

        Gary, Christian, thanks for the help.
        setting $TMPDIR to my homedir solved
        the problem, so it's really one of the
        root's cron jobs screwing with my /tmp
        files.

        --
        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
      Your message has been successfully submitted and would be delivered to recipients shortly.