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

Installs but doesn't seem to work as expected in Zend Studio #9

Closed
rvanbaalen opened this issue May 19, 2014 · 4 comments
Closed

Installs but doesn't seem to work as expected in Zend Studio #9

rvanbaalen opened this issue May 19, 2014 · 4 comments

Comments

@rvanbaalen
Copy link

When I read "Sublime Text 2-like multi cursor editing", I assume I can hold the CMD key, click somewhere and have a second cursor in my editor.

This plugin does not do that. I'm working on a Mac and CTRL+click gives me a context menu. CTRL+SHIFT+D doesn't do anything and CMD (usually the Mac replacement for CTRL) + SHIFT + D does something entirely else.

Perhaps you can provide more information on what this plugin does and how it's supposed to be used. For now, the name seems somewhat misleading.

Thanks by the way for allowing it to install in Zend Studio.

@caspark
Copy link
Owner

caspark commented May 19, 2014

Literally the first sentence of the readme says it's A work in progress attempt to... I'm not sure I can make that any clearer ;)

The whole "ctrl+shift+d doesn't do anything for me, and neither do the OSX equivalents" issue is a problem though.

What it should do is activate linked mode editing for the selected text and the next instance of the text. Linked mode editing is an Eclipse built-in feature which is typically used to rename variables (in Java, you can right click on a variable and choose Refactor >> Rename from the context menu) or edit newly inserted templates (where some parts of the templates are may be duplicated but still filled in without typing the same thing out twice; as you edit, it would fill in the duplicated text on all appropriate sections of the template).

I don't go into detail about this in the Readme because it's a stop gap: using linked mode editing is the simplest thing I could get working to solve my immediate need, but it has some serious limitations. The "click for more cursors" thing you mentioned, for example, wouldn't work because linked mode as-implemented in Eclipse requires the text being edited to be identical and doesn't allow you to leave that identical edit area.

The next thing is to obsolete that approach (#3)! This is a slow process because it involves lots of debugging Eclipse's text editor to figure out how everything works; with over 10 years of extensions and hacks added in to it, it is not a simple beast. My progress is pushed to a branch; pull requests to help out are welcome, if you'd like things to move faster :)

Anyway, regarding your specific problem, please try the shortcut on an editor of a plain text file (.txt). Put your cursor on a word which has a duplicate elsewhere in the file and hit the shortcut. That's what I tested with in Zend, and it worked. You can also try using Ctrl+3 (which may be command+3 for you) to type the command Select Next Occurrence and hit Enter, in case there are key binding conflicts. You can also try opening and looking at the Error Log view (something Window >> Show View >> Error Log); any errors mentioning com.asparck.multicursor in there would help figure out what's going on too.

I don't have an OSX machine to test on myself, unfortunately; it's entirely possible I stuffed up the keybindings in such a way that they only work on Linux and Windows.

@caspark caspark changed the title Improve readme Installs but doesn't seem to work as expected in Zend Studio May 19, 2014
@caspark
Copy link
Owner

caspark commented Jun 7, 2014

No response after more than 2 weeks, so I'm closing this for now (I can't troubleshoot this apparently-OSX-specific issue myself).

@caspark caspark closed this as completed Jun 7, 2014
@rvanbaalen
Copy link
Author

I think the issue is more me than it is in this plugin. My
expectations were too high and different causing me to mark stuff as
an issue while its usual behavoir.

@caspark
Copy link
Owner

caspark commented Jun 7, 2014

Fair enough - sorry about the disappointment :)

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

2 participants