News for hackers. Stuff that matters.
Re:Sublime Text 3 dev build 3128 released by news_to_me on Wednesday April 12, 2017 @11:38AM (#14098712)
I love Sublime Text. I really dislike heavy IDEs, so for me, it's almost the perfect editor.

But... am I the only person who wants a minimal editor like Sublime, plus an inline debugger? Debugging where you edit code is one of those super-features that I really don't understand why people prefer not to have it.

Ideally it would be something generic and lightweight, with the ability to extend via plugins. The debugging plugins I've used so far just don't cut it though - if I can't click on a line number to add a breakpoint, it isn't good enough.

Re:Sublime Text 3 dev build 3128 released by xienze on Wednesday April 12, 2017 @11:46AM (#14098827)
You're describing VS Code. Now you may not think it's lightweight, but for anyone not toiling away on a turn of the century machine it's plenty fast and has great debugging facilities.
Re:Sublime Text 3 dev build 3128 released by bpicolo on Wednesday April 12, 2017 @11:53AM (#14098882)
I actually switched to VS Code vs Sublime for most tasks just recently. It has a few quirks (looking at you, files that just close for no reason) and isn't quite as quick, but the language/debugging packages and support are just leagues better.
Re:Sublime Text 3 dev build 3128 released by jdi on Wednesday April 12, 2017 @03:27PM (#14100939)
> ... files that just close for no reason)

Do you mean if you select (preview) a file from the tree browser on the left, the file appears, but if you select another one, it goes away ?

Use this setting/preferrence:

"workbench.editor.enablePreviewFromQuickOpen": false,

Re:Sublime Text 3 dev build 3128 released by tedmiston on Thursday April 13, 2017 @10:50AM (#14107404)
Or double click to fully open them.
Re:Sublime Text 3 dev build 3128 released by parthdesai on Wednesday April 12, 2017 @12:12PM (#14099070)
I only go back to sublime when i have to open really large files. Apart form that, couldn't be more happier with VS Code.
Re:Sublime Text 3 dev build 3128 released by mos_basik on Wednesday April 12, 2017 @01:00PM (#14099532)
...as a sublime user, I go back to vim when I have to open really large files.

I've never used vscode, but this makes me wonder how small a file has to be for vscode to manipulate it quickly.

Re:Sublime Text 3 dev build 3128 released by educar on Wednesday April 12, 2017 @01:17PM (#14099699)
I have had better luck with sublime when opening very very long lines (think 56k chars). This comes from a sqldump. Even vim was not up to the task.
Re:Sublime Text 3 dev build 3128 released by mos_basik on Wednesday April 12, 2017 @03:30PM (#14100965)
My case was also a sqldump, actually. I forget what I eventually did. I think it had to do with hitting Ctrl-C to stop the entire file from loading up front, and only load the page I was looking at.

The link to this SO question was purple when I Googled this just now: http://stackoverflow.com/questions/908575/how-to-edit-multi-...

In retrospect, I do remember also messing around with disabling syntax highlighting and splitting the file up into more manageable chunks that I loaded into separate buffers.

For my purposes, I was trying to delete certain portions of the dump - so vim was the perfect tool to do something like "delete everything from line 850 to the next time this regex is matched", with a minimum of scrolling around and rendering things unnecessarily. iirc, Sublime just locked up and refused to scroll.

I wonder if I could have used Vintage to do what I wanted in Sublime?

Re:Sublime Text 3 dev build 3128 released by lloeki on Wednesday April 12, 2017 @01:42PM (#14099905)
vim might very well be if it turns out you had syntax on. I've yet to have vim fail on me as long as I skip the pretty colours for big files. Then again I've had very long lines indeed but can't tell if they were that long.
Re:Sublime Text 3 dev build 3128 released by taude on Wednesday April 12, 2017 @04:40PM (#14101537)
You wouldn't use VSCode to edit one off files. You'd use VSCode when you want to mount a "project" folder, and then access the files within that.

You "can" open one-off files from the command line. It's just way slower than other methods if you're just doing a quick change, and you'd go mad waiting for the file to open.

Re:Sublime Text 3 dev build 3128 released by lobster_johnson on Wednesday April 12, 2017 @06:16PM (#14102245)
"Files that just close": Ironically, VSCode adopted that feature from Sublime, and it works exactly the same. They're "preview" tabs, which you can recognize by the fact that the title is rendered in italics. You can make the tab permanent either by editing the file, or by hitting Cmd-K-E (on macOS, no idea about other OSes).
Re:Sublime Text 3 dev build 3128 released by simlevesque on Wednesday April 12, 2017 @12:17PM (#14099121)
> files that just close for no reason

I never experienced this, which type of files ?

Re:Sublime Text 3 dev build 3128 released by bpicolo on Wednesday April 12, 2017 @12:31PM (#14099251)
I actually looked into it a bit more. This may have been the fault of the default "workbench.editor.enablePreviewFromQuickOpen": true, as quick open is literally the only file opening mechanism I use (I assume, if that's cmd+p). Weird default. I turned it to false, maybe that will fix the closing-files issue.

Now if only I can get it to stop automatically closing quotes during comments and ruining my english contractions:

// it' => // it''

Any way around that? :(

Re:Sublime Text 3 dev build 3128 released by tedmiston on Thursday April 13, 2017 @10:53AM (#14107436)
This sounds like a bug or bad setting. I'm able to type contractions in comments in Sublime without it auto inserting a closing quote. Perhaps try reverting to default settings for a moment.
Re:Sublime Text 3 dev build 3128 released by pikzen on Wednesday April 12, 2017 @01:15PM (#14099687)
"editor.autoClosingBrackets": false

Unfortunately, that also turns off all bracket matching.

Re:Sublime Text 3 dev build 3128 released by bpicolo on Wednesday April 12, 2017 @01:35PM (#14099842)
Yeah, I saw that, that's no good. I like it 98% of the time :)
Re:Sublime Text 3 dev build 3128 released by Haitischmock on Wednesday April 12, 2017 @08:43PM (#14103099)
Files that close for no reason is caused by preview mode, which can easily be turned off in the settings. Otherwise you need to double click or edit the file for it to remain open.
Re:Sublime Text 3 dev build 3128 released by overcast on Wednesday April 12, 2017 @03:49PM (#14101104)
Once VS Code sorted out some plugins I was missing, plus the live view scrolling. I switched completely. It's updated way more often than Sublime, and I was a paying customer!
Re:Sublime Text 3 dev build 3128 released by asaddhamani on Wednesday April 12, 2017 @02:20PM (#14100313)
I tried Sublime and VS Code with plugins, but I found the autocomplete to be really subpar compared to JetBrains IDEs, which I use day-to-day for work. Any plugins for JavaScript and Python that would improve that situation?
Re:Sublime Text 3 dev build 3128 released by xienze on Wednesday April 12, 2017 @03:32PM (#14100976)
Unfortunately, I doubt you're going to get these same level of autocompletion as IntelliJ et al simply due to the amount of indexing that IDE does.
Re:Sublime Text 3 dev build 3128 released by tracker1 on Wednesday April 12, 2017 @04:45PM (#14101575)
It's a trade-off, there are times in code, I just don't get autocomplete, especially from other file references... or it starts a few moments after I've opened the file... On the flip side, code never seems to just wig out and freeze for several seconds at a time (after initial open) like most IDEs tend to.

I'll take having to remember what I'm trying to type, look it up etc, and have autocomplete mostly work, vs. my editor wigging out in a large project for a really small change.

Also, absolutely love the integrated terminal and the git integration, though better merge/rebase would be nice.

Re:Sublime Text 3 dev build 3128 released by asaddhamani on Wednesday April 12, 2017 @06:31PM (#14102347)
Yes, definitely have faced that problem with IntelliJ. It eats up memory and consumption grows while the IDE stays open, which it always does for me. Better autocomplete would be the killer feature that would win me over, so fingers crossed it gets better!
Re:Sublime Text 3 dev build 3128 released by Sukram21 on Wednesday April 12, 2017 @04:38PM (#14101517)
Have you tried ternjs (Sublime Package: https://github.com/ternjs/tern_for_sublime)? I use the config file from https://github.com/tststs/atom-ternjs/blob/master/README.md#... as a basis, works quite well.
Re:Sublime Text 3 dev build 3128 released by asaddhamani on Wednesday April 12, 2017 @06:30PM (#14102340)
I'll give it a shot. Thanks for the recommendation!
Re:Sublime Text 3 dev build 3128 released by iffycan on Wednesday April 12, 2017 @12:56PM (#14099503)
You got me excited, but VS Code is missing the one feature that prevents us from using it (or Atom, or Brackets): the ability to open, display and edit a file with null bytes in it. Sublime does this wonderfully. VS Code refuses to open the file. Atom pretends the bytes aren't there.
Re:Sublime Text 3 dev build 3128 released by orf on Wednesday April 12, 2017 @01:21PM (#14099727)
Add a ticket to the github repo? It only takes a second. You could alsp fix it yourself and make a mr if you're able, it's just JavaScript.
Re:Sublime Text 3 dev build 3128 released by bpicolo on Wednesday April 12, 2017 @01:37PM (#14099856)
Huh, interesting. VS Code does have an "editor. renderControlCharacters" option.
Re:Sublime Text 3 dev build 3128 released by plafl on Wednesday April 12, 2017 @03:26PM (#14100929)
You can have it with Emacs, depending on the language you are using. I have used C/gdb out of the box quite happily and now I use python (elpy) and it works although with some annoying glitches from time to time. Other languages don't work quite well.
Re:Sublime Text 3 dev build 3128 released by gshulegaard on Wednesday April 12, 2017 @12:49PM (#14099431)
> if I can't click on a line number

If clicking isn't a hard requirement, I think there is something to be said for command line debuggers with well done interfaces.

I spend a lot of my time in Python at the moment which doesn't usually require a debugger because of its restricted control flow, but every so often I find myself in need and I always gravitate to PUDB (http://heather.cs.ucdavis.edu/~matloff/pudb.html). And I haven't found it wanting -- yet.

Re:Sublime Text 3 dev build 3128 released by tedmiston on Thursday April 13, 2017 @10:58AM (#14107494)
Writing Python, I'll use Ctrl-G to go to a line or Cmd-R for a function then insert the breakpoint via a snippet triggered by pdb<tab>.