Skip to content

Multiple "godot-vim"'s exist #6

@cuppajoeman

Description

@cuppajoeman

Hi there,

This is more of a soft question but at the current moment in time we have https://github.com/joshnajera/godot-vim as well as this repository, taking a look at the repository it seems to have a bit more popularity in terms of github stars, but this repositories plugin was easily installable through the AssetLib Menu in Godot 4.1

Seeing that both projects are in early stages I was curious to see how the two codebases compare and if they could be combined, as I believe it's better to have one stronger plugin than two weaker ones.

I will try to lay out some information for new developers so that they don't have to do everything I've just done.

Taking a look at the main logic we currently support at least the following 58 vim commands.

	'h'
	'j'
	'k'
	'l'
	'w'
	'e'
	'b'
	'f'
	't'
	';'
	','
	'J'
	'd'
	'dd'
	'D'
	'p'
	'P'
	'$'
	'^'
	'G'
	'g'
	'gg'
	'gc'
	'gcc'
	'0'
	'i'
	'a'
	'I'
	'A'
	'v'
	'V'
	'o'
	'O'
	'x'
	's'
	'u'
	'<C-r>'
	'r'
	'y'
	'yy'
	'.':
	':'
	'/'
	'n'
	'N'
	'c'
	'cc'
	'C'
	'z'
	'zz'
	'>'
	'>>'
	'<'
	'<<'
	'}'
	'{'
	'm'
	'`'

Now in the other project, through some rough parsing of the_key_map it supports the following 100 commands:

