(wip) advanced langtons ant

(wip) advanced langtons ant
This commit is contained in:
djaidjai committed 2025-11-12 00:59:27 +01:00
1 parent c57f07ffc2
commit 25ec8d2585
42 files changed
+3283

No files matched your search

@@ -0,0 +1,16 @@
const Constants = preload("res://addons/godot_vim/constants.gd")
const Mode = Constants.Mode
func execute(api : Dictionary, args: String):
api.command_line.search_pattern = args.substr(1)
var rmatch: RegExMatch = api.vim_plugin.search_regex(
api.code_edit,
api.command_line.search_pattern,
api.cursor.get_caret_pos() + Vector2i.RIGHT
)
if rmatch != null:
var pos: Vector2i = api.vim_plugin.idx_to_pos(api.code_edit, rmatch.get_start())
api.cursor.set_caret_pos(pos.y, pos.x)
else:
api.status_bar.display_error('Pattern not found: "%s"' % [api.command_line.search_pattern])
api.cursor.set_mode(Mode.NORMAL)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.