• Stars
    star
    576
  • Rank 77,502 (Top 2 %)
  • Language
    Go
  • License
    MIT License
  • Created over 12 years ago
  • Updated over 2 years ago

Reviews

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

Repository Details

A very religious text editor
 --== Godit - a very religious text editor ==--

Screenshots:

 * https://nosmileface.dev/images/godit-linux1.png
 * https://nosmileface.dev/images/godit-linux2.png

I call it religious, because there is a strong faith in the "one true way"
of doing things. By that I mean things like: "the tab size is always an
equivalent to 8 spaces/characters" or "each line ends with '\n' symbol and
someone should end this '\r\n' madness" or "text files are always utf-8
encoded". Most editors provide customizable options for these things, but
godit takes a different approach in that area and has no settings at all. So,
that concludes the ideology behind godit.

If you're interested in what godit feels like, it would be fair to say that it
is an emacsish lightweight text editor. The godit uses many of the emacs key
bindings and operates using a notion of "micromodes". It's easier to explain
what a micromode is by a simple example. Let's take the keyboard macros feature
from both emacs and godit. You can start recording a macro using `C-x (` key
combination and then when you're ready to start repeating it, you do the
following: `C-x e (e...)`. Not only `C-x e` ends the recording of a macro, it
executes the macro once and enters a micromode, where typing `e` again, will
repeat that action. But as soon as some other key was pressed you quit this
micromode and everything is back to normal again. The idea of micromode is used
in godit a lot.


 --== List of keybindings ==--

Basic things:
  C-g              - Universal cancel button
  C-x C-c          - Quit from the godit
  C-x C-s          - Save file [prompt maybe]
  C-x S            - Save file (raw) [prompt maybe]
  C-x M-s          - Save file as [prompt]
  C-x M-S          - Save file as (raw) [prompt]
  C-x C-f          - Open file
  M-g              - Go to line [prompt]
  C-/              - Undo
  C-x C-/ (C-/...) - Redo

View/buffer operations:
  C-x C-w          - View operations mode
  C-x 0            - Kill active view
  C-x 1            - Kill all views but active
  C-x 2            - Split active view vertically
  C-x 3            - Split active view horizontally
  C-x o            - Make a sibling view active
  C-x b            - Switch buffer in the active view [prompt]
  C-x k            - Kill buffer in the active view

View operations mode:
  v                - Split active view vertically
  h                - Split active view horizontally
  k                - Kill active view
  C-f, <right>     - Expand/shrink active view to the right
  C-b, <left>      - Expand/shrink active view to the left
  C-n, <down>      - Expand/shrink active view to the bottom
  C-p, <up>        - Expand/shrink active view to the top
  1, 2, 3, 4, ...  - Select view

Cursor/view movement and text editing:
  C-f, <right>     - Move cursor one character forward
  M-f              - Move cursor one word forward
  C-b, <left>      - Move cursor one character backward
  M-b              - Move cursor one word backward
  C-n, <down>      - Move cursor to the next line
  C-p, <up>        - Move cursor to the previous line
  C-e, <end>       - Move cursor to the end of line
  C-a, <home>      - Move cursor to the beginning of the line
  C-v, <pgdn>      - Move view forward (half of the screen)
  M-v, <pgup>      - Move view backward (half of the screen)
  C-l              - Center view on line containing cursor
  C-s              - Search forward [interactive prompt]
  C-r              - Search backward [interactive prompt]
  C-j              - Insert a newline character and autoindent
  <enter>          - Insert a newline character
  <backspace>      - Delete one character backwards
  C-d, <delete>    - Delete one character in-place
  M-d              - Kill word
  M-<backspace>    - Kill word backwards
  C-k              - Kill line
  M-u              - Convert the following word to upper case
  M-l              - Convert the following word to lower case
  M-c              - Capitalize the following word
  <any other key>  - Insert character

Mark and region operations:
  C-<space>        - Set mark
  C-x C-x          - Swap cursor and mark locations
  C-x > (>...)     - Indent region (lines between the cursor and the mark)
  C-x < (<...)     - Deindent region (lines between the cursor and the mark)
  C-x C-r          - Search & replace (within region) [prompt]
  C-x C-u          - Convert the region to upper case
  C-x C-l          - Convert the region to lower case
  C-w              - Kill region (between the cursor and the mark)
  M-w              - Copy region (between the cursor and the mark)
  C-y              - Yank (aka Paste) previously killed/copied text
  M-q              - Fill region (lines between the cursor and the mark) [prompt]

