Sublime Forum

File previewing in Sublime Text 3

#14

yes, the issue has been resolved in some ST3 release (i couldn’t track it)

this issue can be closed!, thank you Jon

0 Likes

#15

I could agree with you, but this behaviour is actually inconsistent, and this is why (imho of course):
say, you have 3 file already opened, at a certain point of your workflow you preview a 4th file, in the tablist a 4th tab pops up, but when you jump to one of the other 3 files (say, the previewed one was useless for your workflow), even you didn’t edit it… it remains in tablist and this from a ux point of view is totally counterintuitive and worng…

0 Likes

#16

[quote=“Orlmente”]I could agree with you, but this behaviour is actually inconsistent, and this is why (imho of course):
say, you have 3 file already opened, at a certain point of your workflow you preview a 4th file, in the tablist a 4th tab pops up, but when you jump to one of the other 3 files (say, the previewed one was useless for your workflow), even you didn’t edit it… it remains in tablist and this from a ux point of view is totally counterintuitive and worng…[/quote]

OK, I didn’t understand your description to begin with, I but I think I see what you’re getting at now. You have 3 files opened using double click (they’re open for editing). You single click a 4th to preview it. You decide you didn’t want to work in that file, so you navigate to one of the 3 you already have open, and the 4th one (the preview tab) remains open. You would like to see it go away when it is no longer the active tab.

0 Likes

#17

Exactly ntenney,
is useless to keep that file open in tabs, there’s double click for that… more, even the comment in the default sublime-settings states that only double click will open the file and assign a tab for it:

that’s said, this should be considered a bug and not a feature…

0 Likes

#18

I actually like the new behaviour. I can navigate away to another file and come back to the preview which is useful in my workflow. But I think that it’s trivial to make everyone happy in this regard; A config option “close_inactive_preview_tabs” :smile:

0 Likes

#19

+1 for Orlmente’s sentiment:

[quote=“Orlmente”]Exactly ntenney,
is useless to keep that file open in tabs, there’s double click for that… more, even the comment in the default sublime-settings states that only double click will open the file and assign a tab for it:

that’s said, this should be considered a bug and not a feature…[/quote]

I would like to see Sublime Text 3’s file preview behave the same way as Sublime Text 2, just with the addition of Sublime Text 3’s “new tab on preview” concept.

0 Likes

#20

I agree with Orlmente.

Previewing files should not open a physical tab in my point of view, because it’s previewing, and previewed files are not intended to stay opened.

I’d like an option to choose this behaviour.

0 Likes

#21

I would like to add that if you have an entry in your sidebar menu for deleting files and you right click on a file also opens it in a preview tab. Then when you delete the file and confirm that you want it deleted the preview tab does not close. You then have to close it and go through the “close without saving” dialog. Deleting a file is very difficult with the preview function turned on. Maybe that will be better for some people :astonished: because it help prevent accidental deletes but I find it to be slightly annoying. So, I had to turn file previews off even-though I really like the preview function.

I don’t always delete files but when I do I delete them all.

ST3:3059 on Linux

0 Likes

#22

OK, so here’s my take on the file preview. I like the st3 way of doing it better than the st2 way. With st2, it could get confusing because if you had a file open for editing, and clicked on a file to preview, it looked (at least with some themes) that the file you were previewing was a file opened for editing, and named the same as the file you had been editing. But, I think that it should be more apparent that the file being previewed in st3 is in preview mode, and as has been mentioned, if I navigate away from the tab, it should close automatically. In other words, preview should not be functionally equivalent to opening the file for editing, or there shouldn’t be a preview mode at all.

0 Likes

#23

This definitely needs to be an option.
Every time I preview a build file, change tab and build again, ST3 actually opens the file and keeps it open, for no reason. I always end up with a lot of tabs that I never opened

0 Likes

#24

This is probably my biggest issue with ST3 right now. I believe that this is definitely a bug because when previewing files using Goto Anything, ST3 behaves exactly as ST2 did. But when using the sidebar, a tab is opened.

