Sublime Forum

Split screen for 1 file

#1

Hi, in both Sublime Text 1 and 2 you can do a split screen view of files. But in Sublime Text 1 you can do a split screen of 1 file (see the same file left and right). I would also like to have this for Sublime Text 2 (since you can’t). I find this a very useful feature, because I often have to edit these very (very, very) long files. It is very handy to see different parts of the same file at the same time.

0 Likes

#2

+1

I’ve use this feature before. Was surprised “New view into…” was gone in ST2.

0 Likes

#3

Just wondering… Isn’t that what File/Clone File does?

0 Likes

#4

Yepp - use a complex layout (e.g. two panes), clone the file and move it into the other pane.
Perhaps it would be more intuitive to move clone into the view menu?

0 Likes

#5

I’m fairly new to Sublime, and only found my way to this functionality via Google. It would make sense to me to have this functionality in the View or Window menu(s), but not the File menu (as it’s not a File op).

Of course, C-x 2 and C-x 3 would suit me better, but that’s another story.

EDIT: Hmm … looks like this method may not be compatible with SFTP remote editing via wbond’s SFTP plugin? On OSX I can no longer save if I clone a file (so maybe it is a File op?), and instead I see “unable to write to /var/private/blah/tmpfile”.

0 Likes

#6

File | New view into file - creates a second view of the file, split layout and drag to new pane.

0 Likes

#7

That works, but I wish there was a more elegant way. BBEdit had this feature… and heck, even MS Word!

Here’s an example:
smg.photobucket.com/albums/v146/ … screen.mp4

0 Likes

#8

I just worked it out:

File > New View into File (yes, for having two tabs of the current page!)

Then to see it in split screen,to see and edit different parts of the same file in the same window MS Office Style, do this:

View > Layout > and then whichever style of split you need

You can drag and drop tabs just like you can with web browsers with different windows in to different panes.

Enjoy!

Ben

leeli.co.uk/bengoddard

0 Likes

#9

Interesting that you resurrected this topic one day before I went looking for it. You’ve suggested a solution that’ll work, but it is still very cumbersome and the resulting two panes aren’t associated with eachother per se. It would be really nice if the split pane mechanism that Office, Visual Studio, Xcode and other editors provide was just directly implemented. I use this feature heavily as it lets me keep part of my view anchored to where I want to make a change, meanwhile I can look around elsewhere in the file for reference information (e.g. look at a call or type definition while writing code that uses it).

0 Likes

#10

there is a plugin: SimpleClone. it may help you.

0 Likes