适用于Linux的与语言无关的正确制表代码编辑器? [英] Language-agnostic properly-tabbing code editors for Linux?

查看:73
本文介绍了适用于Linux的与语言无关的正确制表代码编辑器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个Linux文本编辑器来替换Textpad 4.7.3(一个Windows nagware应用程序),但是我尝试过的所有替代方法都是肿或不完整的.以下是我发现最重要的功能,按降序排列:

I need a Linux text editor to replace Textpad 4.7.3 (a Windows nagware app), but all the alternatives I've tried are either bloated or incomplete. Here are the features I find most important, in descending order:

  • 正则表达式在目录树中搜索,标记和替换(甚至在所有打开的文件中),正则表达式搜索
  • 带有 proper 键盘快捷键的标签编辑器([ctrl] + [tab]应该在与[alt] + [tab]完全相同的模型上工作)
  • 自动缩进,缩进保留和缩进操作(制表符,shift-tab)
  • 智能导航键:[home]在行的开始和非空白的开始之间切换,[F2]搜寻下一个书签,按下向上和向下箭头键将您带到上一次导航的列,不是您上次键入的位置(我认为Textpad是我看到过的唯一位置)
  • 语法突出显示(奖金:TextPad缺少的混合语言突出显示)
  • 块选择模式
  • 从程序(例如编译器)运行用户定义的命令,具有交互式命令结果(文本板可让您定义正则表达式以匹配文件名和行号,以便您可以双击错误并转到该行中文件.)
  • 工作区(同时打开文件的集合)
  • Regex search, mark, and replace (across all open files, even), regex search in directory trees
  • Tabbed editor with proper keyboard shortcuts ([ctrl]+[tab] should work on the exact same model as [alt]+[tab])
  • Auto-indent, indent preservation, and indent manipulation (tab, shift-tab)
  • Smart navigation keys: [home] toggles between start of line and start of non-whitespace, [F2] seeks to next bookmark, hitting the up and down arrow keys take you to the column where you last navigated, not where you last typed (I think Textpad's the only place I've seen this)
  • Syntax highlighting (bonus: mixed-language highlighting, which TextPad lacked)
  • Block select mode
  • Run user-defined commands from program (such as compilers), have interactive command results (Textpad would let you define regexes to match filenames and line numbers so you could double-click on an error and be taken to that line in that file.)
  • Workspaces (collections of files to be open at the same time)

这是我在尝试过的编辑器中发现的令人讨厌的内容:

Here's what I've found distasteful in the editors I've tried:

  • Vim和emacs 没有充分利用我的屏幕,鼠标和键盘.此外,还有一个相当的学习曲线–您必须学习一种全新的与键盘进行交互的方式. (当然,如果他们有我想要的一切,我会学习的.)
  • Gedit几乎是完美的,但它(像其中大多数一样)具有糟糕的制表符,这是无法忍受的
  • Eclipse是一个怪物,除非我正在使用Java,否则我不会碰它的.
  • 正则表达式功能极为罕见
  • 几乎没有最近浏览过的标签页
  • 我没有看到关于上一个导航列的游标的任何内容. (一旦我开始使用它,我发现我离不开它.)
  • Vim and emacs do not take full advantage of my screen, mouse, and keyboard. Also, there's have quite a learning curve -- you have to learn an entirely new way of interacting with the keyboard. (Of course, if they had everything I wanted, I would learn them.)
  • Gedit is almost perfect, but it (like most of them) has crappy tabbing, which is intolerable
  • Eclipse is a monstrosity, and I won't touch it unless I'm doing Java
  • Regex capability is frighteningly rare
  • Almost nothing has last-seen tab traversal
  • I've not seen anything with last-navigation-column cursor traversal. (Once I started using it I found I couldn't do without.)

我没有时间或没有建立我的理想编辑器"所需的专门知识,所以我希望那里的编辑者具有相同的品味,可能偶然发现了一颗宝石.

I don't have the time or the specific knowledge required to build my "ideal editor", so I'm hoping someone out there with the same taste in editors might have stumbled across a gem.

ETA:请不推荐您不是个人使用的编辑器.我听说过SciTE,Eclipse,gedit,medit,nedit,GVim,Gemacs,Kate,Geany,Gnotepad,ozeditor等.我敢肯定,其中大多数都具有我提到的某些功能.如果您不确定它是否具有必要的功能(例如ctrl-tab就像alt-tab一样工作),那么您并没有真正的帮助,对吗?

ETA: Please don't recommend an editor you haven't personally used. I've heard of SciTE, Eclipse, gedit, medit, nedit, GVim, Gemacs, Kate, Geany, Gnotepad, ozeditor, etc. I'm sure that most of them have some of the features I mentioned. If you're not sure if it has an essential feature (e.g. ctrl-tab works just like alt-tab), then you're not really helping, are you?

推荐答案

这里是jEdit的投票,我已经使用了大约5年了:

Here is a Vote for jEdit, which I have been using for about 5 years:

* Regex search mark, and replace (across all open files, even), regex

