कुछ VS Code कीबोर्ड शॉर्टकट सीखना आपकी एडिटिंग तेज़ करने के सबसे तेज़ तरीकों में से एक है। यह चीट शीट सबसे उपयोगी शॉर्टकट को कार्य के अनुसार समूहित करती है — कमांड पैलेट, एडिटिंग, मल्टी-कर्सर चयन, नेविगेशन, खोज और फ़ाइलें प्रबंधित करना।
शॉर्टकट Windows और Linux के लिए दिखाए गए हैं, जहां अंतर हो वहां macOS समतुल्य नोट किया गया है (आमतौर पर Ctrl, Cmd बन जाता है)। आप Ctrl+K Ctrl+S से हर शॉर्टकट देख और बदल सकते हैं।
General
| Shortcut (Win/Linux) | What it does |
|---|
Ctrl+Shift+P | Open the Command Palette — run any command by name (macOS: Cmd+Shift+P). |
Ctrl+P | Quick Open — jump to any file by name (macOS: Cmd+P). |
Ctrl+, | Open Settings (macOS: Cmd+,). |
Ctrl+K Ctrl+S | Open the Keyboard Shortcuts editor. |
Ctrl+B | Toggle the sidebar (macOS: Cmd+B). |
Ctrl+` | Toggle the integrated terminal. |
Editing
| Shortcut (Win/Linux) | What it does |
|---|
Ctrl+X / Ctrl+C | Cut / copy the current line when nothing is selected. |
Alt+Up / Alt+Down | Move the current line up or down (macOS: Option+Up/Down). |
Shift+Alt+Up / Down | Copy the current line up or down. |
Ctrl+/ | Toggle a line comment (macOS: Cmd+/). |
Shift+Alt+A | Toggle a block comment. |
Ctrl+] | Indent the current line (macOS: Cmd+]). |
Ctrl+Shift+K | Delete the current line. |
Multi-cursor & Selection
| Shortcut (Win/Linux) | What it does |
|---|
Alt+Click | Add another cursor where you click (macOS: Option+Click). |
Ctrl+D | Select the next occurrence of the current word (macOS: Cmd+D). |
Ctrl+Shift+L | Select all occurrences of the current word. |
Ctrl+Alt+Up / Down | Add a cursor on the line above or below. |
Ctrl+L | Select the current line. |
Navigation
| Shortcut (Win/Linux) | What it does |
|---|
Ctrl+G | Go to a specific line number. |
Ctrl+Shift+O | Go to a symbol in the current file. |
Ctrl+T | Go to a symbol across the whole workspace. |
F12 | Go to the definition of a symbol. |
Alt+Left / Alt+Right | Navigate back / forward through cursor history. |
Ctrl+Tab | Switch between open editors. |
Search & Replace
| Shortcut (Win/Linux) | What it does |
|---|
Ctrl+F | Find in the current file (macOS: Cmd+F). |
Ctrl+H | Replace in the current file. |
Ctrl+Shift+F | Search across all files in the project. |
Ctrl+Shift+H | Replace across all files. |
Files & Windows
| Shortcut (Win/Linux) | What it does |
|---|
Ctrl+N | Open a new untitled file. |
Ctrl+S | Save the current file (macOS: Cmd+S). |
Ctrl+W | Close the current editor. |
Ctrl+\ | Split the editor into two panes. |
Ctrl+K Z | Toggle Zen (distraction-free) mode. |
VS Code कीबोर्ड शॉर्टकट चीट शीट से जुड़े सामान्य प्रश्न
सबसे पहले सीखने योग्य सबसे महत्वपूर्ण VS Code शॉर्टकट कौन सा है?
कमांड पैलेट, Ctrl+Shift+P (macOS पर Cmd+Shift+P)। यह आपको किसी भी कमांड का नाम टाइप करके चलाने देता है, इसलिए आप हर दूसरे शॉर्टकट को याद किए बिना लगभग कुछ भी कर सकते हैं।
मैं VS Code में कई कर्सर कैसे जोड़ूं?
Alt (macOS पर Option) दबाकर अतिरिक्त कर्सर रखने के लिए क्लिक करें, या ऊपर/नीचे की पंक्ति पर कर्सर जोड़ने के लिए Ctrl+Alt+Up/Down दबाएं। वर्तमान शब्द की अगली घटना पर कर्सर जोड़ने के लिए Ctrl+D उपयोग करें।
मैं VS Code में फ़ाइल जल्दी कैसे खोलूं?
Quick Open खोलने के लिए Ctrl+P (macOS पर Cmd+P) दबाएं, फिर फ़ाइल का नाम टाइप करना शुरू करें। सिंबल पर जाने के लिए @ या पंक्ति पर जाने के लिए : भी टाइप कर सकते हैं।
मैं VS Code में कोड को कमेंट कैसे करूं?
वर्तमान पंक्ति या चयन पर लाइन कमेंट टॉगल करने के लिए Ctrl+/ (macOS पर Cmd+/) दबाएं। ब्लॉक कमेंट टॉगल करने के लिए Shift+Alt+A उपयोग करें।
मैं प्रोजेक्ट की सभी फ़ाइलों में कैसे खोजूं?
खोज पैनल खोलने और वर्कस्पेस की हर फ़ाइल में खोजने के लिए Ctrl+Shift+F दबाएं। सभी फ़ाइलों में खोजने और बदलने के लिए Ctrl+Shift+H उपयोग करें।
मैं किसी पंक्ति को ऊपर या नीचे कैसे ले जाऊं?
वर्तमान पंक्ति को ले जाने के लिए Alt+Up या Alt+Down (macOS पर Option) दबाएं। पंक्ति को ले जाने के बजाय कॉपी करने के लिए Shift जोड़ें (Shift+Alt+Up/Down)।
क्या मैं VS Code कीबोर्ड शॉर्टकट कस्टमाइज़ कर सकता हूं?
हां। Ctrl+K Ctrl+S से कीबोर्ड शॉर्टकट एडिटर खोलें, किसी भी कमांड को खोजें और अपना की बाइंडिंग असाइन करें। उन्नत नियमों के लिए आप keybindings.json को सीधे भी संपादित कर सकते हैं।