dte text editor
dte text editor
A small and easy to use console text editor.
Features
- Multiple buffers/tabs
- Unlimited undo/redo
- Regex search and replace
- Syntax highlighting
- Customizable color schemes
- Customizable key bindings
- Support for all xterm Ctrl/Alt/Shift key codes
- Command language with auto-completion
- Unicode 12.1 compatible text rendering
- Support for multiple encodings (using iconv)
- Jump to definition (using ctags)
- Jump to compiler error
- EditorConfig support
Screenshot

Installing
dte can be installed via package manager on the following platforms:
| OS | Install command |
|---|---|
| Debian Testing | apt-get install dte |
| Arch Linux (AUR) | $AUR_HELPER -S dte |
| Void Linux | xbps-install -S dte |
| FreeBSD | pkg install dte |
| OpenBSD | pkg_add dte |
| NetBSD (pkgsrc) | pkg_add dte |
| OS X (Homebrew) | brew tap yumitsu/dte && brew install dte |
| Android (Termux) | pkg install dte |
Building
To build from source, first install the following dependencies:
- GCC 4.6+ or Clang
- GNU Make 3.81+
- terminfo library (may be provided by ncurses, depending on OS)
- iconv library (may be included in libc, depending on OS)
- POSIX-compatible
shandawk
...then download and unpack the latest release tarball:
curl -LO https://craigbarnes.gitlab.io/dist/dte/dte-1.9.1.tar.gz
tar -xzf dte-1.9.1.tar.gz
cd dte-1.9.1
...and compile and install:
make -j8 && sudo make install
Documentation
After installing, you can access the documentation in man page format via man 1 dte, man 5 dterc and man 5 dte-syntax.
Default Key Bindings
Editor
- Alt+x
- Enter command mode (see
dtercfor available commands) - Ctrl+q
- Quit editor (use
quit -fin command mode to quit with unsaved buffers) - Alt+z
- Suspend editor (resume by running
fgin the shell)
Buffer
- Ctrl+n, Ctrl+t
- Open new, empty buffer
- Ctrl+o
- Open file (prompt)
- Ctrl+s
- Save current buffer
- Ctrl+w
- Close current buffer
- Alt+1, Alt+2 ... Alt+9
- Switch to buffer 1 (or 2, 3, 4, etc.)
- Alt+0
- Switch to last buffer
- Alt+,
- Switch to previous buffer
- Alt+.
- Switch to next buffer
Navigation
- Alt+b
- Move cursor to beginning of file
- Alt+e
- Move cursor to end of file
- Ctrl+l
- Go to line (prompt)
- Ctrl+f, Alt+/
- Find text (prompt)
- Ctrl+g, F3
- Find next
- F4
- Find previous
- Alt+f
- Find next occurence of word under cursor
- Alt+Shift+f
- Find previous occurence of word under cursor
Selection
- Shift+left, Shift+right
- Select one character left/right
- Ctrl+Shift+left, Ctrl+Shift+right
- Select one word left/right
- Shift+up, Shift+down
- Select to column above/below cursor
- Ctrl+Shift+up, Ctrl+Shift+down
- Select one whole line up/down
- Alt+Shift+left, Shift+Home
- Select from cursor to beginning of line
- Alt+Shift+right, Shift+End
- Select from cursor to end of line
- Shift+Page Up, Alt+Shift+up
- Select one page above cursor
- Shift+Page Down, Alt+Shift+down
- Select one page below cursor
- Ctrl+Shift+Page Up, Ctrl+Alt+Shift+up
- Select whole lines one page up
- Ctrl+Shift+Page Down, Ctrl+Alt+Shift+down
- Select whole lines one page down
- Tab, Shift+Tab
- Increase/decrease indentation level of selected (whole) lines
Editing
- Ctrl+c
- Copy selection (or line)
- Ctrl+x
- Cut selection (or line)
- Ctrl+v
- Paste previously copied or cut text
- Ctrl+z
- Undo last action
- Ctrl+y
- Redo last undone action
- Alt+j
- Wrap paragraph under cursor to value of
text-widthoption (72 by default) - Alt+t
- Insert a tab character (useful when using the
expand-taboption) - Alt+-
- Decrease indent level of selection (or line)
- Alt+=
- Increase indent level of selection (or line)