Programming in Sublime Text - why do people like it that much?
37 replies, posted
So, as I saw that many programmers started using [URL="http://www.sublimetext.com/"]Sublime Text[/URL] editor, I decided to give it a try. At first, it seemed to me that it's a great editor. Well, it is. However I still don't understand why people prefer it over great IDEs that we have.
What I find amazing on ST is that it's really fast. It starts under a second. It's also great that I can use regular expressions when I'm trying to find something. Also I can do everything using my keyboard, I don't even need mouse. And yes: the colour scheme and the lightweight design is just awesome.
So I started using the Sublime Text for programming in JavaScript (I'm experimenting with HTML5 games). I'm using RequireJS, jQuery and CraftyJS frameworks and I love inline documentation and code completion. And this is exactly the problem. When I'm using NetBeans, I don't really need to remember anything. I just start typing and NetBeans tells me what I need to know. When I choose some function from a list, it says "well, this function is used for this and with these arguments, which mean this and this; oh, and the function should return this value". NetBeans automatically scans all the .js files in my project and builds an intellisense database from it. It even understands the JSDoc syntax, so I can put my own descriptions to my own code and NetBeans helps me when I need to use that code. Or when someone else wants to use it.
But then, when I switched to Sublime Text, it was like: "Hey, I'm a pretty cool text editor. I look nice, you can do many thing with me, but I know nothing, so don't expect me to help you." I tried to find some code completion packages but all of them were too simple. And when I tried to use RequireJS, the code completion packages for Sublime Text didn't help me at all.
So I wanted to ask you: how the hell can you program without intelligent code completion?
You seem revolted that people don't have the same exact opinion as you do. Not everybody loves complex IDEs or intelligent code completion. Some people prefer simple, lightweight editors. And Sublime Text just happens to be one of the best ones in that category.
[QUOTE=TomsonTom;39266859]So, as I saw that many programmers started using [URL="http://www.sublimetext.com/"]Sublime Text[/URL] editor, I decided to give it a try. At first, it seemed to me that it's a great editor. Well, it is. However I still don't understand why people prefer it over great IDEs that we have.
What I find amazing on ST is that it's really fast. It starts under a second. It's also great that I can use regular expressions when I'm trying to find something. Also I can do everything using my keyboard, I don't even need mouse. And yes: the colour scheme and the lightweight design is just awesome.
So I started using the Sublime Text for programming in JavaScript (I'm experimenting with HTML5 games). I'm using RequireJS, jQuery and CraftyJS frameworks and I love inline documentation and code completion. And this is exactly the problem. When I'm using NetBeans, I don't really need to remember anything. I just start typing and NetBeans tells me what I need to know. When I choose some function from a list, it says "well, this function is used for this and with these arguments, which mean this and this; oh, and the function should return this value". NetBeans automatically scans all the .js files in my project and builds an intellisense database from it. It even understands the JSDoc syntax, so I can put my own descriptions to my own code and NetBeans helps me when I need to use that code. Or when someone else wants to use it.
But then, when I switched to Sublime Text, it was like: "Hey, I'm a pretty cool text editor. I look nice, you can do many thing with me, but I know nothing, so don't expect me to help you." I tried to find some code completion packages but all of them were too simple. And when I tried to use RequireJS, the code completion packages for Sublime Text didn't help me at all.
So I wanted to ask you: how the hell can you program without intelligent code completion?[/QUOTE]
I don't need autocomplete for literally any JavaScript project or any scripting project at all (I only use ST for scripting and markup.) The complexity of such projects are [I]generally[/I] far less complex than something written in C or so on, so I can usually remember what function names I'm working with.
That's basically the one big factor I can think of introspectively, otherwise, I never think about this while I'm working, and that's how convenient ST is for me.
Sublime Text is mostly for script/markup files and general text editing. If you want to compile stuff and/or have intellisense in sublime you need to download plugins.
You can also use makefiles to compile stuff on the side, but that's another story.
I also use it with FTPSync because FTPSync is :krad2: and everyone should use it for pushing to development test beds.
[editline]18th January 2013[/editline]
YO HEY WHAT HAPPENED TO MY :krad2:
I generally prefer not to use code completion as it forces you to remember stuff, not only the various functions of the API(s) you're using but your own code as well.
Sometimes it pays to do things the hard way.
I originally started using Sublime because I needed a cross-platform editor. I know Netbeans and Eclipse are cross-platform as well, but Eclipse doesn't run so well on my older machine and with Netbeans also written in Java I never gave it a shot. Like a few others have pointed out, there's ways to get around programming without code completion. For a beginner it's frustrating, but once you've been programming in a language for a few years you don't really need it anymore. It only becomes useful when working with a library you've never touched before, but then you could just have that library's documentation up on a second monitor.
Sublime is lightweight, beautiful, and has a fantastic editor with a VI-like mode and multiline editing. I'd gladly give up code completion for those features. I do C++ work so the only other thing I'm throwing away is debugging but with MinGW/GCC there's always GDB (and a GDB plugin for Sublime).
Google "SublimeClang" if you want awesome C++ code completion. (does not work on windows)
[QUOTE=SupahVee;39268191]Google "SublimeClang" if you want awesome C++ code completion. (does not work on windows)[/QUOTE]
It works on Windows. It reports some false errors in the STL but you can fiddle around with it so it ignores those.
Assuming you are working with MinGW.
[QUOTE=jalb;39268337]It works on Windows. It reports some false errors in the STL but you can fiddle around with it so it ignores those.
Assuming you are working with MinGW.[/QUOTE]
I never managed to get it working, using MinGW 4.7.2. What do I have to do?
If I wasn't using Vim, I'd probably use Sublime Text.
Why's that stopping you, though? Sublime's got it's vintage mode, which is like Vim.
[QUOTE=Gulen;39271720]Why's that stopping you, though? Sublime's got it's vintage mode, which is like Vim.[/QUOTE]
Why bother setting up a different editor to act like one you already have?
[editline]18th January 2013[/editline]
[QUOTE=TomsonTom;39266859]So, as I saw that many programmers started using [URL="http://www.sublimetext.com/"]Sublime Text[/URL] editor, I decided to give it a try. At first, it seemed to me that it's a great editor. Well, it is. However I still don't understand why people prefer it over great IDEs that we have.
What I find amazing on ST is that it's really fast. It starts under a second. It's also great that I can use regular expressions when I'm trying to find something. Also I can do everything using my keyboard, I don't even need mouse. And yes: the colour scheme and the lightweight design is just awesome.
So I started using the Sublime Text for programming in JavaScript (I'm experimenting with HTML5 games). I'm using RequireJS, jQuery and CraftyJS frameworks and I love inline documentation and code completion. And this is exactly the problem. When I'm using NetBeans, I don't really need to remember anything. I just start typing and NetBeans tells me what I need to know. When I choose some function from a list, it says "well, this function is used for this and with these arguments, which mean this and this; oh, and the function should return this value". NetBeans automatically scans all the .js files in my project and builds an intellisense database from it. It even understands the JSDoc syntax, so I can put my own descriptions to my own code and NetBeans helps me when I need to use that code. Or when someone else wants to use it.
But then, when I switched to Sublime Text, it was like: "Hey, I'm a pretty cool text editor. I look nice, you can do many thing with me, but I know nothing, so don't expect me to help you." I tried to find some code completion packages but all of them were too simple. And when I tried to use RequireJS, the code completion packages for Sublime Text didn't help me at all.
So I wanted to ask you: how the hell can you program without intelligent code completion?[/QUOTE]
The title was misleading. It seems to me your rant here has nothing to do with Sublime Text and is a reincarnation of the ancient "text editor vs. IDE" war.
SublimeText is a text editor. NetBeans is an IDE. You're comparing apples and oranges here.
To answer your question, there are tradeoffs between using IDEs and using text editors. Personally, I prefer using vim because it's lightweight (in comparison to an IDE), now that I've learned how to use it it's extremely powerful, and I find autocompletion to be more of an annoyance than a help. That's my opinion though, and I don't think any less of people who would rather use an IDE, nor do I trash on <IDE name here> because it's different.
[QUOTE=calzoneman;39272408]SublimeText is a text editor. NetBeans is an IDE. You're comparing apples and oranges here.[/QUOTE]
idk man... [url=http://www.wolframalpha.com/input/?i=apples+vs+oranges]comparing apples and oranges?[/url] not that hard...
:v:
[QUOTE=SupahVee;39268841]I never managed to get it working, using MinGW 4.7.2. What do I have to do?[/QUOTE]
4.7.2 may be your problem, I'm not sure. I don't know exactly what all I changed to get it working.
In my SublimeClang.sublime-settings file there's a section called "options" where you specify a bunch of directories. For me it seems to be preset to MinGW 4.7.0 (which is what I'm currently using). Mine looks like this:
[cpp]"options":
[
"-isystem", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/",
"-isystem", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/c++/4.2.1",
"-F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/",
"-isystem", "C:\\MinGW\\lib\\gcc\\mingw32\\4.7.0\\include",
"-isystem", "C:\\MinGW\\lib\\gcc\\mingw32\\4.7.0\\include\\c++",
"-isystem", "C:\\MinGW\\lib\\gcc\\mingw32\\4.7.0\\include\\c++\\mingw32",
"-isystem", "C:\\MinGW\\include",
"-isystem", "/usr/include",
"-isystem", "/usr/include/c++/*",
"-Wall"
],[/cpp]
There's also the assumption that MinGW is installed in the C drive, which is also correct for me. However, I overwrite these settings in my user settings:
[cpp]"options":
[
"-Wall",
"-IC:/MinGW/include",
"-IC:/MinGW/lib/gcc/mingw32/4.7.0/include",
"-IC:/MinGW/lib/gcc/mingw32/4.7.0/include/c++",
"-IC:/MinGW/lib/gcc/mingw32/4.7.0/include/c++/mingw32"
],[/cpp]
Upon doing that I get some errors using a simple hello world only including iostream:
[cpp]C:/MinGW/include\wctype.h:99,33 - Error - definition of variable with array type needs an explicit size or an initializer
C:/MinGW/lib/gcc/mingw32/4.7.0/include/c++\cwchar:145,11 - Error - no member named 'fgetws' in the global namespace
C:/MinGW/lib/gcc/mingw32/4.7.0/include/c++\cwchar:147,11 - Error - no member named 'fputws' in the global namespace
C:/MinGW/lib/gcc/mingw32/4.7.0/include/c++\cwchar:151,11 - Error - no member named 'getwc' in the global namespace
C:/MinGW/lib/gcc/mingw32/4.7.0/include/c++\cwchar:152,11 - Error - no member named 'getwchar' in the global namespace
C:/MinGW/lib/gcc/mingw32/4.7.0/include/c++\cwchar:157,11 - Error - no member named 'putwc' in the global namespace
C:/MinGW/lib/gcc/mingw32/4.7.0/include/c++\cwchar:158,11 - Error - no member named 'putwchar' in the global namespace
C:/MinGW/include\ctype.h:112,33 - Error - redefinition of '_ctype'
C:/MinGW/include\ctype.h:112,33 - Error - definition of variable with array type needs an explicit size or an initializer
C:/MinGW/include\ctype.h:117,34 - Error - redefinition of '_pctype_dll'[/cpp]
The code completion seems to be operational though.
[img]https://dl.dropbox.com/u/11093974/Junk/codecompletion.png[/img]
To get rid of those warnings I have a dirty little fix. In my user settings:
[cpp]"diagnostic_ignore_regex": "C:/MinGW/*"[/cpp]
Way I see it, even if the STL completely bugs out and you don't have code completion for it, do you really need code completion for the STL? Even with code completion I can't understand what the hell is going on with that shit. It works great for deciphering your own custom code, especially if you support a clang build on mac or something.
[QUOTE=SupahVee;39268191]Google "SublimeClang" if you want awesome C++ code completion. (does not work on windows)[/QUOTE]
Damn this sounds pretty good but I couldn't even get pythonbrew to install python 2.6. I'm too fucking lazy for this.
[QUOTE=TomsonTom;39266859]So I wanted to ask you: how the hell can you program without intelligent code completion?[/QUOTE]
with my intelligent brain
[QUOTE=swift and shift;39274248]with my intelligent brain[/QUOTE]
immediately autocomplete swears followed by "php" in head
a++, would use turbcomplete again
[QUOTE=TomsonTom;39266859]What I find amazing on ST is that it's really fast. It starts under a second. It's also great that I can use regular expressions when I'm trying to find something. Also I can do everything using my keyboard, I don't even need mouse. And yes: the colour scheme and the lightweight design is just awesome.[/QUOTE]
This is pretty much why I use Vim. Plus it works in a terminal, plus it works over SSH, plus it has true modal editing.
[QUOTE=TomsonTom;39266859]]So I wanted to ask you: how the hell can you program without intelligent code completion?[/QUOTE]
[QUOTE=swift and shift;39274248]with my intelligent brain[/QUOTE]
The only time I've used code complete is when I used CodeBlocks or MSVC, and it's never really helped me. I've always had documentation at hand or knew in advance what I was writing (I kind of think about my code before I write it).
I use Sublime or MSVC, generally MSVC for the main project and Sublime for anything MSVC doesn't handle well, so with what I'm currently doing my assembly files. I also use Sublime on Linux with Clang when working on my OS and the code-completion works brilliantly there.
Haven't used Sublime Text, but Notepad++ is awesome for scripting.
I used to use Notepad++ on Windows, but since there's no Notepad++ for Mac without Wine, I just went with Sublime. Great text editor, looks nice as well. It's not too fancy and it's pretty simple just to drag and drop files in for some quick editing.
For projects utilizing makefiles or script languages, I just set up a file-tree, clang (if it's C++/C), and I code away.
For projects using Java, C++, or C, I just use an IDE built for that language like Eclipse, Visual Studio 2010, or Xcode.
If I'm in the console and I'm too lazy to open up the file in a text editor, I just run vim.
[QUOTE=SiPlus;39289331]Haven't used Sublime Text, but Notepad++ is awesome for scripting.[/QUOTE]
I used to use NP++ as well, but I stopped altogether once I installed Sublime. It has so much more intuitive features — NP++ pales in comparison. The only thing I don't like in Sublime is the simplistic search system.
[QUOTE=Mozartkugeln;39291588]I used to use NP++ as well, but I stopped altogether once I installed Sublime. It has so much more intuitive features — NP++ pales in comparison. The only thing I don't like in Sublime is the simplistic search system.[/QUOTE]
What's wrong with Notepad++ search system? I like N++ regexp search and replace.
Nothing's wrong with it, it's just vastly inferior to the search features Sublime provides.
[editline]20th January 2013[/editline]
Notepad++ is perfectly fine, at this level it's just a matter of preference
[QUOTE=calzoneman;39272408]Why bother setting up a different editor to act like one you already have?
[/QUOTE]
Because some people are really used to the way things are done in vim, it's much quicker to do stuff using only the keyboard (if you know what to do) Sublime has a lot of built-in shortcuts that enable you to do most things using only the keyboard, though, but there's still that muscle-memory that some people have from Vim.
[QUOTE=SiPlus;39291650]What's wrong with Notepad++ search system? I like N++ regexp search and replace.[/QUOTE]
Nonono, what I meant is that I don't like the search system in Sublime; as a matter of fact, I prefer the NP++ search to it.
[QUOTE=Mozartkugeln;39292571]Nonono, what I meant is that I don't like the search system in Sublime; as a matter of fact, I prefer the NP++ search to it.[/QUOTE]
Ah, I skipped "don't".
It's a nice text editor after you patch the bug which keeps popping up a window every now and then when you hit ctrl+s.
For working with unfamiliar APIs, I much prefer something that has code completion. Without it, to look up a function's arguments I would have to stop typing and switch to another window. I'll have a look at SublimeClang though, it seems promising.
[QUOTE=ThePuska;39293759]It's a nice text editor after you patch the bug which keeps popping up a window every now and then when you hit ctrl+s.[/QUOTE]
It's more of an advertisement than it is a bug: the creator is reminding you that you're on a trial version and that you can purchase the full program. It's kind of like what WinRAR had/has.
Sorry, you need to Log In to post a reply to this thread.