Giter Site home page Giter Site logo

iopener's Introduction

iOpener

A Sublime Text 2/3 package to make finding and opening files less painful. Keep your hands on the keyboard with smart auto completion, history, and directory listings.

Usage

Use cmd + o or cntl + o as usual (or choose Find File in the command pallete.)

  • Pressing tab will cause smart completion to occur (hint: f1 can complete to filename1!)

  • Double-pressing tab will give you the directory listing

  • Up/down allow you to navigate previously entered paths

  • Opening a path that doesn't exist will create a new file or directory

demo

NB

  • This plugin will take over your default 'open file' shortcut. To use your system default, use cmd + shift + o or ctrl + shift + o

  • The open panel will not show unless a window is open. You will need to use cntl + n or cmd + n to open a new window first

Installing

Installation is easiest using Package Control. In the Command Pallette, select "Install Package" and then select "iOpener".

Bugs

Bugs can be reported on GitHub, https://github.com/rosshemsley/iOpener.

Development

Run unit test with

pip install tox
tox

iopener's People

Contributors

chovin avatar jacquesh avatar mattst avatar rosshemsley avatar stoivo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

iopener's Issues

Open file relative to active file

Hi,
It would be nice if I could open files relative to the currently active file. I regularly work with projects that are 5+ folders deep. Having to start navigation from the project root every time is a hazzle.

Example:
The project root is at /somedir/root, and I have the file /somedir/root/level1/level2/level3/myfile.py open. I'd like to open the file <project root>/level1/level2/level3_2/myotherfile.py.

Current process:

  • ctrl+o opens the navigation at /somedir/root/
  • Enter /level1/level2/level3_2/myotherfile.py to open the file.

Suggested addition:

  • ctrl+shift+o opens the navigation at /somedir/root/level1/level2/level3/
  • Enter ../level3_2/myotherfile.py to open the file.

Thanks for a great plugin. The auto completion features are excellent.

[Feature request] One press Tab for directory listing

Request

Please, add one-pressing Tab, not two-pressing Tab for Directory listing.

Justification

Now if exist 2 or many files, when may be a completed, after first press Tab I saw Complete, but no unique in Status Bar and I need press Tab again.

Two Tab

I do not understand, why must press Tab 2 times. One-time press saves time for users.

Extended behavior

Ctrl+Shift+PiOpener: Find File → I press first letters of name file of folder → I press Tab → if completed files more than one I still get Quick Panel, when I can select file or folder.

Even better, if you will make autocomplete. Ctrl+Shift+PiOpener: Find File → I press first letters of name file of folder → Quick Panel is open automatically.

Examples in other applications

Far Manager autocomplete file/folder:

Far Manager

Thanks.

Doesn't appear in Package Control

Hi,
I was willing to try your plugin, but I can't find it in Package Control. I searched it with "iOpener", "opener", "i open", etc… but it never shown up.

I'm on Linux, I tried with both ST 2 and 3 with an up-to-date version of PC, and several times over the past week.

tab completion should be case-insensitive

Great plugin!

Tab completion should be case-insensitive. If I type "drop" and hit tab it should complete to "Dropbox". Don't you agree?

Thanks again for the great plugin.

delete word should consume slash

On the mac, option-delete deletes a word. In the iOpener input panel, it should consume a slash. At the moment it does this:

~/some/directory
~/some/ (after option-delete)

but it should do this:

~/some/directory
~/some (after option-delete)

:)

Sublime hangs when opening relative path

Sublime Text 3 (Build 3095) hangs when opening a file with a relative path (like \Documents\text.txt) on Windows 10. Absolute paths like C:\Documents\text.txt work fine.

iOpener v 2.0.1

Open file initial paths different on Linux and Mac

When opening a file on linux the path always starts with the home directory ~/ while in mac the current directory of the file you are viewing is the starting path.

