perhaps? 2011-03-18 13:56 采纳率: 100%
浏览 223
已采纳

使用 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条回答 默认 最新

  • YaoRaoLov 2011-03-18 14: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 使用C#,asp.net读取Excel文件并保存到Oracle数据库
  • ¥15 C# datagridview 单元格显示进度及值
  • ¥15 thinkphp6配合social login单点登录问题
  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 虚心请教几个问题,小生先有礼了
  • ¥30 截图中的mathematics程序转换成matlab