vimshortcut
                Differences
This shows you the differences between two versions of the page.
| vimshortcut [2025/07/07 12:35] – created karcio | vimshortcut [2025/07/07 12:36] (current) – karcio | ||
|---|---|---|---|
| Line 83: | Line 83: | ||
| ==== How to Map Keyboard Shortcuts in Vim ==== | ==== How to Map Keyboard Shortcuts in Vim ==== | ||
| - | In the mapping section we will add shortcuts to making typing longer commands easier. This will save you key strok | + | In the mapping section we will add shortcuts to making typing longer commands easier. This will save you key strokes  | 
| - | es and lots of time, especially for long commands. | + | |
| Key mapping syntax is like this: | Key mapping syntax is like this: | ||
| Line 105: | Line 104: | ||
| - Navigate to the line you wish to start commenting out. | - Navigate to the line you wish to start commenting out. | ||
| - Press the **Ctrl + V** keys to enable visual mode. | - Press the **Ctrl + V** keys to enable visual mode. | ||
| - | - Select all the lines you wish to comment out using the **up** and **down** arrow keys or the letters **k** and | + | - Select all the lines you wish to comment out using the **up** and **down** arrow keys or the letters **k** and **j**. | 
| - | **j**. | + | |
| - Vim will insert a highlight at each line’s beginning to indicate the selected line | - Vim will insert a highlight at each line’s beginning to indicate the selected line | ||
| - With the target lines selected, press **Shift + I** to enter insert mode. | - With the target lines selected, press **Shift + I** to enter insert mode. | ||
| Line 115: | Line 113: | ||
| ===== Uncomment Multiple Lines ===== | ===== Uncomment Multiple Lines ===== | ||
| - | - Start by navigating to the line you wish to uncomment, then press **Ctrl + V** to activate the visual block mo | + | - Start by navigating to the line you wish to uncomment, then press **Ctrl + V** to activate the visual block mode. | 
| - | de. | + | - Select all the lines you want to uncomment using the **up** and **down** arrow keys or the letters **k** and **j**. | 
| - | - Select all the lines you want to uncomment using the **up** and **down** arrow keys or the letters **k** and * | + | |
| - | *j**. | + | |
| - Once your lines are selected, press the **X** key to remove the comments. | - Once your lines are selected, press the **X** key to remove the comments. | ||
vimshortcut.1751891748.txt.gz · Last modified:  by karcio
                
                