Linux 的文本编辑器(除了 Vi)?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2898/
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-08-03 16:19:03  来源:igfitidea点击:

Text Editor For Linux (Besides Vi)?

linuxeditor

提问by CodingWithoutComments

Let me preface this question by saying I use TextMate on Mac OSX for my text needs and I am in love with it. Anything comparable on the Linux platform? I'll mostly use it for coding python/ruby.

让我先说这个问题,我在 Mac OSX 上使用 TextMate 来满足我的文本需求,并且我爱上了它。Linux平台上有什么可比的吗?我将主要使用它来编码 python/ruby。

Doing a google search yielded outdated answers.

进行谷歌搜索产生过时的答案。

Edit: Since there has been some concern about the 'merit' of this question. I am about to start a new Ruby Programming Project in Linux and before I got started I wanted to make sure I had the right tools to do the job.

编辑:由于有人担心这个问题的“优点”。我即将在 Linux 中开始一个新的 Ruby 编程项目,在开始之前,我想确保我有合适的工具来完成这项工作。

Edit #2: I use VIM on a daily basis -- all . the . time. I enjoy using it. I was just looking for some alternatives.

编辑 #2:我每天都使用 VIM——所有 . 这 。时间。我喜欢使用它。我只是在寻找一些替代品。

采纳答案by Mike Stone

Emacs is a wonderful text editor. It has huge power once you become a power user. You can access a shell, have as many files open as you want in as many sub-windows and an extremely powerful scripting support that lets you add all kinds of neat features.

Emacs 是一个很棒的文本编辑器。一旦您成为高级用户,它就会拥有巨大的力量。您可以访问 shell,在任意数量的子窗口中打开任意数量的文件,以及极其强大的脚本支持,让您可以添加各种简洁的功能。

I have been using a ruby-mode which adds syntax highlighting and whatnot to ruby, and the same exists for every major language.

我一直在使用 ruby​​ 模式,它为 ruby​​ 添加了语法突出显示和诸如此类的东西,并且每种主要语言都存在同样的情况。

If you keep at it, you can use exclusively the keyboard and never touch the mouse, which increases your editing speed by a significant margin.

如果你坚持下去,你可以只使用键盘而不用触摸鼠标,这会大大提高你的编辑速度。

If you want to start with something a lot more basic though, gedit is nice... it has built in syntax highlighting as well for most languages based on the filename extension. It comes with the OS as well (though emacs you can easily install with apt-get or some similar package finder utility).

如果你想从更基本的东西开始,gedit 很好......它内置了语法突出显示以及基于文件扩展名的大多数语言。它也随操作系统一起提供(尽管您可以使用 apt-get 或一些类似的包查找器实用程序轻松安装 emacs)。

UPDATE: I think gedit is exclusively GUI based though, so it would be useful to learn emacs in case you are stuck with just a shell (it is fully featured in both shell and graphical mode).

更新:我认为 gedit 是完全基于 GUI 的,所以如果你只使用 shell(它在 shell 和图形模式下都具有完整功能),学习 emacs 会很有用。

FURTHER UPDATE: Just FYI, I am not trying to push Emacs over Vim, it's just what I use, and it's a great editor (as I'm sure Vim is too). It is daunting at first (as I'm sure Vim is too), but the question was about text editors on Linux besides vi... Emacs seems the logical choice to me, but gedit is a great simple text editor with some nice features if that's all you are looking for.

进一步更新:仅供参考,我并不是想将 Emacs 推到 Vim 之上,这正是我所使用的,而且它是一个很棒的编辑器(因为我确信 Vim 也是如此)。起初令人生畏(因为我确信 Vim 也是如此),但问题是关于 Linux 上的文本编辑器,除了 vi... Emacs 对我来说似乎是合乎逻辑的选择,但 gedit 是一个非常简单的文本编辑器,具有一些不错的功能如果这就是你要找的。

回答by Matthew Schinckel