Actually looking at it this is most likely something to do with how my projects are set up in linux (I don't really use projects, I use iopener for most stuff).

sublime.active_window().project_data()
{'folders': [{'path': '/home/stredger', 'follow_symlinks': True}]}

sublime.active_window().active_view().file_name()
'/home/stredger/db/fs/misc/simple.ns'

The code appears to take the project path if its available, so this is most likely my problem!

path / word boundary def?

in navigating bach through paths i have to hit delete twice, to remove the name and the "/" separately.
would be good to just cut the whole path segment, like most shells do.

also when i open a directory with this plugin it will open a new window, is that expected?
would be great to select that location in the sidepanel..

can't open after switching project

After switching a project, I'm unable to use iOpener, the callstack is here :

Traceback (most recent call last):
  File "/opt/sublime_text_3/sublime_plugin.py", line 526, in run_
    return self.run()
  File "i_opener in /home/*****/.config/sublime-text-3/Installed Packages/iOpener.sublime-package", line 375, in run
  File "i_opener in /home/*****/.config/sublime-text-3/Installed Packages/iOpener.sublime-package", line 123, in __init__
  File "i_opener in /home/*****/.config/sublime-text-3/Installed Packages/iOpener.sublime-package", line 88, in get_current_path
KeyError: 'folders'

alphabetical order

Hi,

First thanks for this great plugin ! I just installed it and will be using it a lot most certainly ;)

I was wondering why is the directory sorted that way and not in alphabetical order ? Sorry if I missed something but the documentation seems pretty clear though ;)

Cheers,

Simon

CJK filenames support?

My Mac folders include some files named in CJK encoding. When browsing with iOpener, those filenames are broken. I heard that Mac uses some non-standard(?) unicode-D (?) character encoding for filenames. Any suggestion?

KeyError when trying to add folders to empty window/project

Traceback (most recent call last):
  File "/Users/Chovin/Library/Application Support/Sublime Text 3/Packages/iOpener/i_opener.py", line 212, in open_file
    project_data['folders'].append(folder)
KeyError: 'folders'

This is possible when this setting is false: "open_folders_in_new_window": false
and results in no folder being added to the window/project

absolute path at end of current path should find existing dir

Hi,
I love iOpener!
I have a small enhancement request: If I enter an absolute path at the end of the current path, then it should resolve to the new path instead of trying to append to the existing path.
e.g. I hit ctrl+o and get:
/data/projects/my_project/
which is where the current file is located. So far so good. Now I want to open a file in my home directory, say my .bashrc file. I want to be able to type it right at the iOpener prompt like this:
/data/projects/my_project//.bashrc
But iOpener thinks this path doesn't exist, well, because it doesn't exist. The enhancement is to recognize when an absolute path is being entered and trigger resolving to just that path instead of trying to use the entire path in the prompt. So the above should resolve to just "
/.bashrc" and be able to find an open the file. Currently I have to backspace over the existing path to enter the absolute path I want.
Same for non-home directories. e.g. start with:
/data/projects/my_project/
and type at the end to get:
/data/projects/my_project//tools/config/my_file.cfg
should resolve to just "/tools/config/my_file.cfg".
The tab key should do the resolution too to prompt files in the new directory. e.g.:
/data/projects/my_project//tools/config/
should prompt to show files in the /tools/config directory.
Thanks!
Michael

Consider selected text on activation

Thanks for a great plugin!

I have a suggestion: If any text is selected when activating the plugin, and it is an absolute path to a file, then open straight away. If it is a folder then use as the basis for the plugin.

I made a fork...

Very nice to see that this excellent plugin is being maintained again.
I have been using my own personal modification of this for a long time, and recently thought i make a proper release of it. I didn't know about the new maintenance of this plugin when i started tidying up my own.

I restructured the files and stuff quite a bit, so it isn't possible to make PR to this repo as it is now.
One thing, i made now, that i kind of regret is that i modernized the code to use import typing and statically typed the whole thing, so now it doesn't work on ST3 and below...

The main advantage with my fork is that it separates the tabcompletion into its own module, then i made two separate "command modules" PathBoxOpen (more or less same functionality as iOpener), and PathBoxMove which let you move and rename files with the same tabcompletion UI. This structure also makes it super easy to add more commands that would like to use the same UI.

If there is interest I could try porting the PathBoxMove functionality into a PR compatible with this repo.

https://github.com/budlime/PathBox

I have not submitted my version to PackageControl, thought i talk with you guys first.

Sublime Text 2 support?

Hi,

iOpener is very useful, thanks very much for writing it, I use it a lot.

I was just wondering what the reason was for the lack of Sublime Text 2 support? Is there something used from the ST3 API which is unavailable in the ST2 API? I was thinking about cloning and seeing if I could get it running on ST2 but won't bother if there's a major technical barrier.

Although I use ST3 for all my programming, I use ST2 for some other text editing, it is my default text editor in fact. I find it useful to have both ST2 and ST3 installed so that I can have a much smaller window size with ST2 and a new ST2 window created for each file I edit (useful if you use lots of workspaces in use and don't want to change workspace just to quickly edit a file). So it would be nice if iOpener worked with ST2 as well.

Thanks.

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.