Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

]m, ]M method movements #23

Open
ghost opened this issue Jun 19, 2020 · 0 comments
Open

]m, ]M method movements #23

ghost opened this issue Jun 19, 2020 · 0 comments

Comments

@ghost
Copy link

ghost commented Jun 19, 2020

vim provides nice method movements:

						*]m*
]m			Go to [count] next start of a method (for Java or
			similar structured language).  When not before the
			start of a method, jump to the start or end of the
			class.  When no '{' is found after the cursor, this is
			an error.  |exclusive| motion.
						*]M*
]M			Go to [count] next end of a method (for Java or
			similar structured language).  When not before the end
			of a method, jump to the start or end of the class.
			When no '}' is found after the cursor, this is an
			error. |exclusive| motion.
						*[m*
[m			Go to [count] previous start of a method (for Java or
			similar structured language).  When not after the
			start of a method, jump to the start or end of the
			class.  When no '{' is found before the cursor this is
			an error. |exclusive| motion.
						*[M*
[M			Go to [count] previous end of a method (for Java or
			similar structured language).  When not after the
			end of a method, jump to the start or end of the
			class.  When no '}' is found before the cursor this is
			an error. |exclusive| motion.

But they don't work in C#. This SO answer from 2014 shows how OmniSharp can be used to provide expected functionality:

https://stackoverflow.com/a/25521838/3310334

And I guess nowadays, OmniSharp may have taken better steps in supporting this and ensuring correct behaviour.

Does coc-omnisharp have a way to "fix" ]m, [m, etc., movements? (It doesn't override them by default)

How can I set that up if the possibility already exists?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants