has anyone successfully got something like these vim functions to work ie to run your code and scan the log from vim?
http://www-personal.umich.edu/~knassen/vim/sasfns.html#LoadSASLogList
i run into many problems, including this:
https://stackoverflow.com/questions/19205572/vim-function-system-invalid-argument
i have tinkered with it a lot and gotten nowhere. Things would be a lot easier if i was using linux, but i'm stuck with windows. cheers
don't brag, we are all old here 🙂 i have been using sas for decades too
is it possible to move this thread from programming/developers to sas programming?
in the end i abandoned vim fuctions (for now) and just mapped a shortcut for command, like this: https://jiangtanghu.com/blog/2011/11/13/vim-as-a-sas-ide/ but i needed to tweek it eg https://communities.sas.com/t5/Administration-and-Deployment/sas-is-not-recognized-as-an-internal-or...
Windows has Linux embedded easily. Just use the built-in Linux. Better yet, use PowerShell and do whatever you want.
One example here (but you can do it in other ways too). Heck, you can also run a VM in Windows (free) and just install your own Linux distro:
How to run Linux Commands on Windows 10? - GeeksforGeeks
You can also run your phone apps in Windows.
thanks for this. Unfortunately it's a company computer, i can't do the things you describe, if i had that much freedom i would just use linux
I have vim installed (to my user folder), the problem is runnig sas code from vim, i don't want to step in and out of vim to run code etc
cheers
Let's be realistic, vim is old. You need a function that does x,y,z. Don't choose the technology, decide on the business need. If you need to search text, use SAS regex functions or call out to something that can do it like PowerShell or use C# which can do everything vim does (easily). You should also be able to do it in Python or a host of other options.
Also, look at PowerShell core which can run w/o installation. PowerShell should be able to do everything vim does except for some edge cases.
vim may be comfortable but branch out and what you need can be done w/o worrying about vim. There are much, much better alternatives today than 20-30 years ago.
@pmbrown wrote:
has anyone successfully got something like these vim functions to work ie to run your code and scan the log from vim?
http://www-personal.umich.edu/~knassen/vim/sasfns.html#LoadSASLogList
i run into many problems, including this:
https://stackoverflow.com/questions/19205572/vim-function-system-invalid-argument
i have tinkered with it a lot and gotten nowhere. Things would be a lot easier if i was using linux, but i'm stuck with windows. cheers
What is the problem you are trying to solve exactly?
Are you running PC SAS, that is do you have a full installation of SAS on your computer? If so then why not just use the editors that are part SAS Display Manager instead of trying to use ancient VIM editor?
Is SAS running remotely? Do you have access to SAS/Studio to interface with it?
" If so then why not just use the editors that are part SAS Display Manager instead of trying to use ancient VIM editor?"
i can see it is hard for non vim users to appreciate why someone wants to use vim, but i don't want to get into that, let's just say vim is very powerful etc etc
anyway, this looks promising: https://github.com/exaatto/vim-sas
the vim extensions are never good. i used the vim extension for sublime for a while, in the end they are always a poor approximation. i wouldn't go near vs code, each to his own
@pmbrown "i wouldn't go near vs code" - Well VS Code is the only third-party IDE supported by SAS with SAS-supplied extensions
i realise it's hard for non vim users to understand why some ppl use vim, but here is someone trying to explain it:
"My preference for emacs boils down to the fact that it doesn't force me to use a mouse. A mouse is a pseudoanalog device that suffers from all the control-theory anomalies like overshoot and oscillation, plus lack of haptic confirmation. Using the mouse forces my hands off the home row, forces my eyes off my cursor (to the target of a gesture). The mouse and all its control-theory ephemera are a source of sheer agony. They cause me to hate my computer and to tire quickly from any use of it. Emacs, however, lets me focus my mind, keep my hands in an efficient pose, lets me look at my work, gives me digital feedback (press a physical keyboard button, see a result, no overshoot and oscillation) and enables longer hours in a state of pleasant flow. It's not Emacs specifically, but any computer tool that helps me avoid mousing. Along with mousing goes all those proprietary binary formats for documents: anything but ASCII (or, begrudgingly, UTF-8) must be banned. Long-live Emacs, org-mode, org-table, org-babel, LaTeX, git, and everything that can be represented in plain text. There is a special ring in Dante's inferno for the inventor of the mouse and for the legions of GUI designers that built all the World's software around it." https://old.reddit.com/r/emacs/comments/r1s3k2/lex_fridman_and_neal_stephenson_talking_about/
no one is asking anyone to agree, this is just how some people feel
@pmbrown - I appreciate your opinion and each to their own.
Please be aware that SAS 9.4 is now in maintenance mode and in the process of being superceded by SAS Viya. Full support of SAS 9.4 ends in 2025, unless you upgrade to SAS 9.4M8 due out shortly. So your vim - SAS 9.4 interface has a limited lifespan. VS Code works with SAS Viya and I guess other IDEs might be supported in the future, maybe even one where a mouse isn't essential...
thanks a lot for the info. The vim solution should work with the 9.4 upgrade though? I would move to R to be honest, i love sas and have been using it forever, but i would switch in 2025 if i had to. A lot of the branding sas is doing now is putting me off, 'advanced analytics' etc
@pmbrown - Correct, the SAS 9.4 M8 upgrade is essentially a maintenance release without major changes and vim should still work with it.
The vim extensions are also regularly updated so things may have changed. To outright dismiss VS Code, free and open source, is amazing to me. Even a lot of noMS people use it including a lot of devs outside of the MS ecosystem (python is an example). Powershell is open source, C# is open source, on and on. All run on Linux and Macs.
If people don't want the suggestions, they will just have to muddle away. As a SAS consultant for decades, and the former MS consultant at SAS, I have faced a LOT of anti-MS sentiment. Even when proven wrong, again and again, they hate MS like it was the 1990s, not the modern MS.
Good luck with your vim problem. Nothing I can offer. I would probably have more sympathy for ISPF but each to their own.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.