胖鸭 2011-03-18 05:56
浏览 319
已采纳

使用 VIM 的编程方案(球拍)-如何开始

recently, I started programming Racket (formerly Scheme) in DrRacket. I quite fast I began to miss all the features of VIM in DrRacket, so I would like to use VIM for my scheme(racket) programming.

I know that Emacs might be the best choice for intense lisp programming, but all I want is write a scheme(racket) file check syntax and then run it.

Unfortunately, I could not figure out, how to invoke "racket" in the commandline on a file to get it doing the same as DrRacket.

I am running Ubuntu 10.10 Maverick Meerkat, VIM 7.3 and I downloaded and installed Racket from the official website.

Help to get started would be very appreciated.

转载于:https://stackoverflow.com/questions/5352997/programming-schemeracket-with-vim-how-to-get-started

  • 写回答

3条回答 默认 最新

  • 狐狸.fox 2011-03-18 06:13
    关注

    If you just want to load a file into Racket on the command-line and run it, I think that this should work:

    $ racket -f file.scm -i
    

    The -i option would leave you at the REPL to test your code in file.scm.

    However, you might want to take a look at this blog post:

    http://technotales.wordpress.com/2007/10/03/like-slime-for-vim/

    You can set up a GNU screen session running the command-line Racket, and send s-expressions to it from Vim. There's a link to a bit of Vimscript which will make this automatic. I used this for a while with mit-scheme, and it was reasonably effective. It's not quite the as powerful as SLIME or DrRacket though. I just tested the steps described on OS X and it works with the command-line racket, it should work on Ubuntu, that's what I was using when I first used this method.

    You might also want to take a look at this:

    http://evalwhen.com/scmindent/index.html

    ... which has some information on better indentation in Vim for Lisp and Scheme code.

    I eventually switched to Emacs, but don't let the Vim haters get you down. Paul Graham supposedly uses vi and he's gotta be one of the top 5 most prominent Lisp programmers.

    http://paul.graham.usesthis.com/

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)
编辑
预览

报告相同问题?

悬赏问题

  • ¥15 HDL串口设计debug
  • ¥15 设计出USBDM硬件实物
  • ¥15 复现图像修复算法PD-GAN模型(基于概率多样性GAN)
  • ¥15 信息管理系统的排序和查找
  • ¥15 vscode请求各位指导
  • ¥50 有偿求qftp工具。能连接,下载文件,发送代码,windows环境,最好qt6 要qt creator写的
  • ¥70 刚刚看到一个人的网站居然是通过cname访问的
  • ¥15 逆置单链表输出不完整
  • ¥15 宇视vms-B200-A16@R启动不了,如下图所示,在软件工具搜不到,如何解决?(操作系统-linux)
  • ¥500 寻找一名电子工程师完成pcb主板设计(拒绝AI生成式答案)
手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部