Velocity/mode/insert.py

14 lines
248 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
2022-03-19 15:57:38 +00:00
def activate():
2022-03-19 15:13:28 +00:00
# Switch the cursor to a line
2022-03-19 19:19:25 +00:00
cursors.mode("line")