Language-agnostic properly-tabbing code editors for Linux?

前端 未结 13 1696
-上瘾入骨i
-上瘾入骨i 2021-02-03 14:49

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

相关标签:
13条回答
  • 2021-02-03 15:10

    notepad++ is full featured, I use it for all languages, all the time!

    It's on windows but apparently it can be run on linux using WINE http://notepad-plus.sourceforge.net/uk/nppLinux.php

    0 讨论(0)
  • 2021-02-03 15:11

    jEdit might be what you're looking for. Out of the box it has quite a bit of what you're looking for, and all the rest can likely be found in the large collection of plugins available.

    0 讨论(0)
  • 2021-02-03 15:14

    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
    

    search in directory trees

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

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

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

    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
    

    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

    • Syntax highlighting (bonus: mixed-language highlighting, which TextPad lacked)

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

    * Block select mode
    

    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.)

    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 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 is a java program but still makes good use of cross-platform clip boards and drag and drop

    * Regex capability is frighteningly rare
    

    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
    

    traversal

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

    Other features I like:

    • 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
    0 讨论(0)
  • 2021-02-03 15:18

    Have you tried scite?

    http://www.scintilla.org/SciTE.html

    Your distro might already have a package for it.

    I believe there was a plugin that could add projects, but I can't remember it off the top of my head. I'm not sure about being able to double-click on errors to jump to the line.

    0 讨论(0)
  • 2021-02-03 15:21

    I just installed Geany based on Kknd's post and it is SWEET.

    I recently jumped from Mac to Linux (Ubuntu), and have been missing BBEdit. After months of bouncing back and forth between gvim and gedit and finding jedit kinda clunky, I believe Geany is the answer for me. Totally intuitive out of the box, lots of goodies when you start digging.

    Not sure if it gets an A on the phyzome test, but certainly an A-minus:

    Fully configurable syntax/color themes -- I just installed a dark theme created by Barry Van, but you can create your own if you want. Have to admit I'd never thought about mixed-language highlighting as a real possibility, so not sure about that one.

    Multifile search, regex.

    Directional and historical tab navigation.

    Great auto-indent options (different brace modes, tabs vs spaces, you can even edit with tabs and have it autoconvert to spaces on save!)

    I honestly don't think about "smart navigation keys" too much (beyond the basics), so can't really speak for that, but it does seem to have a lot of config options for keyboard shortcuts..?

    Haven't looked into block-select mode yet, but Kknd says it's in there.

    Run/Compile controls, Virtual Terminal Emulator for running commands.

    Workspaces... doh! Maybe not. It does have a documents sidebar.. maybe there's a workspaces plugin somewhere?? "Add a couple things" is still way better than "build from scratch" ;)

    0 讨论(0)
  • 2021-02-03 15:22

    Have you tried Kate? I'm not sure it complies with all your requirements, but it may. Also, for a more development oriented tool, you could try KDevelop, whose default editor is Kate (but you can change for any other editor implementing the KTextEditor interface)

    0 讨论(0)
提交回复
热议问题