I use pico or nano as my "casual" text editor in Linux/Solaris/etc. It's easy to come to grips with, and whilst you lose a couple of rows of text to the menu, at least it's easy to see how to exit, etc.

我在 Linux/Solaris/etc 中使用 pico 或 nano 作为我的“休闲”文本编辑器。它很容易掌握,虽然您在菜单中丢失了几行文本,但至少很容易看到如何退出等。

You can even extend nano, I think, and add syntax highlighting.

我认为您甚至可以扩展 nano,并添加语法突出显示。

回答by Tim Trueman

The best I've found is gedit unfortunately. Spend a few hours with it and you'll discover it's not so bad, with plugins and themes. You can use the command line to open documents in it.

不幸的是,我发现的最好的是 gedit。花几个小时使用它,你会发现它并没有那么糟糕,有插件和主题。您可以使用命令行打开其中的文档。

回答by Thejesh GN

I use SciTEvery small and simple text editor.

我使用SciTE非常小而简单的文本编辑器。

回答by Thejesh GN

+1 for pico/nano -- lightweight, gets the job done, good help

pico/nano +1 - 轻量级,完成工作,很好的帮助

回答by grom

Kate, the KDE Advanced Text Editor is quite good. It has syntax highlighting, block selection mode, terminal/console, sessions, window splitting both horizontal and vertical etc.

Kate,KDE 高级文本编辑器相当不错。它具有语法高亮、块选择模式、终端/控制台、会话、水平和垂直窗口拆分等。

回答by Conrad Halling

On Mac OS X, I have used BBEdit since the early 1990's, so I use that as my reference for all other editors. I sometimes use BBEdit to edit files on a Linux box using ftp mode, and that works very well if you have a fast network connection to the Linux box.

在 Mac OS X 上,我从 1990 年代初期开始使用 BBEdit,因此我将其用作所有其他编辑器的参考。我有时会使用 BBEdit 使用 ftp 模式在 Linux 机器上编辑文件,如果您的 Linux 机器具有快速的网络连接,这会非常有效。

I learned emacs two years ago because the rest of the programming team I joined uses it. I find emacs powerful but annoyingly old-fashioned in many ways, but once you have learned emacs, you can use it on any platform (Linux, OS X, Windows). This is the editor I use almost exclusively at work now. It is going to take me years to master all its features, though.

两年前我学习了 emacs,因为我加入的其他编程团队都在使用它。我发现 emacs 功能强大但在很多方面都过时了,但是一旦你学会了 emacs,你就可以在任何平台(Linux、OS X、Windows)上使用它。这是我现在几乎只在工作中使用的编辑器。不过,我需要数年时间才能掌握它的所有功能。

I have also used gedit on Linux and found it very usable, but I haven't tried to use it as my primary editor for any project.

我也在 Linux 上使用过 gedit 并发现它非常有用,但我没有尝试将它用作任何项目的主要编辑器。

I have a colleague at work who uses Komodo Edit 4.4 (free from activestate.com), running it on a Windows computer but using it in ftp mode so she can edit files on our Linux server. Komodo Edit has many nice features, but it takes a looonnnggg time to launch the first time.

我有一个同事在工作,她使用 Komodo Edit 4.4(从 activestate.com 免费提供),在 Windows 计算机上运行它,但在 ftp 模式下使用它,这样她就可以在我们的 Linux 服务器上编辑文件。Komodo Edit 有很多不错的功能,但是第一次启动需要很长时间。

回答by Federico Builes

You can try Emacs with ruby-mode, Rinari(for Rails) and yasnippetwhich provides automatic snippets like Textmate.

您可以尝试使用带有 ruby​​-mode、Rinari(用于 Rails)和yasnippet 的 Emacs,它们提供像 Textmate 这样的自动片段。

回答by Armandas

When I searched for TextMate alternative for Linux, I ended up using Geany. It's not as powerfull, but still nice to work with. Great replacement for Kate.

当我为 Linux 搜索 TextMate 替代品时,我最终使用了Geany。它没有那么强大,但仍然很好用。凯特的绝佳替代品。