适用于 Windows 的好文本编辑器?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/733170/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 12:16:45  来源:igfitidea点击:

Good text editor for Windows?

c++windowscompiler-constructiontext-editor

提问by hahuang65

I'm looking for a text editor, much like TextMate (www.macromates.com) on Mac, but I want it to have a built-in compiler.

我正在寻找一个文本编辑器,很像Mac 上的TextMate ( www.macromates.com),但我希望它有一个内置的编译器。

For example, I do not want an IDE like Visual Studio or Eclipse. I'm looking for an editor where I can click "Run" and it will compile my code and show me the results in a terminal.

例如,我不想要像 Visual Studio 或 Eclipse 这样的 IDE。我正在寻找一个编辑器,我可以在其中单击“运行”,它会编译我的代码并在终端中向我显示结果。

I know of a text editor, which is TextMate's sister application for Windows, but it does not have a built-in compiler. I also do not want to install Cygwin for g++/gcc.

我知道一个文本编辑器,它是 TextMate 的 Windows 姊妹应用程序,但它没有内置编译器。我也不想为 g++/gcc 安装 Cygwin。

回答by Daniel Rikowski

Notepad++

记事本++

It is based on Scintilla and is available under GPL.

它基于 Scintilla,可在 GPL 下使用。

Additionally I recommend downloading the MinGW port of GCC.

另外我建议下载GCCMinGW 端口

回答by Adam Hawes

VIM!!!

维姆!!!

And now I've had my VIM rant I'm going to rant some more.

现在我已经对 VIM 进行了咆哮,我要再多说几句。

TextMate doesn't have a built in compiler. I don't think you fully grok programming at any level yet. TextMate simply has "bundles" that are configured to call the Apple XCode tools. AFIK there are bundles for pretty much everything you can think of. Some things (like perl, python, etc) are installed on the base system with Mac.

TextMate 没有内置编译器。我认为您还没有完全了解任何级别的编程。TextMate 仅具有配置为调用 Apple XCode 工具的“捆绑包”。AFIK 有几乎所有你能想到的捆绑包。一些东西(如 perl、python 等)安装在 Mac 的基本系统上。

If you want a compiler on windows you'll either need the MS tools or Cygwin, MingW, Digital Mars (not free), etc. There is no such thing as an editor with a built in compiler - the compiler MAY have been bundled in a package with the editor/IDE however (Code::Blocks from memory packaged Mingw). I think you should try Cygwin since it comes with VIM and a compiler, just like you want.

如果你想要一个 Windows 上的编译器,你要么需要 MS 工具,要么需要 Cygwin、MingW、Digital Mars(不是免费的)等。没有内置编译器的编辑器这样的东西 - 编译器可能已经捆绑在然而,一个带有编辑器/IDE 的包(Code::Blocks from memory packaged Mingw)。我认为您应该尝试 Cygwin,因为它带有 VIM 和编译器,就像您想要的那样。

回答by l0st3d

It's going to be a steep learning curve, but have you tried Emacs? It contains all the features of text mate and an IDE, if you know where to look. You can compile code at the push of a button, but you may have a few other things to get used to (like Ctrl-s is search, not save by default - but you can configure that - you may want to look at cua modewhich will set some of the keys to the windows defaults ;)

这将是一个陡峭的学习曲线,但你试过Emacs吗?它包含文本伴侣和 IDE 的所有功能,如果您知道去哪里找的话。您只需按一下按钮即可编译代码,但您可能需要习惯其他一些东西(例如 Ctrl-s 是搜索,默认情况下不保存 - 但您可以配置它 - 您可能想要查看cua 模式这会将一些键设置为 Windows 默认值;)

回答by Unsliced

I use ewhich touts itself as TextMate for Windows- I wouldn't go quite that far, but it is good (it has the notion of bundles for different file types, lifted from TextMate).

我使用e将自己吹捧为 Windows 的 TextMate- 我不会走那么远,但它很好(它有不同文件类型的包的概念,从 TextMate 中提取)。

It isn't free, but it's been worth the license fee.

它不是免费的,但值得支付许可费。

回答by Gary Willoughby

I've always used EditPluson windows and found it to be excellent in every way!

我一直在 Windows 上使用EditPlus,发现它在各方面都非常出色!

alt text

替代文字

For Mac i use Smultron.

对于 Mac,我使用Smultron

回答by VonC

Scitecan be a good Windows alternative

Scite是一个很好的 Windows 替代品

alt text
(source: scintilla.org)

替代文字
(来源:scintilla.org

回答by Rad

Textpadis pretty good. In fact if it finds a java JDK installs it creates shortcut keys that allow you to compile and run applets and java applications

文本板很不错。事实上,如果它找到一个 Java JDK 安装,它会创建快捷键,允许您编译和运行小程序和 Java 应用程序

回答by Simon Steele

As much as I love to see more threads with Programmer's Notepad links, this topic has been covered loads of times on StackOverflow, here's a sampling:

尽管我喜欢看到更多带有程序员记事本链接的主题,但这个主题已经在 StackOverflow 上被多次提及,这里是一个示例:

Questions mentioning Notepad++

提到记事本++的问题

Questions mentioning Programmer's Notepad

关于程序员记事本的问题

As for getting compiling going, you can call your chosen toolchain in lots of different ways from most good text editors. If we say you want to do C++ development then at the most simple here is a set of steps you could take:

至于开始编译,您可以从大多数优秀的文本编辑器中以多种不同的方式调用您选择的工具链。如果我们说您想进行 C++ 开发,那么最简单的这里是您可以采取的一组步骤:

  1. Get Visual C++ Express(free) or MinGW
  2. Make a very simple makefile, something like the one below
  3. Set up a tool in your editor to call make in your file's current directory
  1. 获取Visual C++ Express(免费)或MinGW
  2. 制作一个非常简单的makefile,如下所示
  3. 在您的编辑器中设置一个工具以在您的文件的当前目录中调用 make
    test.exe: test.obj 
      link test.obj

    test.obj: test.cpp test.h
      cl -c test.cpp

回答by zzzuperfly

I don't get the "built in compiler" demand - as far as I know there is no universal compiler :)

我没有得到“内置编译器”的需求——据我所知没有通用编译器:)

UltraEditis not free but it has a plethora of different languages it supports.

UltraEdit不是免费的,但它支持多种不同的语言。