noklesta / SublimeQuickFileCreator

Quick File Creator plugin for Sublime Text
64 stars 26 forks source link

ST3 Support #8

Closed iainsmith closed 10 years ago

iainsmith commented 11 years ago

Hi,

I wasn't able to find Quick File Creator in ST3 package control. Are you planning to support ST3?

julianpinedayyz commented 10 years ago

Same question here ;) Are you planning to support ST3?

mhenrixon commented 10 years ago

:+1:

lumpysimon commented 10 years ago

Not working for me in ST3 on Windows. The panel appears and I can choose a folder, but then nothing happens. Would love to see ST3 support.

twolfson commented 10 years ago

Going to take a shot at this

twolfson commented 10 years ago

ST3 seems to work out of the box on Linux o_o

twolfson commented 10 years ago

And it seems to be in Package Control =_=

twolfson commented 10 years ago

Both file/directory creation seem to work for ST3 on Windows 7. @lumpysimon What version of Windows are you running and what version is your Sublime Text?

lumpysimon commented 10 years ago

I've just done some more testing, here's what seems to be happening:

If I have no file currently open, it works. If I have a file open and I select the current directory, then nothing happens. If I have a file open and I select a different directory, it works.

I'm on Windows 7, ST3 build 3059.

twolfson commented 10 years ago

Hm, still not seeing that issue for your failing case. The workflow is:

  1. Ctrl+Alt+O to open directory prompt
  2. Quick panel opens with directory listing
  3. Select current directory
  4. Quick panel closes, file name entry opens at bottom
  5. Enter name for file press enter
  6. File is created as new buffer but not set saved in file system
  7. Save file (ctrl+s), file appears in sidebar

If you are seeing this break, at which step is it? Also, what do you see in the Sublime Text terminal upon failure (accessed via ctrl+`)?

lumpysimon commented 10 years ago

It breaks after step 3 with the following terminal message:

Traceback (most recent call last):
  File "SublimeQuickFileCreator in C:\Users\Simon\AppData\Roaming\Sublime Text 3\Installed Packages\Quick File Creator.sublime-package", line 80, in dir_selected
KeyError: 'E:\\Websites\\blippress.com\\wp-content\\plugins\\blippress'

(This is only if I have a file currently open and I select the current directory, otherwise all is fine)

twolfson commented 10 years ago

Successfully reproduced!

screenshot from 2014-06-01 18 48 50

I have had this same issue with multiple folders open on Linux. The workaround is to select the non-full path (in your case blippress, in my case tmp-hai).

I will attempt to get a patch for this open.

twolfson commented 10 years ago

On Linux in ST2*

twolfson commented 10 years ago

Fwiw, this should really be a separate issue, as it is unrelated to the initial description =/

twolfson commented 10 years ago

Hm, maybe it was on OSX (not seeing the behavior as I recally). I will patch for Windows.

twolfson commented 10 years ago

Alright, I have traced down the issue. It is the way we handle split paths in Windows. When we split F:\hai, it is broken into ('F:\\', 'hai'). The original part has more characters than F:\ which is causing issues because we were relying on Linux/UNIX not needing to escape slashes.

twolfson commented 10 years ago

I have created a patch and submitted it on #9.

lumpysimon commented 10 years ago

Thanks very much