If you insist on working directly with the remote files, then Git wonāt help you - at least not easily. As I mentioned earlier, there are steps you need to take BEFORE learning Git. The first step is to learn how to setup a local development instance. If you arenāt willing to do that, then I wouldnāt bother with Git yet. Just make sure your server makes backups often.
Built-in FTP
yep, youāre right.
The main reason why I want to work remotely is I donāt like huge apps like wamp & itās too hard to setup my site locally(Iāve made my own CMS), often I make changes in server configuration.
Sometimes I even wonāt be able to check my site locally, because It uses many APIās which listen to some queries from another servers.
My xampp folder has about 1.2Gb. Half of this is mysql data, a quart of this are logs. Considering the cost of the storage today, this is not huge at all, not even for a SSD. So this argument is not valid.
Hard to setup? Download, extract, done.
If your own CMS is hard to setup, probably you did something wrong.
At the end of the day i just hope you realize that your workflow is the problem. Not N++, not sublime not any other editorā¦
I am new to ST2 and really like it. I immediately bought it after a short testing period. I am developing Web-Projects on a Zope Server.
To develop in Zope even on a local installation, the most convenient way ist to do this via ftp. I bought the sftp plugin, which is big help. But to be able to have ftp
folders in the sidebar would be most helpful. I agree when developing in PHP for example it is easiest and best to use wammp or xammp. But to have ftp in an editor
should be imo a standard feature.
Happy new year btw
I struggle with the answers provided here. I understand git, I understand the obvious benefits of code versioning with it, not deploying buggy software to a live server, etcā¦ I get it. I want it. It sounds great -on paper- but Iāve never found a good way to actually -use- it because of databases.
Iām not going to pull down a 2gb SQL database as part of a git pull every time I start to develop. And when working with CMS frameworks like drupal, wordpress, joomla, etcā¦ the database structure of those changes almost everytime thereās a core or module update (which is often.) So just doing the download ONCE and using that for developing against is not an option. Setting up something complicated like a sql replication system to your local workstation is not only silly, but would be an interesting conversation with your IT staff at work as to why you need to open your SQL ports on your local workstation to the internet.
I spent months trying to find some kind of git workflow working where every time I saved a file in an IDE it pushed it to the server with git so that I could test, and when I was finished commit it to version control. Everywhere I looked for help, I kept getting the same answer:
āGit is not a deployment toolā
(stackoverflow.com/questions/9619 ā¦ git-github )
In the end I settled on editing files directly over SFTP and committing gits on the server via remote desktop once I was happy with the results. Itās FAR from an ideal solution, but it was only one that I could figure out that is manageable.
Because of this, lack of good SFTP support is what has stopped me from purchasing sublime text because I love every other aspect of it. If anyone has a better solution for me, Iām all earsā¦ but saying āif youāre editing remotely, youāre doing it wrongā and using that as a basis to not have a feature that 95% of all other IDEs use is a bit narrow minded.
FTP sounds like an amazing addition to the program to me! Hope to see it in SLT2 or maybe SLT3!
@anakinjay: there are pretty rare situation when you will always need a full sql dump. Most of the time few entries would be enough (like, letās say, 20-30 posts). I develop this way for about 2 years or so (before that i also used to work on ftp, but loosing about 2 weeks work was good enough to make me to do the switch)
Btw, this tool looks interesting: dbv.vizuina.com/
[quote=āanakinjayā]I struggle with the answers provided here. I understand git, I understand the obvious benefits of code versioning with it, not deploying buggy software to a live server, etcā¦ I get it. I want it. It sounds great -on paper- but Iāve never found a good way to actually -use- it because of databases.
Iām not going to pull down a 2gb SQL database as part of a git pull every time I start to develop. And when working with CMS frameworks like drupal, wordpress, joomla, etcā¦ the database structure of those changes almost everytime thereās a core or module update (which is often.) So just doing the download ONCE and using that for developing against is not an option. Setting up something complicated like a sql replication system to your local workstation is not only silly, but would be an interesting conversation with your IT staff at work as to why you need to open your SQL ports on your local workstation to the internet.[/quote]
Wow, someone understand me!
Although Iām not gonna use git to store files remotely(not web-server), I wanted to have file history & update files on web-server every time.
For those that want better SFTP support in ST2, I urge you to look at WinSCP. In its preferences, you can specify an editor. Now, when you double click a file, it opens in that editor - you make changes and hit CTRL-S to save the file. WinSCP monitors that file (stored in a local temp buffer) and automatically uploads it back to the server for you.
You donāt get to utilize the sidebar of ST2 as itās intended. But you do get all the features of WinSCP. For the few sites I still live-edit, this is the best method Iāve found. All the power of ST2 far outweighs the SFTP plugin that N++ (or any other editor) has.
[quote=āSeanWcomā]For those that want better SFTP support in ST2, I urge you to look at WinSCP. In its preferences, you can specify an editor. Now, when you double click a file, it opens in that editor - you make changes and hit CTRL-S to save the file. WinSCP monitors that file (stored in a local temp buffer) and automatically uploads it back to the server for you.
You donāt get to utilize the sidebar of ST2 as itās intended. But you do get all the features of WinSCP. For the few sites I still live-edit, this is the best method Iāve found. All the power of ST2 far outweighs the SFTP plugin that N++ (or any other editor) has.[/quote]
Thank you, Iāll try it.
I have a good reason for FTP to be built in.
And yes, I know what git is and use it for most of my projects.
But sometimes you need to edit files on remote ftp that are NOT website related.
E.g. wowza config files or some internal settings for a script, which is running on remote server.
When you have a dozen of servers and just a few configs on each of them I find it more complicated to bring in the git for such simple tasks.
And like the original poster I do have to resort to using NP++ now.
P.S.
I am using Mac
I would love Sublime Text to have built in FTP ā in the same manner as Coda.
ā
Iām in support of the old-fashioned way of live editing sites.
Iāve made over 200 websites and know exactly what Iām doing. I work on multiple computers and have no desire to setup each with a development environment. I have no desire to pull from git repositories every time I want to make edits and then push them back. Iām working by myself on sites ā not with a team.
GIT is for version control and is FANTASTIC when you are writing software. Itās FANTASTIC if youāre working on a team project ā perhaps even a web app.
But creating a Wordpress or Drupal site on git? Having multiple machines with test environments installed? Having to setup repos for 100s of sites and push and pull whenever you want to make and test small changes? No thanks.
With database driven sites, often times I am working within the CMS aspect and the HTML/PHP template simultaneously and jumping back and forth.
When this is the case, using GIT is just cumbersome.
Besides, I also like to know how FAST things load remotely while Iām working on them. I donāt care how fast they work on my local machine.
Thereās every advantage in the world to work on the actual thing.
The argument is āWhat if you mess something up?ā
Answer: Fix it. Any argument that one could lose two weeks of work by editing this way is absurd. Who is so terrible at programming websites that they make one mistake and destroy that much code? I can understand destroying a database by mistake - but Git has nothing to do with that. And if you wrote code that produced a horrible SQL query that destroyed a database, Iām not sure what git would do to help.
ā
Iām not working on enterprise level projects ā and if I was, Iām sure Iād have a team with me and weād be working on the local intranet on a dev site and pushing things at a different rate and discussing iterations over coffee.
But is that who Sublime is developed for?
And are the people who wrote Coda absolutely idiots?
No, of course they arenāt idiots. They wrote an amazing FTP client and made an editor that has it built in to facilitate this function. The product sells like hotcakes and there are many people out there using it this way without catastrophes caused by idiotic programming.
ā
I do most of my development on a Windows 7 desktop ā I find Windows to be much easier to work with than MacOS for many reasons. I use a MacBook Pro when Iām working remotely. I yep, I use Coda 2 on my MacBook and itās absolutely awesome. I absolutely would LOVE to have it on my PC. Coda would be my #1 reason to get an iMac as my next computer. If not the only reason.
I recommend using something like Swish on Windows. Iām pretty sure OSX supports this sort of thing natively. Mount the remote filesystem as a folder/drive and your editor doesnāt have to be a network client as well.
Iām new to ST2 and after using it for a day, I must say itās unlike any editor Iāve used, reminds me of the seamless workflow of Maya Autodesk. Iām a bit of an old school Adobe enthusiasts and have been using the code view in Dreamweaver for years . Although most of the features DW presents to programmers are useless to say the least, one thing I do miss is the built in FTP client that maintains the folder structure of project you create, itās clean and concise. After being so used to DW, I couldnāt stand having to switch to a desktop FTP client every time I needed to upload something, I like everything in one spot. So after a bit of Googling, I found an SFTP plugin that does the one thing I need it to do, it maintains the folder structure allowing file transfer with the click of a button, I immediately purchased a license after using the plugin for literally 10min, Iād highly recommend it to anyone looking for native SFTP/FTP support : wbond.net/sublime_packages/sftp .
If you are someone who has many clients/projects rolling at once, working locally can be extremely tedious, especially with multiple database driven CMS, who wants to maintain 10-15 different databases locally? I even find while working on an app, syncing with a remote server can be beneficial for unit testing and whatnot. I can honestly say Sublime SFTP is an excellent replacement for a desktop client if you donāt mind shelling out the $16 bucks for a license, well worth it IMO.
[quote]The argument is āWhat if you mess something up?ā
Answer: Fix it. Any argument that one could lose two weeks of work by editing this way is absurd. Who is so terrible at programming websites that they make one mistake and destroy that much code? I can understand destroying a database by mistake - but Git has nothing to do with that. And if you wrote code that produced a horrible SQL query that destroyed a database, Iām not sure what git would do to help.[/quote]
It happened couple of times to do major changes to a file, just to be asked by my clients to revert it back after few days/a week.
It happened several times to change a file and my client to overwrite just because his editor remembered last opened file and just overwrite.
It happened once that the editor - e-texteditor - to crash just while the file was saved/transfered. After i restarted the editor i was shocked to find a beautiful empty file (i found out eventually that had a temp file; it was the worse 10 minutes of my developer life!)
Just because you have over 200 websites made and know exactly what are you doing doesnāt protect you from a major screw up. And when you do - because you gonna screw up eventually, itās just a matter of time! - wonāt be nice.
Iām interested too in a built-in FTP/SFTP support in sublimetext.
Iām seeing that the discussion is moved on āif is this right or not?ā. Personally i agree that itās unsafe for many reasonsā¦ but in the real world there are a lot of situation who requires remote editing. Not just a matter of development, sometime just need to change configurations files remotely throught ftp or ssh or work on embedded platform that have just an ftp or telnet access. I think we are all grow up people, we know the risks and we accept them.
So, if itās possible come back to the original topic, thereās any way to have a real working ftp/sftp on sublime text 3? Until now iām using it with filezilla (who support remote editing) but everytime i change a file i need to put the focus on the filezilla window and accept the new file update. A fully integrated support in sublimetext would be really really more reliable
Iām really hoping in it
Regards
Sandro
[quote=āiamntzā]
[quote]The argument is āWhat if you mess something up?ā
Answer: Fix it. Any argument that one could lose two weeks of work by editing this way is absurd. Who is so terrible at programming websites that they make one mistake and destroy that much code? I can understand destroying a database by mistake - but Git has nothing to do with that. And if you wrote code that produced a horrible SQL query that destroyed a database, Iām not sure what git would do to help.[/quote]
It happened couple of times to do major changes to a file, just to be asked by my clients to revert it back after few days/a week.
It happened several times to change a file and my client to overwrite just because his editor remembered last opened file and just overwrite.
It happened once that the editor - e-texteditor - to crash just while the file was saved/transfered. After i restarted the editor i was shocked to find a beautiful empty file (i found out eventually that had a temp file; it was the worse 10 minutes of my developer life!)
Just because you have over 200 websites made and know exactly what are you doing doesnāt protect you from a major screw up. And when you do - because you gonna screw up eventually, itās just a matter of time! - wonāt be nice.[/quote]
So you are saying if youāre working directly on FTP youāre doing it wrong, then go on to give several examples of problems you ran into because you donāt have a proper backup system set up.
Every issue you had would easily be fixed with a proper backup system. Having no backup system is a much more egregious example of ādoing it wrongā than directly editing files via FTP (IMO).
[quote=āiamntzā]
Do you have one good reason for this?[/quote]
I think I can have many reasons why I donāt want to create a local development environment.
Say if I canāt install a database or port 80 not available for apache or no disk space or it is not my personal computer orā¦
That way, I would love to be able to edit files directly on my FTP server.
And I can have backup on my FTP, so I cannot mess things up too bad that I have no way to recover my changes.
I understand git and svn and the importance of version control in many projects.
However there are many instances of wanting to quickly edit a file on a webserver without the necessity of version control.
Just because some arbiter considers it bad practice is no reason why an app shouldnāt be able to deliver that functionality.
Iām not familiar with Coda, but just to note ( as is my practice in fixing a lot of minor items on a webserver ), my workflow which allows me to edit live files works with Sublime as it has with my other text editor/ftp combo BBEdit and Interarchy.
With Interarchy, Get info on letās say .html files and set double click to open files in editor -> select Sublime.
When you double click a file in Interarchy it then opens it in Sublime.
When you do any edits and āSaveā the file it uploads it back to Interarchy.
Thatās it. Live file is changed.
hth