Skip to content
/ dit Public

A console text editor for Unix systems that you already know how to use

License

Notifications You must be signed in to change notification settings

hishamhm/dit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

627710b · Feb 21, 2025
Feb 19, 2015
Jan 18, 2024
Apr 16, 2018
Apr 17, 2018
May 4, 2016
Oct 11, 2007
Jan 18, 2024
Jun 7, 2022
Mar 9, 2018
Jan 18, 2024
May 23, 2022
Apr 5, 2020
Sep 21, 2017
May 15, 2020
Jan 3, 2007
Jan 6, 2025
Jan 3, 2007
Feb 6, 2025
Jan 4, 2007
Feb 4, 2017
Nov 12, 2011
Feb 6, 2025
Apr 7, 2018
Sep 28, 2016
Apr 7, 2018
Jul 13, 2012
Nov 23, 2012
Mar 28, 2018
Sep 4, 2023
Jan 6, 2025
Aug 2, 2010
Jul 23, 2021
Jan 3, 2007
Nov 13, 2014
Nov 24, 2016
Feb 19, 2015
Jun 2, 2006
Feb 21, 2025
Apr 16, 2018
Jan 17, 2025
Feb 17, 2016
Jan 6, 2025
Mar 10, 2018
Nov 28, 2012
Nov 28, 2012
Dec 8, 2023
Aug 2, 2010
Feb 21, 2025
Apr 7, 2018
Mar 27, 2018
May 30, 2006
Feb 17, 2016
Sep 4, 2023
Sep 4, 2023
May 30, 2006
Feb 21, 2025
Feb 24, 2016
Feb 24, 2016

Repository files navigation

Dit

A console text editor for Unix systems that you already know how to use.

http://hisham.hm/dit

Dependencies

Dit is designed to be light on dependencies. It is developed on Linux, but it should also be portable to other Unix-like platforms. Everything you need should be already installed by default in a typical Linux system.

  • ncurses: preferrably newer versions, with Unicode and mouse support
  • libiconv: optional, needed for Unicode
  • librt: needed for clock_gettime on Linux
  • bash: used for generating header files at build-time only
  • Lua: it bundles Lua 5.3 for scripting so you don't have to worry about this dependency, but it can also use the system-installed Lua if you have one.

Installing

For stable releases, get the latest version at http://hisham.hm/dit/releases/ -- unpack the .tar.gz file, enter its directory then run:

  • ./configure
    • You may want to customize your installation path using --prefix
  • make
  • sudo make install
    • If you are installing to a custom path where super-user privileges are not needed, use sudo make install

For installing the latest work-in-progress code from the Dit repository, you need Git, Autoconf and Automake. Then you'll be able to build it like this

  • git clone https://github.com/hishamhm/dit
  • cd dit
  • ./autogen.sh
  • ./configure
    • You may want to customize your installation path using --prefix
  • make
  • sudo make install
    • If you are installing to a custom path where super-user privileges are not needed, use make install

Quick reference

  • Ctrl+Q or F10 - quit
  • Ctrl+S - save
  • Ctrl+X - cut
  • Ctrl+C - copy
  • Ctrl+V - paste
  • Ctrl+Z or Ctrl+U - undo
  • Ctrl+Y - redo
  • Shift-arrows or Alt-arrows - select
    • NOTE! Some terminals "capture" shift-arrow movement for other purposes (switching tabs, etc) and Dit never gets the keys, that's why Dit also tries to support Alt-arrows. Try both and see which one works. If Shift-arrows don't work I recommend you reconfigure your terminal (you can do this in Konsole setting "Previous Tab" and "Next Tab" to alt-left and alt-right, for example). RXVT-Unicode and Terminology are some terminals that work well out-of-the-box.
  • Ctrl+F or F3 - find. Inside Find:
    • Ctrl+C - toggle case sensitive
    • Ctrl+W - toggle whole word
    • Ctrl+N - next
    • Ctrl+P - previous
    • Ctrl+R - replace
    • Enter - "confirm": exit Find staying where you are
    • Esc - "cancel": exit Find returning to where you started
      • This is useful for "peeking into another part of the file": just Ctrl+F, type something to look, and then Esc to go back to where you were.
  • Ctrl+G - go to...
    • ...line number - Type a number to go to a line.
    • ...tab - Type text to go to the open tab that matches that substring.
  • Ctrl+B - back (to previous location, before last find, go-to-line, tab-switch, etc.)
    • You can press Ctrl+B multiple times to go back various levels.
  • F5 - multiple cursors
    • if you press F5 with a selection, the next cursor will appear at the next occurrence of the selection.
  • F6 - find all occurrences of a selection and apply multiple cursors
  • Tabs of open files:
    • Ctrl+J - previous tab
    • Ctrl+K - next tab
    • Ctrl+W - close tab
  • Ctrl+N - word wrap paragraph
  • Ctrl+T - toggle tab mode (Tabs, 2, 3, 4 or 8 spaces - it tries to autodetect based on file contents)

This documentation is incomplete... there are more keys! Try around!

About

A console text editor for Unix systems that you already know how to use

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages