Sublime Forum

Sublime Text & FTP -- 4Kb file limit?

#1

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?

0 Likes

#2

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.

0 Likes

#3

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.

0 Likes

#4

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.

0 Likes

#5

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!

0 Likes

#6

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.

0 Likes

#7

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 :smile:

0 Likes

#8

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.

0 Likes

#9

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.

0 Likes

#10

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: micahcarrick.com/gedit-html-editor.html

0 Likes