搜索目录树

是的,并且回引用包括整个比赛的$ 0

yup, and back references including $0 for the whole match

* Tabbed editor with proper keyboard shortcuts ([ctrl]+[tab]

应该在与相同的模型上工作 [alt] + [tab])

should work on the same model as [alt]+[tab])

多种显示缓冲区的方式,以及完全可自定义的键盘导航.我最常用的功能之一是返回到最后一个缓冲区",我已将其映射到F12

multiple ways of displaying buffers, and completely customizable keyboard navigation. One of my most used function is "go back to last buffer" which I have mapped to F12

* Auto-indent, indent preservation, and indent manipulation

(制表符,移位制表符)

(tab, shift-tab)

是的.您还可以将它们设置为制表符或空格,并在两者之间进行转换

Yup. You can also set these to be tabs or spaces and convert between the two

* Smart navigation keys: [home] toggles between start of line and

非空白开始,[F2]试图 下一个书签,上下打 箭头键将您带到专栏 您上次浏览的位置,而不是位置 您上次输入的时间(我认为Textpad是 我见过的唯一地方)

start of non-whitespace, [F2] seeks to next bookmark, hitting the up and down arrow keys take you to the column where you last navigated, not where you last typed (I think Textpad's the only place I've seen this)

一般预期的资产净值.将这些映射到您选择的密钥.如果将光标放在特定的列上并向上或向上翻页,则光标会停留在该列中

Generally expected nav. Map these to your key of choice. If you place the cursor at a particular column and page up or up arrow, the cursor stays put in that column

  • 突出显示语法(奖金: 混合语言突出显示 缺少TextPad)
  • Syntax highlighting (bonus: mixed-language highlighting, which TextPad lacked)

许多不同的语言和xml文件可用于自定义令牌匹配.一些混合,例如php + javascript

Many different languages with xml files to customize token matching. Some mixing for example php + javascript

* Block select mode

不,据我所知...等等!是的!在编辑->更多选择->矩形选择下.谢谢dwhall指出了这一点

Nope, not as far as I know...wait! Yup! Under Edit -> More Selection -> Rectangular Selection. Thanks dwhall for pointing that out

* Run user-defined commands from program (such as compilers), have

交互式命令结果(文本板 将让您定义正则表达式以匹配 文件名和行号,以便您 可以双击一个错误,然后 转到该文件中的那一行.)

interactive command results (Textpad would let you define regexes to match filenames and line numbers so you could double-click on an error and be taken to that line in that file.)

为此提供了许多插件,从完整的命令行控制台(在Linux和Windows中均可使用)到可以进行系统调用的BeanShell宏.许多用于常见任务的插件,例如ant,cc,make,svn等

Many plugins for this from a full command line console (works in linux and windows) to BeanShell macros that can make system calls. Many plugins for common taks such as ant, cc, make, svn etc

* Workspaces (collections of files to be open at the same time)

yup插件也是如此,jEdit还可以跟踪打开的文件,未保存的更改以及会话之间的光标位置

yup plugins for this too, and jEdit also keeps track of open files, unsaved changes and cursor position between sessions

这就是我发现令人反感的 我尝试过的编辑器:

Here's what I've found distasteful in the editors I've tried:

* Vim and emacs do not take full advantage of my screen, mouse, and

键盘.另外,还有一个 学习曲线. (当然,如果他们 拥有我想要的一切,我会学习 他们.)

keyboard. Also, there's quite a learning curve. (Of course, if they had everything I wanted, I would learn them.)

jEdit是一个Java程序,但仍然很好地利用了跨平台的剪贴板和拖放功能

jEdit is a java program but still makes good use of cross-platform clip boards and drag and drop

* Regex capability is frighteningly rare

jEdit具有我所见过的最佳正则表达式处理,正则表达式搜索可以返回多个结果grep样式,并且在搜索后添加或删除文本行时,结果位置不会引起混淆

jEdit has the best regex handling I've seen yet, Regex searches can return multiple results grep style and result positions aren't confused when you add or removes text lines after the search

* Almost nothing has last-seen tab traversal

就像我说过的,我最喜欢的功能之一是转到最后一个缓冲区"

Like I said one of my favorite features is "go to last buffer"

* I've not seen anything with last-navigation-column cursor

遍历

就像我说的那样,上下翻页时光标会停留在该列中

Like I said, your cursor stays put in the column when paging up and down

我喜欢的其他功能

  • 基于缩进的折叠:无需语法识别,只需在缩进上折叠
  • 并排Diff :精美的图形差异视图
  • 多种视图和拆分窗格
  • 使用beanshell进行宏录制
  • 缩写:我有2-3个简短的字母关键字,当我按下空格时会扩展为代码段
  • indent based folding: No syntax awareness necessary, simply fold on indent
  • side-by-side Diff: nice graphical difference view
  • multple views and split panes
  • macro recording with beanshell
  • abbreviations: I have short 2-3 letter keywords that expand to code snippets when I hit space

这篇关于适用于Linux的与语言无关的正确制表代码编辑器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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