Live data from Hacker News

Visual Studio Code 1.9

code.visualstudio.com

291–300 of 312 posts

Re: Visual Studio Code 1.9

#291
Can anybody explain how I can get a `jump to function defintions` when working with PHP files ? (defintions might be in included files)

This is the one thing I'd really like to figure out (be it out of the box or with a plugin).

Re: Visual Studio Code 1.9

#292
post #254

Earlier quoted context omitted.

Calling Powershell incredibly verbose is about the same as calling C# incredibly verbose. Sure, perhaps they're not as compact as some of the incredibly information-dense perl scripts that people come up with. I'd wager though that it's easier to understand what a random powershell script is doing than a random perl or bash script that pipes output throgh a dozen utilities.

I've got an example of powershell getting verbose here: http://flukus.github.io/2015/03/13/2015_03_13_Powershell-is-... . Ignore the rest and look at the example where I'm trying to copy a directory recursively and with a filter. In bash the same task is a relatively simple one liner: find . -type f -name '*.html' -exec cp {} /home/new_dir/{} \; If you know a simpler way in powershell please post it though.

Well, how about this:

  ls . -r -file -fi *.html | cp -d /home/new_dir/
It is a bit shorter than your bash equivalent, still doing the same thing.

I think you're mistaken about what `cp` (`Copy-Item`) is intended to do. Its main purpose is to copy, not to filter. Yes, `Copy-Item` supports filtering because it's part of the "common parameters", but to be more in line with the cmdlets' original purposes, you should `ls` (`Get-ChildItem`) first, because it has more filtering capability, and then pipe the results to `cp`.

Is it complex? No, actually its complexity is exactly the same as that of your `find` example! `find` is more or less equivalent to `ls` in that both gathers the list of files that meet certain criteria. And then, like `find` invokes `cp` multiple times to do actual copying, `ls` (`Get-ChildItem`) feeds its result to `cp` (`Copy-Item`). They are structured in a similar way.

I'd even say the PS one-liner is more akin to "the UNIX philosophy". In the bash one-liner, there is a direct parent-child relationship between `find` and `cp`, which doesn't utilize pipes at all. Whereas the PS one-liner connects two equivalent processes (`ls` and `cp`) with a pipe. This is exactly what I'd call "small processes work together to get the job done", which is again the UNIX way.

Re: Visual Studio Code 1.9

#293

I am surprised at the amount of semi-negative comments here. Yes, some features are yet to be implemented, (it's still a fairly young project and you can always follow GitHub issues on progress), but for an Electron app, it's surprisingly fast and capable. The Microsoft-developed Go plugin makes it the best Go IDE out there, the devs, (Ramya Rao etc.) are super responsive and really trying to resolve issues quickly.…

> makes it the best Go IDE out there I will respectfully disagree and say that gogland (while still in a pre-release state) is much much better.

Gogland is great, but so far I haven't seen a feature that makes is strictly better, but I agree that it is a great alternative.

There is also the fact that VSCode is open-source.

Re: Visual Studio Code 1.9

#294
This version introduced a non-trivial bug for me; When I open a file to edit through nautilus, it opens in a new window instead of reusing the existing one.

The new settings (window.openFilesInNewWindow and window.openFoldersInNewWindow) don't help no matter what when I set them to 'off'

EDIT: Fixed it on Ubuntu by removing the '--new-window-if-not-first' argument from the code.desktop related command.

    sudo nano /usr/share/applications/code.desktop
    # set: Exec=/usr/share/code/code %U

Re: Visual Studio Code 1.9

#295
post #274
post #173

Earlier quoted context omitted.

VS Code is part of the strategy to get .NET Core distributed and to support the web layers built on top of that which mostly now use open source technology (from npm and bower through to grunt, typescript and angular)

Na, I think the real plan starting to unfold. This week we get the new welcome screen, next will be the "deploy to Azure" and "how to make a Windows Store App" sidebar links. (not that I'll stop using it, I'm sure someone will fork if gets too obnoxious)

Wow that is a scary vision and it would be heartbreaking if they rendered it unusable with ads or other nagging "features".

Re: Visual Studio Code 1.9

#296
post #289

Earlier quoted context omitted.

I had been a full-time Linux (desktop) user for more than 10 years, and only recently made a transition to Windows. As I'm nowhere proficient at using PowerShell I might be overrating it a bit, as the grass is always greener on the other side. Anyways, what I found to be satisfying while using PS were: 1. The input/output is done using objects. I know that "inter-process communication should be done with text" is the…

i agree with the fact that PS object oriented communication between commands is much better then text. But I disagree about your point (2) saying that command names are more discoverable. with linux style conventions, there is a hierarchy that helps you navigate between command's features. for example `docker image ls` you can type docker, see that there is an images subtree, type docker images, see that there is an…

I was thinking more about the "proper noun" aspect of the UNIX commands. I mean, what do `awk`, `sed`, `tar`, `xargs`, `df` mean? Why does `free` only print the remaining memory, not the disk space? Why is `top` even related to processes? They are all like that because Unix has had a long way until today. In the beginning `grep` would have been enough, but suddenly someone wanted to improve the state of affairs, and made a new command named `awk`. Probably there had only been `ar`, and then later the necessity of `tar` was found. `free` is not `mf` and `df` is not `free`, because the original designer thought the free space of the main memory was more important. All these inconsistency/idiosyncrasy do make learning the UNIX command hierarchy harder. We developers don't feel that way because we all are very used to such commands, but there might be some memory in our inside when we tried really hard to memorize all of the useful commands just to do basic things.

PowerShell didn't have this backward compatibility concern so it built up its own vocabulary from the scratch. While it is nowhere near to perfect (as your example shows, the VERB-NOUN naming scheme can be a bit cumbersome when some functionalities need to be grouped), I'd say it is at least much more consistent regarding basic file/device management, because there was simply no baggage to consider when they designed PowerShell for the first time.

Ah, and thanks for suggesting `Ctrl-Space`! I thought it would have been better if PowerShell had a GUI widget listing possible candidates, so I was considering sending a patch. It turns out that the MS people are definitely more clever than me. :)

Re: Visual Studio Code 1.9

#299
post #125

Earlier quoted context omitted.

> the experience of using PS was superior to that of bash As a Linux dweller, I'm genuinely curious about this one. I've found PS inferior in just about any use case.

For one, I can do away with all of the text parsing that is prone to breakage in case a tool changes their output somewhat (or god help me - tools that can't handle unicode properly). The power of bash actually comes from the GNU coreutils and other userland software. It has almost very little to with bash. Try out bash on a busybox and feel the crippled effect.

So you mean PS as a scripting language, not as a shell, is superior. That's not a surprise, since it's newer and designed to do away with many annoyances of Bash. As a shell, however, it is sadly just slightly more usable as the REPL of, e.g., Python.

Re: Visual Studio Code 1.9

#300
post #264

"Format on Paste" could convert me from Coda, but it doesn't seem to work. macOS, HTML mode, enabled the option, restarted, doesn't format until I manually execute the Format Document command.

[deleted]
Post reply on HN