Velocity/mode/insert.py

14 lines
263 B
Python
Raw Normal View History

2022-03-19 15:41:40 +00:00
from core import cursors, modes
2022-03-19 15:13:28 +00:00
def execute(instance, key):
2022-03-19 15:41:40 +00:00
# Enter key
2022-03-19 15:13:28 +00:00
if key == 27:
# Switch to normal mode
2022-03-19 15:41:40 +00:00
modes.activate(instance, "normal")
2022-03-19 15:13:28 +00:00
def activate(instance):
# Switch the cursor to a line
cursors.cursor_mode("line")