Code Monkey home page Code Monkey logo

preview-tabs's Introduction

Deprecated. This functionality is now built in to Atom.

Preview Tabs package

For Atom.

Open new tabs as a 'preview', closing any previous previews. This allows you to quickly look at many files without creating a large number of open tabs.

Doing the following makes a tab 'permanent', preventing it from being closed when new tabs are opened:

  • Modifying it
  • Saving it
  • Double clicking the tab
  • Double clicking the file in the file tree

Preview Tabs Demo

preview-tabs's People

Contributors

ahuth avatar

Stargazers

 avatar Oktay Acikalin avatar Anthony Hatzopoulos avatar Tatsuya Oiwa avatar Chakib Ouhajjou avatar Sean Lang avatar Bob Rockefeller avatar Erik Nilsen avatar Clemens Damke avatar Miguel Perez avatar Vicente Pons avatar

Watchers

Otto Bretz avatar Richard Hess avatar James Cloos avatar Anthony Hatzopoulos avatar  avatar  avatar

Forkers

banjeremy

preview-tabs's Issues

Prevents open-last-project from working properly

When preview-tabs is installed atom-open-last-project can't open the last session's files. Apparently it tries to open all of them, but they are opened as previews, so only the very last file is opened (as a preview) after starting Atom.

Not sure if this is related to #13, or if it's even possible to fix. Maybe only open files as previews if a file is opened by a user, if it is possible to detect that it was opened by a user, not by another package.

Atom.Object.defineProperty.get is deprecated.

atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace),
which returns an HTMLElement.

Atom.Object.defineProperty.get (/opt/atom/resources/app/src/atom.js:54:11)
new PreviewTabsPaneController (/home/vicente/.atom/packages/preview-tabs/lib/preview-tabs-pane-controller.coffee:12:63)

Issue with double clicking the file in the file tree

Hey,

Thanks for this plugin btw. Here is the small issue. When you try to double click in file tree to open the file permanently, you need to click on text, if you are trying to click on the line , it will not work.

screenshot 2014-10-21 14 47 58

Atom.Object.defineProperty.get is deprecated.

atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace),
which returns an HTMLElement.

Atom.Object.defineProperty.get (/opt/atom/resources/app/src/atom.js:55:11)
new PreviewTabsPanesManager (/home/vicente/.atom/packages/preview-tabs/lib/preview-tabs-panes-manager.coffee:10:29)

Arrow keys preview

Hey, It would be great if I didn't have to click every file and the arrow keys would open a new preview of each file as they're selected. Would this be terribly hard to implement?

Atom.Object.defineProperty.get is deprecated.

atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace),
which returns an HTMLElement.

Atom.Object.defineProperty.get (/opt/atom/resources/app/src/atom.js:54:11)
new PreviewTabsPaneController (atom/packages/preview-tabs/lib/preview-tabs-pane-controller.coffee:12:63)

preview-tabs-preview not being added

When I single-click a file to preview it, the 'preview-tabs-preview' class doesn't get added to the DOM element.
For reference I'm using Windows, with Atom v0.155.0

It looks like this is happening because at the time when PreviewTabsPaneController._onPaneItemAdded is called, the new tab has not been added to the DOM yet, so the method _findTabForEditor doesn't manage to obtain the tab to add the class to:

_findTabForEditor: (editor) ->
  path = editor.getPath()
  @paneView.find(".tab [data-path='#{path}']")

I'm not sure how to fix this.

Atom.Object.defineProperty.get is deprecated.

atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace),
which returns an HTMLElement.

Atom.Object.defineProperty.get (/opt/atom/resources/app/src/atom.js:55:11)
new PreviewTabsPaneController (/home/vicente/.atom/packages/preview-tabs/lib/preview-tabs-pane-controller.coffee:12:63)

Update binding to tab drop events if the tabs remove stopping event propagation

If the tabs package stops stopPropagation on the tabs events, list for the 'drop' event on the pane:

initialize: (@paneView) ->
  @preview = null
  @pane = paneView.model
  @subscriptions =
    paneItemAdded: @pane.onDidAddItem @_onPaneItemAdded
    treeEntryDoubleClicked: new PreviewTabsEventHandler(atom.workspaceView, "dblclick", ".tree-view .file", @_onTreeEntryDoubleClicked)
    onDropped: new PreviewTabsEventHandler(@paneView, "drop", ".tab-bar", @_onTabDropped)

