Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • StataNow / Vim integration.

    My editor of choice is Vim used in conjunction with the code described at https://huebler.blogspot.com/2017/06/stata.html.

    However since the upgrade to StataNow/MP 18.5 it fails with the message 'Error detected while processing function RunDoLines, command not found' and this occurs where the code indicates the Stata Window title:
    Code:
    statawin = "StataNow/MP 18.5"
    I would be grateful for any advice on how to resolve this or suggestions of an alternative method of submitting Stata code from Vim.

    Thank you.
    Martyn

    Windows 11.

  • #2
    What is the installation directory for StataNow 18? There are two lines that need to be edited in the rundolines.ini file:

    statawin = "StataNow/MP 18.5"

    and

    statapath = "C:\Program Files\StataNow18\StataMP-64.exe"

    Note that you will need to make sure that you verify this path is correct for your installation.


    The shortcut in your text editor would also need to be changed to call the correct version of the program. Using instructions found in the section "Figure 3: Notepad++ shortcut setup for rundolines program" in

    https://huebler.blogspot.com/2008/04/stata.html#install

    I was able to create a new shortcut. I created a short do-file, selected the lines to run, and then pressed the new shortcut (F9). StataNow 18 launched and ran the lines of code correctly.

    While we didn't create the vim integration, if Martyn Sherriff still has issues with the installation or configuration then please contact Stata technical services at [email protected]. We will try to help out and report back to StataList when the solution is found.

    Comment


    • #3
      Thank you for the response. As far as I can tell my paths are set correctly, the only thing that I altered was the title of the Stata window.
      Code:
      [Stata]
      ; Path to Stata executable
      ; Edit to match user's setup.
      ;statapath = "C:\Program Files\Stata17\StataMP-64.exe"
      ;statapath = "C:\Program Files\Stata18\StataBE-64.exe"
      statapath = "C:\Program Files\Stata18MP\StataMP-64.exe"
      
      ; Title of Stata window
      ; Edit to match user's setup. Example for Stata/SE 14 listed below.
      ;statawin = "Stata/MP 18.0"
      statawin = "StataNow/MP 18.5"
      Code:
      . sysdir
         STATA:  C:\Program Files\Stata18MP\
          BASE:  C:\Program Files\Stata18MP\ado\base\
          SITE:  C:\Program Files\Stata18MP\ado\site\
      I will reinstall the code and if it still does not work I will contact Technical Support.

      Martyn

      Comment


      • #4
        Let me take the opportunity to reiterate my long-standing hope that StataCorp will provide

        Official or semi-official plugins for popular text editors (VSCode, Notepad++, Sublime, etc) -- there are some nice user-written contributions but official versions (or still user-written but with active help from StataCorp) with one-click installation would be a huge improvement. Even just providing a single place to look for authoritative information would be great.
        This is also relevant to a recent post by Max Bruening on using Stata via VS Code.

        Comment

        Working...
        X