Velocity/mode/insert.py

13 lines
241 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):
if key == 27: # Enter
2022-03-19 15:13:28 +00:00
# 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")