Giter Club home page Giter Club logo

sas's Introduction

SAS Package for Sublime Text

A fork of RPardee's SAS programming package (.tmlanguage and .YAML-tmlanguage), developed in Sublime Text 3. Focused on SAS's PROC SQL and MACRO language, because that's where I spend 90% of my time.

If you have any syntax highlighting problems, please don't hesitate to submit an issue with sample code.

As of 2017-02-05, development will use sublime-syntax instead of YAML-tmlanguage/tmlanguage.

USAGE PATTERNS THAT DIFFER FROM ORIGINAL RPARDEE REPOSITORY

  • Unlike the SAS coding-style implicitly expected in RPardee's repository, my personal preference is to exclude spaces before semi-colons. It's very likely that my regex patterns fail to allow for an optional space before a semi-colon. Sorry about that!
  • At least in SAS EG, if a PROC SQL step is opened in a macro, then unless a QUIT is issued before the macro terminates, SAS' status will just show a "running" until you issue a STOP PROCESS. Heaven knows what SAS chooses to do in a scheduled process with a macro or or data step like that. Because of that, the scoping here requires that DATA step ends with RUN and PROC SQL (and other procs) end with QUIT.
  • I've limited DATA step's begin-capture scope, I don't use data step or the specialized PROCs enough to have seen any problems resulting from this.

Other useful packages I use in conjunction with this

  • I disable Sublime Text's default SQL syntax and instead use customized/expanded SQL syntax highlighting my fork of tosher's TSQLEasy. That allows me to minimize SQL-syntax additions within this SAS syntax
  • The macro "do" block (if/else/else if...then do) is MUCH easier to work with after installing FacelessUser's BracketHighlighter package. My SAS-specific additions are in my Sublime Setup repo under bh_core.sublime-settings

WishList

  • "metamacro": beginning match still does not capture across line breaks.
    • (?s:(?i:((%)(macro\b\s+)([A-Za-z0-9_]+\b)?(.+?)(;)))) SHOULD work
    • Instead, Sublime throws "Error in regex: undefined group option in regex (?s:(?i:((%)(macro\b\s+)([A-Za-z0-9_]+\b)?(.+?)(;))))"
  • For all patterns included in "sas-stuff", Separate out these keywords between allowed in datastep vs. in opencode. Scope those separately, then do some push/pop to only do syntax highlighting for SAS functions if they are within %sysfunc().

sas's People

Contributors

kaiser-roy avatar friedegg avatar rpardee avatar nlindner avatar jakob-stoeck avatar ngr-t avatar ankitdhingra avatar jackstat avatar gaulinmp avatar marks avatar richarddunks avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.