

See more about editor abbreviations in this article. The custom abbreviation is presented along side all of the other built-in syntax suggestions. When I begin to type the alias I've assigned to the snippet, the program editor offers to complete it for me. To save on typing and mistakes, I've saved this as an editor abbreviation. The most common code snippet that I reuse is a LIBNAME statement that points to my project data.

Define abbreviations for commonly used code But if you must for some crazy reason, don't select this option and sign a pact with your teammates for the same.ģ. If you must retain the TAB characters.well, my main advice is do not rely on TAB characters in your code file. This option will change TAB characters to spaces when you open the program file. Replace tabs with spaces on file open - a perfect passive-aggressive option when working with team members who disagree with your TAB world view.Insert spaces for tabs - when you press the TAB key, don't add a TAB character but instead add the specified number of space characters.Default is 4, but I like to use 2 as it makes my program lines less wide. Tab size - width of a tab character, represented in number of spaces.Most code editors have options that support your choice, regardless of which camp you choose. Tabs or spaces? Your choice here can have a significant effect on your earning potential, and perhaps even on your love life. Go to Program → Editor Options and select "Show line numbers" to turn them on. So of course, you should have line numbers displayed in the program editor. The SAS log often uses line numbers to reference problems in WARNINGs and ERRORs. We programmers like to count lines of code. How many of these do you already know and use? 1.

Here are 10 program editor features that I've found essential while writing, editing, and debugging SAS programs. But we don't always take the time to explore as we should, so there might be a few golden nuggets of editor knowledge that have escaped you so far. If you spend a lot of time in SAS Enterprise Guide (as I do), you probably get to know its features pretty well.
