from editing import * from keybindings import * kb('insert', 'left' , cursor_go_left) kb('insert', 'right', cursor_go_right) kb('insert', 'up' , cursor_go_up) kb('insert', 'down' , cursor_go_down) kb('insert', 'C-e' , cursor_go_line_end) kb('insert', 'C-a' , cursor_go_line_beginning) kb('insert', 'escape', lambda: keymap_push(keymappings['normal'])) kb('insert', 'backspace', buffer_delete_character_under_cursor) kb('insert', 'delete', buffer_delete_next_character) kb('insert', 'return', buffer_newline_at_pos) kb('insert', 'C-s', buffer_save) kb('normal', 'i', keymap_pop) kb('normal', 'H', cursor_go_buffer_beginning) kb('normal', 'L', cursor_go_buffer_end) kb('normal', 'h', cursor_go_left) kb('normal', 'j', cursor_go_down) kb('normal', 'k', cursor_go_up) kb('normal', 'l', cursor_go_right) kb('normal', '^', cursor_go_line_beginning) kb('normal', '$', cursor_go_line_end) kb('normal', 'C-s', buffer_save)