Directory for autocompletion files on Mac OS

TXS - Help
jayom
2012-07-08
2012-10-17
  • jayom
    jayom
    2012-07-08

    I added personnal commands in a .cwl file so that TXS could recognize them and
    provide the autocompletion but it seems that I can't figure where to put this
    file on my Mac. The user manual only specifies the proper directory on Windows
    and Linux but not a word about Mac.
    Does anybody know how to handle this ?

     
  • Tim Hoffmann
    Tim Hoffmann
    2012-07-17

    I have no background on OSX, but there should be some application data
    directory.

    Try locating "texstudio.ini" or "*.cwl" files that TXS autogenerates.

    Please report back, if you found the actual directory, so we can add it to the
    manual.

     
  • That's the directory where it looks

    CFURLRef appUrlRef = CFBundleCopyBundleURL(CFBundleGetMainBundle());
    CFStringRef macPath = CFURLCopyFileSystemPath(appUrlRef,
    kCFURLPOSIXPathStyle);
    const char pathPtr = CFStringGetCStringPtr(macPath,
    CFStringGetSystemEncoding());
    searchFiles<<QString(pathPtr)+"/Contents/Resources"+"/completion" /
    dn*/;
    //Mac

    i.e. "Contents/Resources/completion" within the application bundle. (whatever
    a bundle is)