1 min read

Vim as A SAS IDE

Few configurations (just copy this sas.vim file to C:\Program Files\vim\vim73\syntax if you also use gVIM 7.3 at Windows) to make Vim as a simple SAS IDE where

F3: run SAS codes (in batch mode)

F4: close other two windows (the current active window is Log window after F3 running; F4 jump to SAS file with full window)

F5: jump to SAS file

F6: jump to Log file

F7: jump to lst file (list output)

F8: keep only the current window (full window)


Details and Credits

  1. The first post on Vim and SAS I read is by Xiaowei Wang in Chinese.

The original SAS syntax file took from Zhenhuan Hu.

Kent Nassen also maintains some Vim functions to run SAS codes and check log.

  1. To run SAS codes using F3:

map :w:!SAS % -CONFIG “C:\Program Files\SAS\SASFoundation\9.2\nls\en\SASV9.CFG:sp  %<.lst:sp  %<.log

  1. Close other windows using F4:

map :close:close

  1. Keep only current window using F8:

map : only

  1. Jump to SAS file using F5:

map :e %<.sas

  1. Jump to Log file using F6:

map :e %<.log

  1. Jump to Lst file using F7:

map :e %<.lst