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

Re: how should .vim file find corresponding .py file?

Expand Messages
  • Jonathan Hartley
    Thanks, that works splendidly. -- Jonathan Hartley Made of meat. http://tartley.com tartley@tartley.com +44 7737 062 225 twitter/skype: tartley
    Message 1 of 3 , Oct 5, 2010
    • 0 Attachment
      Thanks, that works splendidly.

      --
      Jonathan Hartley Made of meat. http://tartley.com
      tartley@... +44 7737 062 225 twitter/skype: tartley


      On 05/10/2010 21:34, ZyX wrote:
      > Ответ на сообщение <<how should .vim file find corresponding .py file?>>,
      > присланное в 00:22:21 06 октября 2010, Среда.
      > Отправитель: Jonathan Hartley:
      >
      > Use
      > " outside of the functions
      > execute "pyfile ".fnameescape(fnamemodify(expand("<sfile>"), ":h")."/run_tests/run_tests.py")
      > or
      > " somewhere at the beginning and *not* inside a function
      > let s:scriptfile=expand("<sfile>")
      > " anywhere in the script
      > execute "pyfile ".fnameescape(fnamemodify(s:scriptfile, ":h")."/run_tests/run_tests.py")
      > If user uses something like pathogen or vim-addon-manager, then he definitely
      > will not have your script in ~/.vim.
      >
      > Текст сообщения:
      >> Hi,
      >>
      >> I have a some vim scripts I wrote:
      >>
      >> ~/.vim/ftplugin/python
      >>
      >> |--run_tests.vim
      >> |--run_tests
      >> |
      >> |--run_tests.py
      >> |--etc
      >>
      >> Within run_tests.vim, I have a line that currently reads:
      >>
      >> pyfile ~/.vim/ftplugin/python/run_tests/run_tests.py
      >>
      >> But this assumes the user has installed the scripts in ~/.vim. Is this a
      >> valid assumption? If not, how should I be referencing run_tests.py from
      >> within run_tests.vim?
      >>
      >> I considered using $VIMHOME, which is defined as ~/.vim on one of my
      >> machines, but it is not defined on my other.
      >>
      >> Clues much appreciated,
      >>
      >> Jonathan

      --
      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.