• Stars
    star
    141
  • Rank 259,971 (Top 6 %)
  • Language
    C
  • License
    GNU General Publi...
  • Created almost 11 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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 sudo 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.
  • 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!

More Repositories

1

htop

htop is an interactive text-mode process viewer for Unix systems. It aims to be a better 'top'.
C
5,844
star
2

userland-prototype

Proof-of-concept prototype for Userland
Lua
157
star
3

f-strings

String interpolation for Lua
Lua
83
star
4

tabular

Tabular representation of Lua data
Lua
50
star
5

datafile

A Lua library for handling paths when loading data files
Lua
36
star
6

restserver

A simple server API for writing REST services running over WSAPI
Lua
24
star
7

pull-request-tutorial

An example repository for the Pull Request tutorial
Python
21
star
8

lua-mastodon

A Lua client API for the Mastodon social network
Lua
18
star
9

codegrep

a grep-like tool tailored for code
Lua
18
star
10

safer

Paranoid Lua programming
Lua
14
star
11

subprocess

A port of the Python subprocess module to Lua
C
14
star
12

adaptive-pomodoro

🍅 A pomodoro clock that doesn't break your flow
HTML
12
star
13

lutrace

luTrace (Lua Micro Trace) is a tiny stand-alone module that prints a trace of functions executed by a script (like strace, ltrace, etc.)
Lua
12
star
14

lode-fonts

Custom fonts for GoboLinux
Makefile
11
star
15

lua-syntect

Minimal Lua binding for syntect, a syntax highlighting library
Rust
9
star
16

libscript

A plugin-based library for language-independent application extensibility
C
6
star
17

lsp-client

A Lua library for implementing Language Server Protocol clients
Lua
5
star
18

inf1715

Repositório da disciplina INF1715
Haskell
4
star
19

puredata

A sketch of Pure Data in Haskell
Haskell
4
star
20

cache_cd

A smarter cd for your shell
3
star
21

luatoc

A naive Lua 5.0 to C+Lua translator
Lua
3
star
22

busted-htest

Pretty output handler for Busted
Lua
2
star
23

protosampler

C
2
star
24

lyx2docbook

A simple Lyx to DocBook-XML converter
Lua
2
star
25

xlode

a little game I wrote back in college
1
star
26

poa2020

Quiz Eleição POA 2020: compare as propostas
HTML
1
star