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

RE: Buffer FileName Issues

Expand Messages
  • Keith Roberts
    ... or the like should solve this problem. Then it doesn t matter whether the bufname is a relative pathname or not, or in what form it is presented.
    Message 1 of 2 , Jan 6 9:21 AM
      >-----Original Message-----
      >From: Clint Harames [mailto:c.harames@...]
      >Sent: Monday, January 05, 2004 5:20 PM
      >To: vim-dev@...
      >Subject: Buffer FileName Issues
      >
      >Looking for help...
      >GVIM on a WindowsXP machine shows the name of the file being edited as
      >\temp\file (in the statusline), whereas GVIM on a Windows2000 machine
      >shows the same filename as temp\file (notice no leading \).
      >
      >This is significant because I use a key mapping to diff two buffers with
      >an external program. It passes the buffer name (filename) using %. So
      >in the case above the shell command executed is:
      >Diff "\temp\file1" "\temp\file2"
      >This is a problem because Windows does not know that the leading \ means
      >to start from the root directory. It results in a file not found error.
      >[snip]

      :exe "Diff" expand('%:p') expand('#:p')

      or the like should solve this problem. Then it doesn't matter whether the
      bufname is a relative pathname or not, or in what form it is presented.
    Your message has been successfully submitted and would be delivered to recipients shortly.