![]() ![]() Spend a minute or five writing a great snippet, and you will get those minutes back in no time. ![]() Or, even worse, if you forget to remove it you will keep adding small bits of unnecessary code. Snippets have replaced my old habit of copying, pasting and editing code, where I would typically end up spending time removing old code from the section I copied from. How much of the code you write the next hour will be almost identical to something you wrote yesterday, or just two hours ago? I find snippets to be very handy in my daily work. Supports many languages, and fantastic in combination with eslint. Specify a set of rules for how your code should be formatted, press your desired key combination and the document will be formatted according to the rules. Neat in projects with a large code base, like SalesScreen. ![]() Tired of typing '././(.)' and spend time finding the right location for your import? Press ctrl + shift + u and write parts you know about the path and/or the name of the file you want to import, and relative-path resolves the path for you. I've seen a lot of copy/pasting and then editing when creating new components, and I like using snippets better.Īdds color to bracket pairs to highlight which opening- and closing brackets that belong to each other. Creating a stateless component? rsc and press tab. This extension sorts the lines I mark alphabetically when clicking F9.įantastic if you work with React. I like to keep things like props for react components ordered alphabetically. The same accounts for marking lines 10 at a time if I hold shift. It lets me jump 10 lines at a time with the cursor if I hold CTRL and use my cursor keys (which I mentioned above I mapped to I/J/K/L). With only 544 installs (March 19 2018) this is my most obscure extension. The Visual Studio Marketplace offers an amazing amount of extensions, from snippet collections to formatters, language packs, themes, debuggers and more. Later on I realized this I/J/K/L setup is implemented in many 60% keyboards (like the Vortex Pok3r), where you basically use the function key in combination with these characters to as arrow keys. This whole concept of navigating with combinations of CTRL, ALT and I/J/K/L might seem very cumbersome and weird at the beginning, but I got comfortable with it quickly and I've never looked back. You can find it by opening the command palette with CMD/CTRL + SHIFT + P and selecting > Preferences: Open Keyboard Shortcuts (JSON). Visual Studio Code will now let you manipulate keyboard shortcuts in a graphical user interface, but you can also specify each combination in the keybindings.json file. I (almost) never use caps lock, but use CTRL all the time, and the positioning of the Caps Lock-key makes it easier to reach than the CTRL-key. In addition, I mapped the Caps Lock key to CTRL using AutoHotkey. You can find a keybindings.json-gist for it here. CTRL + I/K: Add cursor on line above/below the current cursor position.ALT + SHIFT + U: Mark characters from cursor to start of line.ALT + SHIFT + O: Mark characters from cursor to end of line.CTRL + J/L: Move cursor to start/end of line.SHIFT + CTRL + I/K: Move marked- or current line up/down.ALT + CTRL + J/L: Move cursor to start/end of word.ALT + SHIFT + I/J/K/L: Mark lines/characters while moving character up/left/down/right.ALT + I/J/K/L: Move cursor up/left/down/right.But jumping in and out of input mode always bothered me, so I created my own set of keybindings to reduce the need for moving my hands from the default position: I enjoy doing as much as possible of my work with my hands locked in one position when navigating, marking, copying, pasting, moving and generating code. VISUAL STUDIO CODE MULTIPLE CURSORS FREEKeybindingsįeel free to call me lazy, but I got tired of moving my hands over to the mouse to navigate in the editor–and eventually the arrow keys started feeling far, far away from the main letters on the keyboard. These are my main productivity takeaways after using it for JavaScript programming for 3+ years. Visual Studio Code, the biggest open source project on GitHub, is my go-to editor and is used by all developers at SalesScreen. At SalesScreen we write a lot of JavaScript, and I have spent quite a bit of time experimenting with editors, keybindings, snippets and extensions to improve productivity and code quality. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |