weixin_39606638
weixin_39606638
2020-11-27 06:58

Added NetSuite Bundle Package

The NetSuite Bundle for Sublime provides code completion for NetSuite APIs and a quick panel menu with NetSuite records internal IDs and script templates.

该提问来源于开源项目:wbond/package_control_channel

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

5条回答

  • weixin_39649478 weixin_39649478 5月前
    1. You're leaking file handles.
    2. You won't be able to access local files in a ST3 installation like that, because the package is bundled as a .sublime-package zip archive there. You'll need to use sublime.load_resource instead, which is only available once the API has loaded (when it calls the plugin_loaded function).
    3. Instead of defining your own insert command, just use the built-in "insert" command with the characters parameter.
    点赞 评论 复制链接分享
  • weixin_39606638 weixin_39606638 5月前

    Thank you for the comments. I've made some changes and decided to make the package available only for sublime 3 for now. Can you please check it?

    点赞 评论 复制链接分享
  • weixin_39649478 weixin_39649478 5月前

    Your load_resource calls will fail because Package Control installs the package as "NetSuite Bundle", as indicated by this pull request. You can use sublime.load_resource('/'.join("Packages", __package__, "RecordTypes.json")).

    I don't undestand why you added this however and are not using "insert_snippet" anymore. Sublime Text should use whatever line endings are set for the currently edited file, unless it's https://github.com/SublimeTextIssues/Core/issues/858.

    点赞 评论 复制链接分享
  • weixin_39606638 weixin_39606638 5月前

    Thank you again for the suggestions.

    The reason why i removed end lines was because I was using JS files as templates and CR characters were being added to the view (probably because of the issue that you mentioned before). I researched a bit more and I'm now using snippets again as I think this is the best option.

    I also made the other required changes and created a new tag. Can you please check it again?

    Thank you!

    点赞 评论 复制链接分享
  • weixin_39649478 weixin_39649478 5月前

    Interesting. I discovered the issue from some default snippets that where using the .tmSnippet extension with CRLF linebreaks, but was unable to reproduce with .sublime-snippet files.

    点赞 评论 复制链接分享

相关推荐