To highlight the entire line you are currently on, press '⌘l'. If you'd like to go to the top of the page you're working on, press '⌘↑'. To comment out only the current line you're typing on (or uncomment if it's currently commented) press '⌘/'. After highlighting one instance of a word on your page, this will highlight every occurrence of the word on the page. Rather than going through and highlighting/retyping the word 12 times, you can just hit 'd' while holding down '⌘' 12 times, and retype the word once.įor an even higher level of efficiency, use '⇧⌘l'. Say you typed 'from' but meant to type 'form' 12 times. While you have a word or item highlighted, using this command will go down the page and pick out every instance of the word or item you have written. For example, say you made the same syntax error on 8 different lines, this shortcut will allow you to retype the correct thing only once.Īnother favorite of mine is '⌘d'. If you need to edit multiple lines at the same time, this command will add your cursor in each place you click while holding down ⇧⌥. One of my personal favorites, is '⇧⌥ + click'. There are also a ton of shortcuts that are more specific to VS Code. Among them: '⌘x' for cut, '⌘c' for copy, '⌘f' for find, '⌘w' to close your current window, '⌘n' to open a new file, '⌃⌘f' to toggle full screen, '⌘s' to save, and '⇧⌘s' to save as. VS Code shares many common shortcuts with iOS. This shortcut opens your current directory in your most recently used VS Code window. The other command line shortcut that is very useful is 'code -r'. ' will open up the entire current directory you are in. Provided that you are in the appropriate/desired directory, typing in 'code. VS Code has some command line shortcuts that will come in handy. If you're an all manual type of person, and would like to wear out the print on your command and s keys, go for it but using autosave will save you time and undoubtedly keep you from trying to view changes that you "thought" you saved. Hello and welcome back coders! This post continues the theme from my first post which covered command line shortcuts, but this time around I will cover helpful shortcuts and tips while using VS Code.Īutosave is your friend.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |