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
- 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.
- 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
- Close other windows using F4:
map
:close :close
- Keep only current window using F8:
map
: only
- Jump to SAS file using F5:
map
:e %<.sas
- Jump to Log file using F6:
map
:e %<.log
- Jump to Lst file using F7:
map
:e %<.lst