Home Download Buy Blog Forum Support

Sublime Text & FTP -- 4Kb file limit?

Sublime Text & FTP -- 4Kb file limit?

Postby Teqnoqolor on Sat May 14, 2011 10:25 pm

Hello,

I have been trying to get FTP to work in Sublime Text like it does in Coda. In the sidebar are all your remote files, which can be viewed/edited easily without the need to swap back to your FTP software and choose which files you want to edit (or confirm uploads in the case of Filezilla).

I recently came across an article for how to use gEdit (I'm running Ubuntu) for remote editing. Basically you set up the FTP connection as a drive and then you can easily open the folder within gEdit.
i thought this was really cool, but I wanted to use Sublime Text so I added the same FTP folder to the sidebar and KA-BAM! I had FTP Remote Editing inside Sublime Text!!

I was pretty stoked right now, it was like Sublime Text had just become 10x as awesome!
However I quickly came across a problem that makes this method unusable: Sublime Text couldn't open any files that were larger than 4Kb, it would just open it as an empty file! I don't think it was the connection, as I could open the same files within gEdit and other text editiors. It was like Sublime Text had a limit on the file size over FTP.

Does anyone else have this problem?
Teqnoqolor
 
Posts: 4
Joined: Sat May 14, 2011 8:24 pm

Re: Sublime Text & FTP -- 4Kb file limit?

Postby hcabbos on Sat May 14, 2011 11:06 pm

I'm on a Mac but what you describe is interesting. I use Transmit which allows for an FTP connection to be mounted as a disk on the desktop/file system. So I opened up Sublime Text and added that mounted disk to the sidebar. Works great. And I have no problem opening up more than 4K. The biggest file I had was 35K and it opened just fine.
hcabbos
 
Posts: 11
Joined: Thu Mar 03, 2011 2:03 pm

Re: Sublime Text & FTP -- 4Kb file limit?

Postby Teqnoqolor on Sat May 14, 2011 11:48 pm

Just tried it on Windows 7 with Netdrive. Everything seems to be working ok!

Strange how Ubuntu isn't working, I'll try out Curlftpfs and also a fresh live image of Ubuntu.
Teqnoqolor
 
Posts: 4
Joined: Sat May 14, 2011 8:24 pm

Re: Sublime Text & FTP -- 4Kb file limit?

Postby Teqnoqolor on Sun May 15, 2011 1:17 am

Tried again on Ubuntu, even on a fresh install it won't open files greater than 4kb over an Ubuntu FTP connection.

I managed to get it working with curlsftpfs! However it was extremely slow... Though I'm thinking that I must have done something as a lot of other people have got it working fine for them.
Teqnoqolor
 
Posts: 4
Joined: Sat May 14, 2011 8:24 pm

Re: Sublime Text & FTP -- 4Kb file limit?

Postby Teqnoqolor on Sun May 15, 2011 4:55 am

Ok, there is definitely something with Sublime Text and 4Kb.
I was running windows 7, with Sublime Text 2 and NetDrive. I could open files of any size and edit them, but when I saved them only the first 4kb of the file would be saved - the rest of the file would be deleted!
Teqnoqolor
 
Posts: 4
Joined: Sat May 14, 2011 8:24 pm

Re: Sublime Text & FTP -- 4Kb file limit?

Postby jps on Sun May 15, 2011 11:42 am

Sublime Text doesn't know anything about FTP in particular - it always reads and writes files the same way (via fopen and fread/fwrite respectively), irrespective of if it's operating on a local or remote file. For reference, I've read and written files larger that 4kb over remote connections just fine, and there haven't been any other complaints of a similar issue.

I'd hazard a guess that there's something else going on here: I'd suggest either trying a different FTP server, or trying different software (such as notepad on Windows), and seeing if the same behavior is there or not.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: Sublime Text & FTP -- 4Kb file limit?

Postby inhji on Mon Jul 25, 2011 9:39 am

I also ran into this rather annyoing issue.
Running the latest Linux Mint.

Whenever I try to open a ftp server through 'mounting' it as a drive like Teqnoqolor described, Sublime Text just opens up an empty file. The loading bar doesn't show up either.
When I do the same thing on gEdit, everything works fine!

EDIT: Opening Local files works super fine. Sublime Text is awesome :)
inhji
 
Posts: 1
Joined: Mon Jul 25, 2011 9:33 am

Re: Sublime Text & FTP -- 4Kb file limit?

Postby Cyberdyne on Fri Sep 02, 2011 1:59 pm

Same here on Ubuntu 11.04 64bit. I've mounted an FTP location via GVFS; Sublime 2111 opens all files under 4kb nicely but everything above 4kb just shows up as an empty line. When i open the same files via gEdit using the same FTP mount there are no problems. Sublime beats gEdit in so many ways, but this annoying bugs keeps me from using Sublime at all.
Cyberdyne
 
Posts: 1
Joined: Fri Sep 02, 2011 1:50 pm

Re: Sublime Text & FTP -- 4Kb file limit?

Postby timotheus on Sun Sep 04, 2011 1:12 am

Cyberdyne wrote:Same here on Ubuntu 11.04 64bit. I've mounted an FTP location via GVFS; Sublime 2111 opens all files under 4kb nicely but everything above 4kb just shows up as an empty line. When i open the same files via gEdit using the same FTP mount there are no problems. Sublime beats gEdit in so many ways, but this annoying bugs keeps me from using Sublime at all.


I am experiencing the same thing in Ubuntu 10.04 LTS 32bit. Quite frustrating! If I connect to a location via a directory mounted with sshfs it works fine. Of course, ftp connections won't allow this. Once this is fixed, I am buying this for sure.
timotheus
 
Posts: 1
Joined: Sun Sep 04, 2011 1:10 am

Re: Sublime Text & FTP -- 4Kb file limit?

Postby tylerjwilk on Sun Sep 08, 2013 11:05 pm

Cyberdyne wrote:Same here on Ubuntu 11.04 64bit. I've mounted an FTP location via GVFS; Sublime 2111 opens all files under 4kb nicely but everything above 4kb just shows up as an empty line. When i open the same files via gEdit using the same FTP mount there are no problems. Sublime beats gEdit in so many ways, but this annoying bugs keeps me from using Sublime at all.

I am in the same boat. This bug is forcing me to use gEdit in place of Sublime.
Since we are forced to use gEdit you may be interested in this article that helps level the playing field with gEdit: http://www.micahcarrick.com/gedit-html-editor.html
tylerjwilk
 
Posts: 4
Joined: Sun Sep 08, 2013 10:12 pm


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot], imocoder and 18 guests