diff --git a/Makefile b/Makefile index 88c57a9b9..b3330c4e6 100644 --- a/Makefile +++ b/Makefile @@ -10,14 +10,13 @@ config.h: vis: config.h config.mk @echo ${CC} ${CFLAGS} ${LDFLAGS} *.c -o $@ @${CC} ${CFLAGS} ${LDFLAGS} *.c -o $@ - @ln -sf $@ nano debug: clean @make CFLAGS='${DEBUG_CFLAGS}' clean: @echo cleaning - @rm -f vis nano vis-${VERSION}.tar.gz + @rm -f vis vis-${VERSION}.tar.gz dist: clean @echo creating dist tarball diff --git a/README b/README index 973ddb63a..1b5ac8b47 100644 --- a/README +++ b/README @@ -275,13 +275,10 @@ Editor Frontends The editor core is written in a library like fashion which should make it possible to write multiple frontends with possibly different user -interfaces/paradigms. +interfaces/paradigms. The frontend to run is selected based on the +executable name. -At the moment there exists a barely functional, non-modal nano/sandy -like interface which was used during early testing. The default interface -is a vim clone called vis. - -The frontend to run is selected based on the executable name. +The default interface is a vim clone called vis. Key binding modes ----------------- diff --git a/config.def.h b/config.def.h index 59392a75c..1d3523a54 100644 --- a/config.def.h +++ b/config.def.h @@ -775,71 +775,6 @@ static Mode vis_modes[] = { }, }; -/* incomplete list of useful but currently missing functionality from nano's help ^G: - -^X (F2) Close the current file buffer / Exit from nano -^O (F3) Write the current file to disk -^J (F4) Justify the current paragraph - -^R (F5) Insert another file into the current one -^W (F6) Search for a string or a regular expression - -^K (F9) Cut the current line and store it in the cutbuffer -^U (F10) Uncut from the cutbuffer into the current line -^T (F12) Invoke the spell checker, if available - - -^_ (F13) (M-G) Go to line and column number -^\ (F14) (M-R) Replace a string or a regular expression -^^ (F15) (M-A) Mark text at the cursor position -M-W (F16) Repeat last search - -M-^ (M-6) Copy the current line and store it in the cutbuffer -M-V Insert the next keystroke verbatim - -XXX: CONTROL(' ') = 0, ^Space Go forward one word -*/ - -static KeyBinding nano_keys[] = { - { { CONTROL('D') }, call, { .f = editor_delete_key } }, - BACKSPACE( call, f, editor_backspace_key ), - { { CONTROL('F') }, movement, { .i = MOVE_CHAR_NEXT } }, - { { CONTROL('P') }, movement, { .i = MOVE_SCREEN_LINE_UP } }, - { { CONTROL('N') }, movement, { .i = MOVE_SCREEN_LINE_DOWN } }, - { { CONTROL('Y') }, wscroll, { .i = -PAGE } }, - { { KEY(F(7)) }, wscroll, { .i = -PAGE } }, - { { CONTROL('V') }, wscroll, { .i = +PAGE } }, - { { KEY(F(8)) }, wscroll, { .i = +PAGE } }, -#if 0 - // CONTROL(' ') == 0 which signals the end of array - { { CONTROL(' ') }, movement, { .i = MOVE_LONGWORD_START_NEXT } }, -#endif - { { META(' ') }, movement, { .i = MOVE_LONGWORD_START_PREV } }, - { { CONTROL('A') }, movement, { .i = MOVE_LINE_START } }, - { { CONTROL('E') }, movement, { .i = MOVE_LINE_END } }, - { { META(']') }, movement, { .i = MOVE_BRACKET_MATCH } }, - { { META(')') }, movement, { .i = MOVE_PARAGRAPH_PREV } }, - { { META('(') }, movement, { .i = MOVE_PARAGRAPH_NEXT } }, - { { META('\\') }, movement, { .i = MOVE_FILE_BEGIN } }, - { { META('|') }, movement, { .i = MOVE_FILE_BEGIN } }, - { { META('/') }, movement, { .i = MOVE_FILE_END } }, - { { META('?') }, movement, { .i = MOVE_FILE_END } }, - { { META('U') }, undo, { NULL } }, - { { META('E') }, redo, { NULL } }, -#if 0 - { { CONTROL('I') }, insert, { .s = "\t" } }, - /* TODO: handle this in vis to insert \n\r when appriopriate */ - { { CONTROL('M') }, insert, { .s = "\n" } }, -#endif - { { CONTROL('L') }, call, { .f = editor_draw } }, - { /* empty last element, array terminator */ }, -}; - -static Mode nano[] = { - { .parent = NULL, .bindings = basic_movement, }, - { .parent = &nano[0], .bindings = nano_keys, .input = vis_mode_insert_input }, -}; - /* list of vis configurations, first entry is default. name is matched with * argv[0] i.e. program name upon execution */ @@ -850,12 +785,6 @@ static Config editors[] = { .statusbar = statusbar, .keypress = vis_keypress, }, - { - .name = "nano", - .mode = &nano[1], - .statusbar = statusbar, - .keypress = vis_keypress, - }, }; /* default editor configuration to use */