I really hope that this is either reverted or a setting is provided to switch this behaviour off.

0 Likes

#25

I would like ST2 behavior back as well! I don’t use tabs at all, and it’s annoying having Cmd+Opt+(left/right arrow) toggle between files that aren’t even visible in the “Open Files” view (I only use this view instead of tabs, because tabs are for noobs).

0 Likes

#26

Now that we have some activity again, I’d like to revive this thread. Although I’ve tried several times to use ST3 and adjust to the new behavior, after a couple days of frustration, I find myself back on ST2 because of this feature alone. I like the preview feature and don’t want to turn it off altogether. However, some themes don’t even italicize the tab title, so the preview tab is indistinguishable from a regular (open for editing) tab. And regardless, I don’t want the preview to stay open after I navigate away. I know some people like the ST3 behavior, so please it can just be an option.

0 Likes

#27

I vote up for making this an option.

0 Likes

#28

what’s the option now?
ST3 (i’m usign 3082 but i’ts been for a while) does work perfect now:
“preview_on_click”: true/false
let you preview or not the files. they don’t get openend in preview (the bug i started this thread with)

please add details to your current problem otherwise it’ll be hard for the developers to understand!
ciao

0 Likes

#29

[quote=“krur”]what’s the option now?
ST3 (i’m usign 3082 but i’ts been for a while) does work perfect now:
“preview_on_click”: true/false
let you preview or not the files. they don’t get openend in preview (the bug i started this thread with)[/quote]

You’re right that, at least for me, it’s a different problem than your original (sorry, I see now this thread got hijacked about halfway through). As several people described above, the issue is the way tabs are handled when previewing. Say you have three tabs open by double-clicking (Tabs [1]-[2]-[3]). You’re on tab 1 and then you preview a file, it opens the preview tab to the right of tab 1, so now you have Tabs [1]-[Preview]-[2]-[3]. Then you click on tab 2, the preview tab stays open in the tab bar. Then say you preview another file - it moves the preview tab to the right of tab 2 (Tabs [1]-[2]-[Preview]-[3]).

It’s this behavior that I find inconsistent for the following reasons:

  1. The preview tab stays open when you click on another tab. That makes a tenuous distinction between a preview and an opened file.
  2. Since the preview opens to the right of your current tab, the location of the preview jumps around if you click between open tabs and previewing.
  3. Depending on the theme, the italics that distinguish the preview tab are more or less subtle, so it’s not always clear which tab is the preview.

In Sublime Text 2, previewing files did not open a display tab, but just replaced the content pane with the previewed file (and deselected the active tab). I actually prefer that behavior, but since some people prefer the new behavior, that’s where an option would help. Not an option to turn previewing on/off because like you say that already exists, but rather an option to display/don’t display a tab for the preview (or maybe at least an option to close preview after clicking another tab).

0 Likes

#30

ah ok… i agree… the “preview tab” can be improved…
maybe we should open a new thread otherwise jps won’t notice all these posts!

ciao!

0 Likes

#31

Hi,

I think the current functionality in ST3 is great, but as has been mentioned, it could be improved.

One suggestion could be to make the preview tab always be the last tab…this solves the jumping around issue. Also, perhaps it would be possible to separate the preview tab from edit tabs by forcing the preview tab to be right-aligned in the tab-bar. This would only be effective when the number of tabs open allows a space between the last open tab and the preview tab.

As regards making the tab more obviously visible, perhaps a solution would be to inverse the tab colours (rather than italicise the filename). Of course, custom themes may not support this, or would need to be updated to support this.

I don’t necessarily agree with auto-closing the preview tab when a user clicks off the tab.

0 Likes

#32

[quote=“krur”]ah ok… i agree… the “preview tab” can be improved…
maybe we should open a new thread otherwise jps won’t notice all these posts!

ciao![/quote]

So has this thing taken into acount or not, I realized I need it as well, or is there an extension for this?

0 Likes

#33

Can I disable this feature for some file type ?
for example, when I click on .zip file, ST render a binary code on preview tab. I think it is not make sense.

0 Likes