Advanced:
  M-/              - Local words autocompletion
  C-x C-a          - Invoke buffer specific autocompletion menu [menu]
  C-x (            - Start keyboard macro recording
  C-x )            - Stop keyboard macro recording
  C-x e (e...)     - Stop keyboard macro recording and execute it
  C-x =            - Info about character under the cursor
  C-x !            - Filter region through an external command [prompt]


 --== Current development state==--

I'm still in process of designing some parts of it. Bits of functionality are
missing, but frankly I write godit in godit already and I use godit for
everything else on my system (EDITOR=godit). This README was written in godit
from scratch, I write commit messages in godit, I write code in godit, I write
configs and scripts in godit. The editor is definitely usable, but it is
certain that some corner cases are not covered. Just try it, perhaps you would
like it. Oh and I'm very picky about feature suggestions at the moment,
suggest, but don't expect too much.

More Repositories

1

gocode

An autocompletion daemon for the Go programming language
Go
5,006
star
2

termbox-go

Pure Go termbox implementation
Go
4,666
star
3

termbox

Library for writing text-based user interfaces
C
1,963
star
4

jsondiff

JsonDiff library
Go
210
star
5

gothic

Tcl/Tk Go bindings
Go
152
star
6

gollvm

LLVM bindings for the Go programming language
Go
97
star
7

gotris

A classic tetris game written in Go programming language
Go
92
star
8

pnoise

Perlin noise benchmark
Lua
77
star
9

obkey

ObKey - Openbox Key Editor
Python
70
star
10

sseculling

SSE Frustum Culling Demo
C++
67
star
11

mc

A very simple marching cubes example.
C++
64
star
12

golemon

Port of the lemon parser generator to the Go programming language
C
55
star
13

gogobject

GObject-introspection based bindings generator
Go
47
star
14

krawl

Krawl programming language compiler
C++
42
star
15

gocovgui

A simple GUI wrapper for the gocov coverage analysis tool
Go
42
star
16

bmpanel2

bmpanel version 2
C
35
star
17

bin2go

Binary to Go source file converter
Go
24
star
18

ccode

An autocompletion daemon for the C programming language (vim, libclang, omnifunc)
C
23
star
19

imgui-rust

Alternative (personal) imgui rust bindings
Rust
20
star
20

sexp

S-expressions parser in the Go programming language
Go
19
star
21

nextgame

Work-in-progress "voxel" game or game engine.
C
18
star
22

bmpanel

bmpanel - lightweight, netwm compliant, x11 panel with desktop switcher, taskbar, systray and clock
C
17
star
23

tulib

Termbox Utilities Library
Go
14
star
24

libtorgo

BitTorrent Go library
Go
12
star
25

gortfm

Documentation generator for the Go programming language
Go
11
star
26

emacskeys

QtCreator plugin targeting emacs users
C++
11
star
27

gomandel

Go mandelbrot demo program
Go
9
star
28

sqlrace

SQL Race condition demo
Go
8
star
29

torgo

BitTorrent client and a tool written in Go
Go
8
star
30

ancient

A toy compiled programming language
C
8
star
31

interlua

C++11/Lua bindings generator
C++
6
star
32

vulkangen

Vulkan C++ wrapper generator
Go
6
star
33

vrmp

VR media player for linux
Rust
5
star
34

lib99

C
5
star
35

libzbs

Experimental C++11 cross-platform software utility library
C++
5
star
36

shebang

Shebang scripting language
Go
4
star
37

changedir

utility that helps you maintain visited directories history
Go
3
star
38

tbclock

tty-clock clone based on termbox
C
3
star
39

sqlbatch

WIP
Go
3
star
40

cppmandel

Multihreaded mandelbrot set renderer using experimental C++ coroutines.
C++
3
star
41

shell-util

Shell scripting helper functions for deno
TypeScript
3
star
42

sx

Sx file format
Go
3
star
43

goal

Go makefile templates system
Go
2
star
44

GodotSlerpTest

Just a test case
GDScript
2
star
45

jsondiff-demo

github.com/nsf/jsondiff demo
JavaScript
2
star
46

depsinfo

analyze dependencies and libraries of a deno script
TypeScript
1
star
47

packeter

Channel <-> network connection adapter library
Go
1
star