"H": "type": MOTION, "motion": "move_by_characters"
"L": "type": MOTION, "motion": "move_by_characters"
"J": "type": MOTION, "motion": "move_by_lines"
"K": "type": MOTION, "motion": "move_by_lines"
"Shift+Equal": "type": MOTION, "motion": "move_by_lines"
"Minus": "type": MOTION, "motion": "move_by_lines"
"Shift+4": "type": MOTION, "motion": "move_to_end_of_line"
"Shift+6": "type": MOTION, "motion": "move_to_first_non_white_space_character" }
"0": "type": MOTION, "motion": "move_to_start_of_line" }
"Shift+H": "type": MOTION, "motion": "move_to_top_line"
"Shift+L": "type": MOTION, "motion": "move_to_bottom_line"
"Shift+M": "type": MOTION, "motion": "move_to_middle_line"
"G", "G": "type": MOTION, "motion": "move_to_line_or_edge_of_document"
"Shift+G": "type": MOTION, "motion": "move_to_line_or_edge_of_document"
"Ctrl+F": "type": MOTION, "motion": "move_by_page"
"Ctrl+B": "type": MOTION, "motion": "move_by_page"
"Ctrl+D": "type": MOTION, "motion": "move_by_scroll"
"Ctrl+U": "type": MOTION, "motion": "move_by_scroll"
"Shift+BackSlash": "type": MOTION, "motion": "move_to_column" }
"W": "type": MOTION, "motion": "move_by_words"
"Shift+W": "type": MOTION, "motion": "move_by_words"
"E": "type": MOTION, "motion": "move_by_words"
"Shift+E": "type": MOTION, "motion": "move_by_words"
"B": "type": MOTION, "motion": "move_by_words"
"Shift+B": "type": MOTION, "motion": "move_by_words"
"G", "E": "type": MOTION, "motion": "move_by_words"
"G", "Shift+E": "type": MOTION, "motion": "move_by_words"
"Shift+5": "type": MOTION, "motion": "move_to_matched_symbol"
"F", "{char}": "type": MOTION, "motion": "move_to_next_char"
"Shift+F", "{char}": "type": MOTION, "motion": "move_to_next_char"
"T", "{char}": "type": MOTION, "motion": "move_to_next_char"
"Shift+T", "{char}": "type": MOTION, "motion": "move_to_next_char"
"Semicolon": "type": MOTION, "motion": "repeat_last_char_search"
"Shift+8": "type": MOTION, "motion": "find_word_under_caret"
"Shift+3": "type": MOTION, "motion": "find_word_under_caret"
"N": "type": MOTION, "motion": "find_again"
"Shift+N": "type": MOTION, "motion": "find_again"
"A", "Shift+9": "type": MOTION, "motion": "text_object"
"A", "Shift+0": "type": MOTION, "motion": "text_object"
"A", "B": "type": MOTION, "motion": "text_object"
"A", "BracketLeft": "type": MOTION, "motion": "text_object"
"A", "BracketRight": "type": MOTION, "motion": "text_object"
"A", "Shift+BracketLeft": "type": MOTION, "motion": "text_object"
"A", "Shift+BracketRight": "type": MOTION, "motion": "text_object"
"A", "Shift+B": "type": MOTION, "motion": "text_object"
"A", "Apostrophe": "type": MOTION, "motion": "text_object"
"A", 'Shift+Apostrophe': "type": MOTION, "motion": "text_object"
"I", "Shift+9": "type": MOTION, "motion": "text_object"
"I", "Shift+0": "type": MOTION, "motion": "text_object"
"I", "B": "type": MOTION, "motion": "text_object"
"I", "BracketLeft": "type": MOTION, "motion": "text_object"
"I", "BracketRight": "type": MOTION, "motion": "text_object"
"I", "Shift+BracketLeft": "type": MOTION, "motion": "text_object"
"I", "Shift+BracketRight": "type": MOTION, "motion": "text_object"
"I", "Shift+B": "type": MOTION, "motion": "text_object"
"I", "Apostrophe": "type": MOTION, "motion": "text_object"
"I", 'Shift+Apostrophe': "type": MOTION, "motion": "text_object"
"I", "W": "type": MOTION, "motion": "text_object"
"D": "type": OPERATOR, "operator": "delete" }
"Shift+D": "type": OPERATOR_MOTION, "operator": "delete"
"Y": "type": OPERATOR, "operator": "yank" }
"Shift+Y": "type": OPERATOR_MOTION, "operator": "yank"
"C": "type": OPERATOR, "operator": "change" }
"Shift+C": "type": OPERATOR_MOTION, "operator": "change"
"X": "type": OPERATOR_MOTION, "operator": "delete"
"X": "type": OPERATOR, "operator": "delete"
"Shift+X": "type": OPERATOR_MOTION, "operator": "delete"
"U": "type": OPERATOR, "operator": "change_case"
"Shift+U": "type": OPERATOR, "operator": "change_case"
"Shift+QuoteLeft": "type": OPERATOR, "operator": "toggle_case"
"Shift+QuoteLeft": "type": OPERATOR_MOTION, "operator": "toggle_case"
"P": "type": ACTION, "action": "paste"
"Shift+P": "type": ACTION, "action": "paste"
"U": "type": ACTION, "action": "undo"
"Ctrl+R": "type": ACTION, "action": "redo"
"R", "{char}": "type": ACTION, "action": "replace"
"Period": "type": ACTION, "action": "repeat_last_edit"
"I": "type": ACTION, "action": "enter_insert_mode"
"Shift+I": "type": ACTION, "action": "enter_insert_mode"
"A": "type": ACTION, "action": "enter_insert_mode"
"Shift+A": "type": ACTION, "action": "enter_insert_mode"
"O": "type": ACTION, "action": "enter_insert_mode"
"Shift+O": "type": ACTION, "action": "enter_insert_mode"
"V": "type": ACTION, "action": "enter_visual_mode"
"Shift+V": "type": ACTION, "action": "enter_visual_mode"
"Slash": "type": ACTION, "action": "search"
"Ctrl+O": "type": ACTION, "action": "jump_list_walk"
"Ctrl+I": "type": ACTION, "action": "jump_list_walk"
"Z", "A": "type": ACTION, "action": "toggle_folding"
"Z", "Shift+M": "type": ACTION, "action": "fold_all"
"Z", "Shift+R": "type": ACTION, "action": "unfold_all"
"Q", "{char}": "type": ACTION, "action": "record_macro"
"Q": "type": ACTION, "action": "stop_record_macro"
"Shift+2", "{char}": "type": ACTION, "action": "play_macro"
"Shift+Comma": "type": ACTION, "action": "indent"
"Shift+Period": "type": ACTION, "action": "indent"
"Shift+J": "type": ACTION, "action": "join_lines"
"M", "{char}": "type": ACTION, "action": "set_bookmark"
"Apostrophe", "{char}": "type": MOTION, "motion": "go_to_bookmark"

So in terms of vim commands, the other repository has more ground covered, but I would say that this repository has better organization simply because the other repository stores all of the content in a 1700 line gd file and this repsitory at least splits it into a few different files.

I was wondering what @bernardo-bruning and the owner of the other repository (@joshnajera) think about this situation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions