VIM编程方案(球拍)-如何开始 [英] Programming Scheme(Racket) with VIM - How to get started

查看:90
本文介绍了VIM编程方案(球拍)-如何开始的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我开始在DrRacket中编程Racket(以前称为Scheme). 我很快就开始错过DrRacket中VIM的所有功能,所以我想 在我的方案(机架)编程中使用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.

我知道Emacs可能是进行密集Lisp编程的最佳选择,但是所有 我想要的是编写一个scheme(racket)文件检查语法,然后运行它.

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.

不幸的是,我不知道如何在命令行中调用"racket" 在文件上执行与DrRacket相同的操作.

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

我正在运行Ubuntu 10.10 Maverick Meerkat,VIM 7.3,并下载了 从官方网站安装了Racket.

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.

推荐答案

如果您只想在命令行上将文件加载到Racket中并运行它,我认为这应该可行:

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

-i选项将使您处于REPL状态,以便在file.scm中测试您的代码.

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/

您可以设置运行命令行Racket的GNU屏幕会话,并从Vim向其发送s表达式.有一个指向Vimscript的链接,它将使此过程自动进行.我在mit-scheme上使用了一段时间,它是相当有效的.但是它不像SLIME或DrRacket那样强大.我刚刚测试了OS X上描述的步骤,它可以与命令行球拍一起使用,它应该可以在Ubuntu上使用,这就是我第一次使用此方法时使用的方式.

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

...,其中包含有关在Vim中为Lisp和Scheme代码提供更好的缩进的信息.

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

我最终改用了Emacs,但不要让讨厌Vim的人失望.保罗·格雷厄姆(Paul Graham)应该使用vi,他必须成为Lisp最著名的5位程序员之一.

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/

这篇关于VIM编程方案(球拍)-如何开始的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