Git Product home page Git Product logo

closefolder's Introduction

CloseFolder Sublime Text plugin

Package Control GitHub tag

A simple Sublime Text plugin to close all open files of current directory or all open files inside some directory. Supports Sublime Text 2 and 3.

Motivation

  1. When doing web development project, the tab count easily shoots up to 30+ in no time. By this time, figuring each tab starts becoming difficult as only few characters of the filename can be seen. With this I can quickly close an old folder (which I may not need now) and generate some room.
  2. I keep all my college semester lab work in a single project. Whenever I need to make some room, I close a past 'lab' folder.
  3. When I take part in a coding contest/marathon, I create a folder for it and then keep all related files in there. By the end of the contest, I easily have 10+ tabs opened for it. This plugin helps me remove them all at once.

Installing

Search for CloseFolder and install it via Package Control.

OR

Download this repo, extract it and then place CloseFolder folder in Packages directory of ST.

Using

There are 2 commands in this plugin.

  1. close_folder - Closes all files which are in the same directory (& below) as the file opened in the active tab. This can be activated by following ways.

    1. Right click in the Sublime Text editing area and select 'Close Folder' option.
    2. Open Command Palette (Ctrl-Shift-P) and run CloseFolder: Close all files in this folder recursively.
  2. close_folder_dirs - Closes all files which are inside the selected directory, recursively. This can be activated from the sidebar by right clicking on the folder and selecting 'Close Folder' option.

Screenshots

screen shot 2017-01-12 at 5 56 46 pm screen shot 2017-01-12 at 6 02 22 pm
stcp potato

closefolder's People

Contributors

aviaryan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

closefolder's Issues

[Feature request] Resursively close files from command palette [Don't fixed]

1. Request

It would be nice, if will be possible to close files recursively from command palette.

2. Justification

I think, that working in command palette — is better. This saves time in comparison with navigation in the sidebar. About more reasons see here.

3. Desirable behavior

For example, I have folder RootFolder:

D:\RootFolder
├───FirstSubfolder
│       FirstFile.txt
│
├───SecondSubfolder
│       SecondFile.txt
│
└───ThirdSubfolder
    └───Subsubfolder
            ThirdFile.txt

FirstFile.txt, SecondFile.txt and ThirdFile.txt open for me in Sublime Text. I open tab with FirstFile.txtCtrl+Shift+PCloseFolder: Close Folder Recursively → all files in RootFolder, include SecondFile.txt and ThirdFile.txt close for me.

Thanks.

Close Folder command does nothing in Sublime 3.2.1

On OSX 10.14.6 (18G87)
Sublime 3.2.1 Build 3207

Activating Close Folder via any method (right click in file, right click on folder in project file list, or use command pallet) results in a failure. No tabs get closed. Console error:

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 1088, in run_
    return self.run(edit)
  File "/Users/admin/Library/Application Support/Sublime Text 3/Packages/CloseFolder/CloseFolder.py", line 15, in run
    if os.path.dirname(vw.file_name()).find(dirname) == 0:
  File "./python3.3/posixpath.py", line 151, in dirname
AttributeError: 'NoneType' object has no attribute 'rfind'

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.