Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
454 views
in Technique[技术] by (71.8m points)

xcode4.2 - Is there a command in Xcode 4.2 to swap two views in Assistant Editor mode from left to right and vice versa?

I would like to quickly swap two views from one side to the other and wonder if there is a hotkey for this functionality?

question from:https://stackoverflow.com/questions/8287688/is-there-a-command-in-xcode-4-2-to-swap-two-views-in-assistant-editor-mode-from

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Single Assistant Editor

This can be done in two steps. You can start with the cursor in either the Primary or the Assistant editor.

Step 1:

??, - Open in Assistant / Primary Editor

It opens the current file (where the cursor is) in Primary Editor if you are in Assistant Editor and vice versa. You end up with two exact same files open.

Step 2:

^` - Move Focus to Next Editor (available since Xcode 8, in older version use ?J)

^?? - Go Back (and open the result) in Primary / Assistant Editor

This opens the previous file of the other editor in the first one.

Idea: It might be even possible to assign a custom shortcut to it using the technique used in Xcode duplicate line. I have not gone so far.

Multiple Assistant Editors

If you are using multiple assistant editors, you can use graphical navigation chooser to choose the destination of each action. You can start in any editor and you can even swap the content of two assistant editors this way.

???, - Open in... and choose the second editor
?J - Move Focus to Editor... and choose the second editor (or use ^` multiple times)
?^?? - Go Back in... and choose the first editor


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...