Add a test to the PreviewTabsView spec under 'adding pane items':

describe "when a tab is dropped into the pane", ->
  tabBar = null

  beforeEach ->
    tabBar = $(document.createElement("ul")).addClass("tab-bar")
    pane.prepend(tabBar)

  afterEach ->
    tabBar.remove()

  it "keeps the dropped tab", ->
    pane.addItem(editor)
    expect(previewTabsView.preview).toBeTruthy()
    tabBar.trigger("drop")
    expect(previewTabsView.preview).toBeFalsy()

Can't find the packages on the package manager

Hello !

I love this package and I prefer his way to manipulate "smart tab" than sublime tabs with which I had many bug. But I can't find this package when I search it on atom.com or in the atom app.

If it could coming back it would be awesome :)

Thx

Make a tab permanent when opening from file finder

I would like to be able to open more than one file from ctrl+p file finder without the previous one being closed.
I would take a look and submit a PR when I'm free enough.

BTW: Thanks, great plugin

Bugs: Italic indicator in tab is broken, dbl-click on tab is broken, open from command line broken

Love the package. Great job.

Here's how I expect the package to work in my primary use cases:

  1. Preview a file by clicking on it (works). Previewed tab should be clear that it is in preview mode by being italicized or some other visual indicator (broken now, used to work)
  2. Double-clicking on the the tab should take it out of preview mode (broken). Double-click on the file in the tree-viewer seems to work though. The order of the tabs is strange (next one previewed is not the last tab)
  1. at index.js should open the file in non-preview mode (broken). This is a very explicit action and I expect to keep this file open. Instead it opens it in preview mode, which makes it disappear unexpectedly.

Thoughts? Anything I can do to help?

Merge with sublime-tabs

Hey,

Considering your package's simplicity, we should at least think about merging preview-tabs with sublime-tabs. How that happens, i'm not sure. For "marketing" techniques, i'd advise we leave the name at sublime-tabs, and since I have that package name reserved, i could give you write access, etc.

We could rewrite the source of sublime-tabs to what you have in preview-tabs.

What do you think?

Atom.Object.defineProperty.get is deprecated.

atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace),
which returns an HTMLElement.

Atom.Object.defineProperty.get (/opt/atom/resources/app/src/atom.js:54:11)
new PreviewTabsPanesManager (/home/vicente/.atom/packages/preview-tabs/lib/preview-tabs-panes-manager.coffee:10:29)

Cannot read property 'eachPaneView' of undefined

Atom 1.0

TypeError: Cannot read property 'eachPaneView' of undefined
    at new PreviewTabsPanesManager (/Users/vmakhaev/.atom/packages/preview-tabs/lib/preview-tabs-panes-manager.coffee:11:49)
    at Object.module.exports.activate (/Users/vmakhaev/.atom/packages/preview-tabs/lib/preview-tabs.coffee:9:45)
    at Package.module.exports.Package.activateNow (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:240:19)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/package.js:221:30
    at Package.module.exports.Package.measure (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:165:15)
    at Package.module.exports.Package.activate (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:213:14)
    at PackageManager.module.exports.PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:452:21)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:436:29
    at Config.module.exports.Config.transact (/Applications/Atom.app/Contents/Resources/app.asar/src/config.js:311:16)
    at PackageManager.module.exports.PackageManager.activatePackages (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:431:19)
    at PackageManager.module.exports.PackageManager.activate (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:412:46)
    at Atom.module.exports.Atom.startEditorWindow (/Applications/Atom.app/Contents/Resources/app.asar/src/atom.js:641:21)
    at Object.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-bootstrap.js:12:8)
    at Object.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-bootstrap.js:23:4)
    at Module._compile (module.js:452:26)
    at Object.loadFile [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/babel.js:162:21)

Weird behavior when dragging tabs around

Initially reported in atom/bracket-matcher#76 as it triggers an error in the bracket-matcher package. But I could narrow down the issue to the preview-tabs package, when dragging a persisted tab for the first time, the tab become a preview tab, after more dragging I guess the tab editor is destroyed, leading to an error in the bracket-matcher package.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.