适用于 Linux 的轻量级 IDE
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2756/
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
Lightweight IDE for Linux
提问by Mario Marinato
Even though I have a robust and fast computer (Pentium Dual Core 2.0 with 2Gb RAM), I'm always searching for lightweight software to have on it, so it runs fast even when many apps are up and running simultaneously.
即使我有一台强大而快速的计算机(带有 2Gb RAM 的奔腾双核 2.0),我一直在寻找轻量级软件来安装它,因此即使许多应用程序同时启动并运行,它也能快速运行。
On the last few weeks I've been migrating gradually to Linux and want to install a free lightweight yet useful IDE to program on C++ and PHP. Syntax highlighting and code completion tips are must-haves.
在过去的几周里,我一直在逐渐迁移到 Linux,并希望安装一个免费的轻量级但有用的 IDE 来在 C++ 和 PHP 上编程。语法高亮和代码完成技巧是必备的。
回答by num1
emacs has been used by linux programmers for decades. It features syntax highlighting, it's fast, and there are a million tutorials out there you can find.
emacs 已经被 Linux 程序员使用了几十年。它具有语法突出显示功能,速度很快,并且您可以找到一百万个教程。
回答by sparkes
any of the popular editors can be turned into an ide.
任何流行的编辑器都可以变成一个ide。
I use Vi on the console and have used various gui editors over the years. This doesn't just go for linux I use Crimson Editor on windows as a C/python/z80asm ide.
我在控制台上使用 Vi 并且多年来使用过各种 gui 编辑器。这不仅适用于 linux 我在 windows 上使用 Crimson Editor 作为 C/python/z80asm ide。
回答by Joey deVilla
I bounce about between Mac, Windows and Ubuntu and while Emacs used to be my editor of choice, I'm finding that in my old age I prefer to something GUI-based (using command-line for the shell is still fine by me). My preferred editor is Komodo Edit, which the advantages of:
我在 Mac、Windows 和 Ubuntu 之间跳来跳去,虽然 Emacs 曾经是我选择的编辑器,但我发现在我晚年时我更喜欢基于 GUI 的东西(使用命令行作为 shell 对我来说仍然很好) . 我首选的编辑器是Komodo Edit,它的优点是:
- Being free (as in beer)
- Available for Mac, Windows and Linux
- Syntax highlighting for a boatload of languages, including C++ and PHP (I'm using it for Ruby, Python and PHP myself)
- Code completion, even for classes I defined myself
- Ability to "remote save" via FTP, SFTP or SCP
- Support for organizing your files into projects
- Tabs and other interface niceties
- 自由(如啤酒)
- 适用于 Mac、Windows 和 Linux
- 大量语言的语法高亮显示,包括 C++ 和 PHP(我自己将它用于 Ruby、Python 和 PHP)
- 代码完成,即使是我自己定义的类
- 能够通过 FTP、SFTP 或 SCP“远程保存”
- 支持将文件组织到项目中
- 标签和其他界面细节
I'm not sure how lightweight it is, but it certainly feels snappier than Eclipse!
我不确定它有多轻,但它确实比 Eclipse 感觉更快捷!
回答by Mario Marinato
Joey, I believe anything is lighter than Eclipse! :o)
乔伊,我相信任何东西都比 Eclipse 轻!:o)
回答by mreggen
Vim(or Emacs varying on religion) will always be my first answer to this question, over any point-and-click IDE. As they write in The Pragmatic Programmer
Vim(或因宗教而异的 Emacs)将永远是我对这个问题的第一个答案,在任何点击式 IDE 上。正如他们在The Pragmatic Programmer 中所写
Choose an editor, know it thoroughly, and use it for all editing tasks. [...] The editor will be an extension of your hand; the keys will sing as they slice their way through text and thought. That's our goal.
Make sure that the editor you choose is available on all platforms you use.
选择一个编辑器,彻底了解它,并将其用于所有编辑任务。[...] 编辑器将是您手的延伸;当它们切开文本和思想时,这些键会唱歌。这就是我们的目标。
确保您选择的编辑器在您使用的所有平台上都可用。
Vim is configurable, extensible, programmable and can be turned into an IDE with all the regular features. Lately I've been using Eclimto "bring Eclipse functionality to the Vim editor" (projects, better java support etc.) making it a complete platform with advanced IDE features.
Vim 是可配置的、可扩展的、可编程的,并且可以变成具有所有常规功能的 IDE。最近,我一直在使用Eclim来“将 Eclipse 功能引入 Vim 编辑器”(项目、更好的 Java 支持等),使其成为具有高级 IDE 功能的完整平台。
回答by codemac
If you are taking your time switching to linux, I'd switch to emacs or vim at some point as well. There will always be a resource or a document describing exactlythe problem you are having with either of them, and generally a solution is just a few more clicks down the road.
如果您正在花时间切换到 linux,我也会在某个时候切换到 emacs 或 vim。总会有资源或文档准确描述您在使用它们中的任何一个时遇到的问题,通常只需点击几下即可获得解决方案。
Emacs may be easier at the beginning because of modeless editing... but don't let modal editing scare you away from Vim.
由于无模式编辑,Emacs 一开始可能会更容易……但是不要让模式编辑吓到您远离 Vim。
The key with either Vim or Emacs is knowing it could probably take you the better part of the day just to figure out what you want them to do, let alone how to get them to do that.
Vim 或 Emacs 的关键是知道它可能需要你一天中的大部分时间来弄清楚你想让他们做什么,更不用说如何让他们这样做了。
Once they work for you though, you'll see why mostly everyone is in one of two camps.
但是,一旦他们为您工作,您就会明白为什么大多数人都在两个阵营之一。
General hints:
一般提示:
- Setting up a Makefile for your project is almost always worth it.
- Using cscope and or ctags will make your life easier.
- 为您的项目设置 Makefile 几乎总是值得的。
- 使用 cscope 和或 ctags 将使您的生活更轻松。
Vim hints:
Vim 提示:
- :make
- :cn, :cp
- OmniCompletion
- using BufRead autoloads to set what :make should do depending on file type
- :制作
- :cn, :cp
- 全方位完成
- 使用 BufRead 自动加载来设置 :make 应该根据文件类型执行的操作
Emacs hints:
Emacs 提示:
- ecb is fun
- M-x dired
- M-. M-, M-* M-x complete-tag for etags
- M-x compile
- (add-hook 'mylanguage-mode-hook '(lambda () (setq my-customizations t)))
- ecb 很有趣
- Mx 导演
- M-。M-, M-* Mx 完整标签用于 etags
- 编译
- (add-hook 'mylanguage-mode-hook'(lambda() (setq my-customizations t)))
And check out other people's customizationsfor examples of what other people do.
并查看其他人的自定义设置以了解其他人的行为示例。
回答by Adam Lassek
I'm not sure exactly what you mean by 'lightweight,' but here are a few popular IDEs for linux:
我不确定你所说的“轻量级”到底是什么意思,但这里有一些流行的 Linux IDE:
Anjutafor Gtk/Gnome
KDevelopor Quantafor KDE
CodeBlocksruns on Windows/Mac/Linux and is written in C++
Anjutafor Gtk/Gnome
KDevelop或Quantafor KDE
CodeBlocks在 Windows/Mac/Linux 上运行并用 C++ 编写
None one of these are Java, so they automatically have an edge over Eclipse for performance ;)
这些都不是 Java,因此它们在性能方面自动优于 Eclipse ;)
Another option is MonoDevelop, which is geared towards .Net/Gtk# programming but also includes C++ support.
另一种选择是MonoDevelop,它面向 .Net/Gtk# 编程,但也包括 C++ 支持。
回答by Zoran Loncarevic
Console editors, such as emacsand vi, are more lightweight than their GUI counterparts, and (at least those two are) just as capable as any other IDE (syntax highlighting, mouse support, ctags, autocompletion ... all the way to gdb integration). The learning curve might be somewhat steep, and you might have to do some customization, but its all worth it. Also, vi is present on every installation of unix-like operating system.
控制台编辑器,例如emacs和vi,比它们的 GUI 对应物更轻量级,并且(至少这两个是)与任何其他 IDE 一样强大(语法突出显示、鼠标支持、ctags、自动完成......一直到 gdb一体化)。学习曲线可能有些陡峭,您可能需要进行一些自定义,但这一切都是值得的。此外,vi 存在于每个类 Unix 操作系统的安装中。
Amongst X applications, there are
在 X 应用程序中,有
geditwhich comes with GNOME and has many of these IDE features (see, for example, this blog entry),
Geany- really fast, depends only on GTK, and with even more features including code folding.
These would be lightweight IDEs, as opposed to heavyweights like Anjuta, KDevelop, Eclipseor NetBeans.
这些将是轻量级 IDE,而不是像Anjuta、KDevelop、Eclipse或NetBeans这样的重量级 IDE 。