bernardo-bruning / godot-vim Goto Github PK
View Code? Open in Web Editor NEWIntroduces motions vim on godot editor
License: MIT License
Introduces motions vim on godot editor
License: MIT License
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.
We should be able to save files using :w
being on a laptop makes it hard to use h,j,k,l keys without the touchpad getting in the way, so arrow keys are preferable for me. would it be possible to allow cursor to move with arrow keys instead?
In delmarks.gd, marks.gd, and remap.gd. The variable "Contants" should be names "Constants".
I've installed it but it does nothing. Do I have to activate it somehow? I'm new to this plugin.
Thanks.
whenever i use normal + o it make a new line above the line rather than a new line below, while normal + O does its intended function making a newline above
I think I have tried all the key combinations that I think should accept the suggested code completion...
I' currently looking through the code to see if I can help.
Sometimes when I focus Godot again after interacting with a different program (e.g. web browser) I get these error messages in the Godot output:
scene/gui/text_edit.cpp:5194 - Condition "!has_selection(p_caret)" is true. Returning: -1
scene/gui/text_edit.cpp:5188 - Condition "!has_selection(p_caret)" is true. Returning: -1
scene/gui/text_edit.cpp:5206 - Condition "!has_selection(p_caret)" is true. Returning: -1
scene/gui/text_edit.cpp:5200 - Condition "!has_selection(p_caret)" is true. Returning: -1
Any ideas why this might be happening?
The ESC key is not convenient to use, and I want to map the exit mode function to Ctrl+[ key. How can I do that?
Looking forward to your response.
We need implement command 'help' to print readme or open.
When using godot code editor without godot-vim it has standard hotkeys on MacOS.
CMD
+ +
to increase font size
CMD
+ -
to decrease font size
When I enable plugin it doesn't work anymore.
Pressing combination CMD
+ +
should increase font size
Nothing happens
Godot: v4.1.3.stable.official [f06b6836a]
godot-vim: 0.3
It's working in the gdscript editor but not in the shader editor. Could it be enabled?
I'm running Godot 4.2.1.
Thanks.
In vim we can use method map
to configure shortcuts keys.
But to do this, we need execute this tasks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.