问题描述
我碰巧知道单的,有没有emacs的使用它来运行REPL CSHARP模式在一个窗口和编译/运行在另一个窗口中的C#代码就像巨蟒模式?
I happen to know mono's CSharpRepl, are there emacs csharp mode that use this to run REPL in one window, and compile/run the C# code in the other window just like python mode?
推荐答案
您可以只创建一个Lisp函数调用CSharpRepl并指派一键调用它,当你在C#代码工作。例如,你可以把你的Emacs初始化文件中有如下(假设CSharpRepl可执行文件CSHARP在PATH):
You could just create a lisp function to call the CSharpRepl and assign a key to call it when you're working on C# code. For example, you could put the following in your Emacs init file (assuming the CSharpRepl executable "csharp" is in your PATH):
(defun csharp-repl ()
"Open a new side-by-side window and start CSharpRepl in it."
(interactive)
(split-window-side-by-side)
(other-window 1)
(comint-run "csharp"))
(global-set-key [f11] 'csharp-repl)
所以,如果你正在编辑一个C#程序(使用你喜欢的任何方式),你现在可以按F11和CSharpRepl将在新窗口中打开,以便您可以交互地评估C#代码。
So, if you're editing a C# program (using whatever mode you prefer), you can now press F11 and the CSharpRepl will open up in a new window so that you can interactively evaluate C# code.
这篇关于CSharpRepl emacs的整合?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!