BookmarkSubscribeRSS Feed
rasmuslarsen
Obsidian | Level 7

 

I suggest that VIM keybindings are implemented in the SAS interactive development environments (like SAS base and SAS EG). 

 

VIM is great because it can make you a vastly more productive programmer. 

 

Here is an example of what it can do:

https://jaxbot.me/articles/why-i-use-vim

 

The following IDEs already have implemented optional VIM functionality (why not do the same in SAS):

Microsoft Visual Studio

Microsoft SQL Management Studio 

The Rstudio ( using this open source ressource http://ace.c9.io/#nav=about

The Pycharm IDE for Python

Sublime Text (general editor)

 

VIM modes for Chrome browser and Firefox also exists. 

 

 

PS

If this is not the place for feature suggestions I would appreciate a link in the right direction. If no place for feature suggestions exist i suggest that one is created. 

 

 

15 REPLIES 15
rasmuslarsen
Obsidian | Level 7
Thanks, I will move the post 🙂
rasmuslarsen
Obsidian | Level 7

Wait, I cant find "Software Ballot Ideas" where is it? 🙂

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Is this not covered by Abbreviations.  If you goto Tools->Add Abbreviation, you can type in a short phrase, say #sql, and this can be expanded directly to:

proc sql;

   create table ... as

   select   

   from 

   where

;

quit;

 

Don't get me wrong though, the "Enhanced Editor" really does need replacing with any one of the numerous editors out there.

rasmuslarsen
Obsidian | Level 7

The abbreviations is only a tiny part of what VIM can do, eg. the whole modal editing perspective.

 

 

Here is an answer on stackoverflow which explains more:  http://stackoverflow.com/a/1220118/1831980

ballardw
Super User

If I were pushing for a specific editor my particular choice would be the old IBM "Enhanced Programming Editor" that shipped with OS/2.

 

Stubs of code are minor compared to an editor macro that is flexible enough to play and win games of tic-tac-toe and do random selections from lists.

rasmuslarsen
Obsidian | Level 7

VIM is much more than stubs of code 🙂

 

Here is an answer on stackoverflow which explains more:  http://stackoverflow.com/a/1220118/1831980

rasmuslarsen
Obsidian | Level 7

You can do that in Vim as well. Here are examples games created using only Vim. Of course this is only for fun, but shows the power of Vim.

 
Arkanoid
Snake:
Tetris:
And of course do all sorts of selection. E.g. random or weighted random:

 

Patrick
Opal | Level 21

@rasmuslarsen

Just curious: When Googling SAS VIM there are hits. It's not official SAS released but have you tried any of these? And if yes: Anything working and adding value?

rasmuslarsen
Obsidian | Level 7

 

 

Some of the implementations are either syntax highlighting, code completetion or indentation, which is nice but they cannot run SAS code.

However, other implementations can run SAS code, but as far as I can see only in batch mode (I hope I'm wrong):

 

http://jiangtanghu.com/blog/2011/11/13/vim-as-a-sas-ide/

http://www-personal.umich.edu/~knassen/vim/sasfns.html#loadsaslog (unix mostly)

https://atom.io/packages/language-sas

 

gamotte
Rhodochrosite | Level 12

Hello,

 

https://communities.sas.com/t5/SASware-Ballot-Ideas/Edit-programs-in-an-external-editor/idi-p/220352

 

It seems that SAS EG, since release 7.12, allows to open a program in an external editor. From what I understand, you cannot

run the program from Vim but saved changes will prompt the same program opened in EG for reload.

ChrisBrooks
Ammonite | Level 13

A SAS program is just a text file so you can edit it in any text editor - my personal favourite is UltraEdit but each to their own (except I've never seen the attraction of vi - "It'll be nice when it's finished" has always been my reaction to it's arcane syntax...)

rasmuslarsen
Obsidian | Level 7

This discussion is about how to run SAS-code using Vim (or possibly Vim emulation in SAS Legacy), not just edit. 

Ultraedit looks great! And, yes, learning Vim syntax takes some time, but it is well worth it 🙂  

Here is a great explanation of Vim syntax:

https://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1...

rasmuslarsen
Obsidian | Level 7
Thanks! This could be a good workaround 🙂

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 15 replies
  • 4560 views
  • 5 likes
  • 7 in conversation