17 ms·
VS Code can do that?
- cowmix 9y agoFor the past 2+ years I've continued to be amazed by VS Code. The most amazing thing about it, it works best (in my experience) on Linux.
- boterock 9y agofor me it doesn't work well with non-standard keyboard (colemak). All shortcuts break (at least on fedora 28 it does)
- atomi 9y agoShhh we don't want the brass knowing that.
- Analemma_ 9y agoI've noticed this too: builds are faster on Linux (I assume because of the longstanding perf issues with directory traversal on Windows), and some of the GUI elements on Windows are blurry, apparently because of Chromium issues with High DPI that are outside Microsoft's control. I imagine some manager at Microsoft rips his hair out over this, but their loss is our gain.
- Macha 9y agoThe example I've noticed most is that touchpad scrolling is janky on windows and good on Linux on the same hardware.
- ggregoire 9y agoSome other ones: - In the Git view, select a modified file, select some lines of code you modified, cmd shift P, Git: Stage Selected Ranges. I dropped my dedicated Git GUI since I know this trick. - If you spend a lot of time coding in React, and have half of your files named index.js, do yourself a favor, go in the settings and add "workbench.editor.labelFormat": "short" (display the name of the file's folder in all the tabs) - You can preview markdown files natively (button at the top right corner). - Real time collaborative development: https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare https://marketplace.visualstudio.com/items?itemName=MS-vsliv...
- michaelgv 9y agoDidn’t know the Git trick, goodbye gitkraken!
- Tagore 9y agoI keep hearing good things about VSCode. If I weren't essentially married to emacs I'd definitely try it out. I'm not sure I'd recommend emacs to everyone at this point, though I think it remains a really solid choice of editor/OS for people willing to get over the learning curve and put up with a bit of clunkiness. Re the git stuff though- one place that I'm pretty sure emacs is the uncontested champ is in git integration via magit. I'd be inclined to recommend using emacs as their git interface even to people who want to use a different interface for everything else. It is that good, and IMHO the only git porcelain that is strictly better than the standard git porcelain.
- cjauvin 9y agoI wholeheartedly agree: Magit is that good, really. The way I see it, it reduces the burden associated with carrying the required git mental model in your mind, by giving you easier points of entry into its complexity. I owe all the slightly more advanced things I now routinely do with git (which would probably be seen as pretty basic by a lot of people though) to Magit, without question.
- 9y ago
- coding123 9y agoMy favorite is multi-selection mode. It's not the same as "Column Mode" you find in other IDEs but try it and you will never want another editor again: (Option)Alt-Cmd + Down or Up arrow key From there, you can use arrow keys as normal, but instead of controlling one carrot, you control all the ones you created. So if I use the shortcut key to move to the next word, they all do, same with end of line, or what have you. In the past I had to use regex in my editors to extract quoted text in each line... now I just use multi-select. Each carrot can also be created with the mouse in the Selection menu. Edit: Apparently it's a feature lifted from Sublime and in other IDEs - thanks!
- parmesan 9y agoI believe it is the same functionality as in Sublime, IntelliJ, Eclipse and others. It's a total lifesaver when editing bulk stuff, like a lot of constants and what not! One of my must-haves in an IDE.
- deleted 9y ago[deleted]
- matthewmacleod 9y agoI'm not sure where this feature originated, but it's been a core feature of Sublime for as long as I've used it, and is also broadly available in other editors. Definitely not a VS Code-specific thing, though it's still great!
- jobigoud 9y ago
- nabc45 9y agoCan it launch in less than 10 secs with a mechanical disk? Can it not be unresponsive if you have a mechanical disk or a weak CPU? Ooops, I'll stick to Sublime
- shawnz 9y agoUnfortunate that you're being downvoted because the slow start time of VS code is honestly such a big blocker that it outweighs most of these features for me. I just can't wait 10 seconds every single time I want to take a note.
- rp1229 9y agoWhat is your workflow like that a few second delay is a major blocker? I used to feel the same way early in my career. Now I don’t feel the need to be in a rush all the time.
- epicide 9y agoI've seen some people make the argument that they want to use their editor for quick edits to single files, which is a fine use-case. However, VS Code is really not designed to be optimized for that case. It's really about editing code (hence the name) as opposed to quick edits to configs, etc. It's usually best if one knows a few different tools designed for different scenarios. Right tool for the job.
- shawnz 9y agoAt the same time though, it is purposely not positioned to replace a full-blown IDE. So what is the use case that it's optimized for? Why does it offer to add an "open with code" context menu item to every file if it's not expected that you'll be using it for quick edits on individual files?
- mattchamb 9y agoI leave vscode open basically 100% of the time and use notepad++ for quick edits. Vscode having slow startup doesn't affect my support of it at all
- deleted 9y ago[deleted]
- devbug 9y agoAnd yet it still doesn't respect the Insert key. https://marketplace.visualstudio.com/items?itemName=adammaras.overtype https://marketplace.visualstudio.com/items?itemName=adammara...
- SquareWheel 9y agoPeople actually use "work deletion mode" on purpose? I've always wished this key at least had an LED indicator along with Caps Lock.
- digi_owl 9y agoOnce upon a time, hitting insert resulted in the caret switching from line to rectangle to indicate input mode.
- randymercury 9y agoNow that I could dig
- notamy 9y agoIntelliJ does this! Very convenient for recognizing accidentally hitting it.
- rhizome 9y agoIt used to be that normal mode was an underline cursor and insert mode was a vertical cursor, but now that I guess vertical cursors are everywhere, Sublime switches between a vertical cursor for normal mode and an underline cursor for insert mode. A bit of a drag, but I don't use insert much at all. One thing I'd like from the past is a blinking block cursor.
- jgtrosh 9y agoAs a vim guy, and I say this because I think it makes more sense in vim, I think you mean insert mode (the “normal” mode) and replace mode (the “insert” mode). The fact that the insert is used to toggle out of the default insertion behaviour seems to add confusion.
- wink 9y agoReally nice idea, but 90% focused on Web (frontend?) development. HTML, JS, and not much else. :( Still found 2 useful things for me, Parens colorizer and settings sync via Github Gist.
- Dinux 9y agoI use it for most of my C++ projects, and it almost does a better job than Visual Studio itself.
- wink 9y agoI meant the suggested addons on that page, not VS Code per se. I'm also using it as my main editor on my Windows box at home where don't do serious development. My only real annoyance is that I seem to run into multiple addons that can't be properly installed for one reason or another and sometimes "Ignore this" doesn't work and then the popup gets stuck and you can't see the top three lines... Apart from that it's been really nice for Rust, Go, and Python.
- jxub 9y ago> the popup gets stuck and you can't see the top three lines... The newest version has smaller popups on the bottom-right of the window, and that was a nice surprise for me.
- wink 9y agoYeah I just noticed. Just reinstalled the 64bit version instead of the 32bit one. (Apparently it's one of those applications that act a bit wonky if you're using multiple users on Windows.. it wasn't in the start menu and the Binary was in AppData, so I thought I'd need to reinstall it - but first I had to uninstall the old one.. same with Discord...)
- donttrack 9y agoI am interested in the 'almost' part. What are you missing?
- opencl 9y agoWill it ever get encoding autodetect? That's one of the big reasons I've stayed on Notepad++. VS Code clearly does detect the encoding, because when you go to change it it suggests the right one, but it doesn't load correctly.
- coldtea 9y agoIt shouldn't matter in 2018. Why aren't 99.9% of your input files in either ASCII or UTF-8?
- opencl 9y agoI would be thrilled if 99.9% of my input files were UTF-8, but I'm not the one writing them. SJIS remains in widespread use in Japanese companies and tons of legacy codebases do not work with UTF-8. If you're lucky there's a config flag for UTF-16.
- jhasse 9y agoC/C++ standard libraries on Windows still don't support UTF-8.
- coldtea 9y agoIf only the core was some sturdy C++ or Rust or whatever as opposed to JS and a nice GUI/Canvas lib as opposed to DOM.
- marpstar 9y agowhy?
- robin_reala 9y agoSpeed. Sublime and Vim still have quite a considerable lead on VS Code for example (even if VS Code is much better than Atom).
- marpstar 9y agosure, but would we even be here talking about VS Code if it had been written in those languages? Would the extension community have grown as quickly? Would Microsoft have continued investment in the product if it hadn't? I'm not saying that it wouldn't have been as successful, but we're here, now, and it is. It's a great product regardless of the fact that it's written with HTML/CSS/JS.
- coldtea 9y ago>sure, but would we even be here talking about VS Code if it had been written in those languages? Would the extension community have grown as quickly? Why not? Didn't hurt ST or TextMate much (though them being closed source did). And we still use Vim, written in C, 40+ years on, and it has tons of plugins... >Would Microsoft have continued investment in the product if it hadn't? MS developed Monaco for over a decade, with very little adoption, so why not?
- urlwolf 9y agoFor something speedy, and as programmable as vim or emacs but in a sane language (lua), try textadept.
- cryptonector 9y agoJust say no to those ligatures.
- Sawamara 9y agoI actually love using them, especially with Fira Code.
- Skunkleton 9y agoWhy? Not poking at you, just curious.
- okanesen 9y agoNot OP but for me it's just a preference like a color scheme is to anybody else. It is visually appealing and helps to distinguish different aspects of some context specific things. I get that it's not for everybody but being so against it is something I really do not understand. Why use color schemes or different fonts at all then?
- Skunkleton 9y agoA font is pretty different sort of thing. I'm questioning why you would want multiple characters combined.
- AlphaWeaver 9y agoWhy?
- cryptonector 9y agoE.g., it's easier to count the number of =s if there's no ligature.
- AlphaWeaver 9y agoWhat use cases do you have to regularly count characters eyeballing it? The characters are still distinct and equal width in the code and the line length doesn't shift, so it's just a visual thing...
- gbaygon 9y agoI don't know how is it now, but I've used it for a couple of months for web dev on my mac and switched to Atom when noticed my cpu was 70%+ of usage all the time. I suspected it was because of the typescript plugin, but honestly I don't care Atom doesn't do that and I'm happy with it.
- chrisabrams 9y agoInteresting I made the opposite switch for the exact same reason.
- deleted 9y ago[deleted]
- orf 9y agoI'd have at least spent 15 minutes working out what was causing it before taking the jump and switching editors?
- gbaygon 9y agoI had, but this was several version back, couldn't find any info of what was failing and also waited a major version update before doing the switch. Switching editors always causes stress. That's why it's hard to gain users back once you made a mistake on this (very competitive) field. I would only try VS Code again if Atom messes up, no matter what new micro site Microsoft PR puts online. Edit-to-add: with your downvote you are invited to explain why/if I'm wrong.
- didibus 9y agoOh, most of those are for HTML/JS. I was hoping it was gonna talk about performance improvement or support for additional languages and features.
- vjeux 9y agoSo honored to see Prettier being the #3 tip!
- orf 9y agoCongratulations!
- joemaller1 9y agoYou earned it
- outside2344 9y agoCream rises to the top - awesome tool - thanks for creating it!
- dvlsg 9y agoWell deserved! I was amazed at how much of a game changer a automatic code formatter was. Saves me a ton of time. I do prefer adding a .prettierrc to projects, though, instead of inside vscode options (user or project) like what is suggested here. That way my teammates and I can use the same settings, even if they don't use vscode.
- Tagore 9y agoI'm an evangelizing convert to Prettier. I was hesitant about it until I tried it, but... I am sold on it now. Prettier has costs- there are cases where I'd like to format things based on semantics not syntax, to show intent, and Prettier can't read my mind (feature request: make Prettier read my mind.) But the costs are more than offset by the benefits. I didn't realize how much of a cognitive burden thinking about formatting was until I stopped thinking about it, and it turns out that using formatting to signal intent is perilous when people don't agree on how formatting signals intent. I'm pushing to have Prettier used across all our JS code- there is some resistance to the idea of running it across a several hundred k line non-prettified codebase and some resistance to the idea of using it at all. And this causes problems. Prettier is best when you use it for everything. But I'm pretty sure we'll eventually just move to prettification. It seems like the right thing to me, and I'm generally right ;). Anyway, thanks for Prettier- I am not actually a huge JS fan despite mostly writing it professionally, but Prettier does away with some of my complaints about JS, and just generally makes my life easier.
- scottmf 9y agoSlightly off topic but this code in example #5: get() { return new Promise((resolve, reject) => { fetch(`${baseAPI}/heroes`) .then(response => response.json()) .then(json => resolve(json)) .catch(err => { reject (err); }); }); } Why not just: get() { return fetch(`${baseAPI}/heroes`) .then(response => response.json()); }
- AaronFriel 9y agoThat has fewer brackets to colorize.
- deleted 9y ago[deleted]
- deleted 9y ago[deleted]
- akerro 9y agoBy the end of a day, he reports number of lines written and committed.
- daybreaker2 9y agoBecause he needs it wrapped in a promise, sending a resolve/reject?
- glitch003 9y agoFetch and response.json() both return promises. So it's still a promise.
- Guillaume86 9y agoTrue and in this particular example for response.json() it doesn't even matter.
- robotpony 9y agoA promise is a promise ...
- carapace 9y agoBlank page without JS, static content with JS. C'mon! I really like VSCode. MS is innovating in UX.
- Groxx 9y agotbh I wish editors would get rid of "log breakpoints". Teach people to use the conditional breakpoint and just enter `console.log(...)` instead, it's overwhelmingly more powerful. A specialized "log breakpoint" doesn't teach them that it's just code. (I've run into quite a few programmers who have known about log breakpoints for years, used them fairly heavily, but never knew you could do things in conditional breakpoints) Want to collect all values of something as your code runs? conditional breakpoint: `x = (x || []).append(val)` and then print it whenever you feel like it. Log breakpoint? spit it out each time and... browse by hand? hope nothing's logged in between? bah.
- setr 9y agoI've never even seen log breakpoints before but is it really just a wrapper for inserting console.log()? That seems... kinda useless. From the video, it doesn't even look like it's that easy to clean-up once you're done with them (though maybe there's a remove-all function) >Teach people to use the conditional breakpoint and just enter `console.log(...)` instead, it's overwhelmingly more powerful. If you're going to print things for insight at breakpoint time, wouldn't it make more sense to just use watch expressions?
- Groxx 9y ago"stop the world and view expression(X)" is time-consuming when you're trying to discover patterns that you can later be more selective about (e.g. to turn them into a conditional breakpoint). With logs you can pretty trivially spit out thousands of them and eyeball / grep / etc however you need, which could take hours if you had to stop each time, and didn't have specialized tools to help you search for needles in the haystack. But very frequently yes, all you need is a breakpoint and an expression, and hit "continue" a few times. I absolutely do that when I can. --- As to "just a wrapper for console.log", yes. It's a bit of an infection, though I'm not seeing as many as I used to, so maybe we're fighting it off. but e.g.: jetbrains has stuff like "evaluate and log": https://www.jetbrains.com/help/phpstorm/configuring-breakpoints.html https://www.jetbrains.com/help/phpstorm/configuring-breakpoi... Visual Studio has "condition" and "action" options for breakpoints: https://msdn.microsoft.com/en-us/library/5557y8b4.aspx https://msdn.microsoft.com/en-us/library/5557y8b4.aspx one of which is "log a message": http://www.visualmicro.com/page/User-Guide.aspx?doc=Working-With-Breakpoints-When-Hit.html http://www.visualmicro.com/page/User-Guide.aspx?doc=Working-... (mindlessly copying this UI, because what VS does is Good™ (it generally is!), used to be more common from what I can remember) even Chrome [1] and MDN [2] refer to conditional breakpoints, but only mention "will stop when condition is true", not "by the way you can mutate state in here, call funcs, anything you like". [1]: https://developers.google.com/web/tools/chrome-devtools/javascript/breakpoints#conditional-loc https://developers.google.com/web/tools/chrome-devtools/java... [2]: https://developer.mozilla.org/en-US/docs/Tools/Debugger/How_to/Set_a_conditional_breakpoint https://developer.mozilla.org/en-US/docs/Tools/Debugger/How_... --- It's oddly crippling to not know this kind of stuff. Ever had a bug, and you wanted to see how it would behave if var X was the right value? You can just override it in a conditional breakpoint and "fix" the bug without rebuilding, to see what happens. Thankfully there are at least a handful of people who have realized this, despite docs essentially never calling it out: https://davidwalsh.name/debugging-conditional-breakpoints https://davidwalsh.name/debugging-conditional-breakpoints In many languages, a debugger is very nearly a REPL. Wish Java would have a REPL? Sure, a simple CLI command would be nice, but I've done "live" coding of android apps for years. Just add a periodic callback to the main thread with a disabled breakpoint - once there, modify your views in the expression editor, and your app - on your phone - updates in the very next view tick. There are limitations, like (kinda) not being able to import new things, but they're not hard to work within and the time savings can be immense.
- prepend 9y agoIs there a way to have intellisense sense work with python dictionaries? It seems like intellisense for json would be a similar issue as nested dictionary representations in json, but I can’t find anything that does this and don’t want to use another class just for faster coding.
- crdoconnor 9y agoYou'd need access to the runtime environment in order to do that. That said I wish somebody would make an IDE that would tightly integrate IPython so I could get IDE autocompletion in a paused test. I spend way too much time writing code in IPython prompts and copying it back.
- prepend 9y agoYou can check design time for any strings placed in source. Which is really what I want. I don’t need intellisense for stuff populated at runtime as much.
- switch007 9y agoOn a related note, Pycharm has it IIRC
- prepend 9y agoGood point. I saw this in Pycharm but won’t pay.
- outside2344 9y agoMy favorite is when you have a git merge conflict - just open the file in VSCode and you can visually merge it. I can't explain the feeling of joy I had when I discovered this - and this keeps happening over and over with VSCode.
- dawnerd 9y agoAtom got this recently too and it’s such a lifesaver. I keep switching back and forth each time one gets a feature the other doesn’t have.
- moltar 9y agoPretty basic list of things...
- reitanqild 9y agoMy favourite "features": the ecosystem and the development speed. It keeps getting better and better and better month by month and it now even knows how to fix small stupid mistakes like a missing this. when trying to access a field in ts etc.
- itwy 9y agoI recently switched to JetBrains products. Their IDEs are much smarter. Infinitely better than VS Code, Sublime and whatnot. It's the closest thing to pair coding!
- aleksi 9y agoVS Code can do that too: https://code.visualstudio.com/visual-studio-live-share https://code.visualstudio.com/visual-studio-live-share
- itwy 9y agoI meant the IDE acts as another pair of eyes on your code.
- cbayram 9y agoI'm also partial to WebStorm. Local history feature of Eclipse derivates has saved me enough times to make it a core pre-requisite when considering another IDE. Fwiw, VS Code has better typescript support.
- bunderbunder 9y agoIn the spirit of cranky HN bikeshedding, I present: The page body, as seen by a NoScript user: <body> <div id=app></div> <script type=text/javascript src=/static/js/manifest.14a76fad9b304f57d579.js></script> <script type=text/javascript src=/static/js/vendor.ffa8aef8ba29f634abaf.js></script> <script type=text/javascript src=/static/js/app.08230312c2e739a44ea1.js></script> </body> Web developers: Please, you can do better than this.
- roryisok 9y agoThere certainly should be a static page version. Especially since there is barely any interactive element to this, it's essentially just a list of links
- sebazzz 9y agoIt is certainly an interesting choice to use a fully fledged SPA framework to render a static page. And since it runs on Azure App Services, I'd say server side rendering should be possible.
- allover 9y agoThe audience for this site is front-end developers. Front-end developers don't tend to view the web with NoScript. Just like 99% of users don't view the web with NoScript.
- bunderbunder 9y agoIs it just for front-end developers? I'm a back-end developer, but, when I wanted to indent that HTML in order to post it, I switched over to the instance of vscode that I virtually always having running in order to use its pretty printer.
- allover 9y ago> Is it just for front-end developers? 1 out of 15 examples (the Docker one) don't involve HTML or JS. (And backend JS devs are generally pro-JS so likely aren't using NoScript either). Do you use NoScript? Maybe you do and you're the <1%, but fact is even if you do, both you and GPP turned it off to view the site already ...
- wolco 9y agoHas anyone figured out how to edit files directly from a remote directory over ssh/ftp?
- reedr 9y agoI use sshfs for that..
- dragonshed 9y ago+1 for sshfs. I had it working on macOS at one point when frequently working on a raspberry pi, but haven't needed it since.
- wolco 9y agoI would love a good stable windows sshfs client. It usually works great until the connection gets idle then freezes.
- ehsankia 9y agoI'd love to have a package for that too. On Sublime I use sFTP and it works really well. You can either load files directly from an sftp connection, or map a directory, and every time you modify a file, it gets synced automatically. It's a simple package, but it works very well.
- efrecon 9y agoftp-simple works pretty well. https://marketplace.visualstudio.com/items?itemName=humy2833.ftp-simple https://marketplace.visualstudio.com/items?itemName=humy2833...
- FBISurveillance 9y agoOne thing I really miss in VSCode is Sublime-like search result display in a new tab that shows the result and surrounding lines. The "panel" search results view VSCode has now is far from perfect.
- omn1 9y agoCheck out this: https://github.com/Microsoft/vscode/issues/23931#issuecomment-376060761 https://github.com/Microsoft/vscode/issues/23931#issuecommen... Add this to your settings: ``` "search.location": "panel", ``` Not perfect, but it's a start.
- tjr225 9y agoI've been using VS Code as a light sql server workbench. I have got to check out the docker features as well.
- kenbolton 9y agoQ: But does it org-mode? A: No. Long A: Org-mode is plain text. So it org-modes, but not in a meaningful way.
- gecko 9y agoMeh, it's nascent, but it's not so underpowered as to be genuinely useless: https://github.com/ajtoo/vscode-org-mode https://github.com/ajtoo/vscode-org-mode I've used it over Emacs for simple use cases without any real issues, and the project's under very active development.
- tincholio 9y agoIf you're only using org basically as an outliner, then it might be ok for editing. But I see no indication of babel, exporting, agendas, etc...
- swrobel 9y agoCan't Atom do all of this as well?
- Boulth 9y agoOne thing I miss with VS Code is something akin of Eclipse Mylyn. When working with large code bases it's invaluable!
- stevefan1999 9y agoVSCode can do all sorts of thing, but the huge runtime dependency (Electron/CEF) and slow startup time is kind of unfavourable. Well, maybe it’s my extensions that made it slow.