6. I suggest not to do it in the second case because resulting interface would. Leverage the power of Action Search to move around and learn new shortcuts. ⇧⌘⏎ or Shift+Ctrl+Enter If you want to create 'long' multiple cursor you can set shortcuts for 'Clone Caret Below' and 'Clone Caret Above' with keyboard. Tested on Windows 10 Enterprise build 1803 on Surface Book 2. For more information about adding and editing code, refer to Write and edit source code. Even when I want to highlight a character or a word, I get confused. 0. Quick Switch Scheme (Ctrl + `) Quick Switch Scheme is a handy, predefined list of features about how you can quickly switch between the various display schemes in your IDE, like the overall theme, editor color scheme, keymap, view mode, zoom, and a few more. 1. IntelliJ has the functionality to merge the search string, which means if we got more than one search string, it automatically merges into the same line, or we can say that one line. Shortcut. To go to instanceVariable in a large code and want to go to its SpecificType class. You can also press Ctrl twice, and then without releasing it, press Up or Down. multi cursor intellij with arrow key; duplicate line intellij mac; intellij change shortcuts; relative line number intellij; intellij multi line cursor; multiple selection in pycharm; pycharm move. On the Keymap page of the Settings/Preferences dialog Ctrl Alt 0S, right-click an action and select Add Mouse Shortcut. 3,712 2 2 gold badges 26 26 silver badges 34 34 bronze badges. Share. Just assign it a shortcut! Go to Settings > Keymap > Main Menu > File > New and assign a shortcut to the types of files you create frequently. Tap: Control + G - Every tap combination select the new same value. IntelliJ IDEA offers a variety of view modes to meet your personal needs while coding. As a result, you will have multiple selection ranges. Assuming we use "shift" and "indent" as synonyms: [Tab] (to move things further to the right) [Shift] + [Tab] (to move things further left) It will do (almost) the same in Eclipse and IntelliJ. DesignAceJump is a plugin for the IntelliJ Platform that lets you jump to any symbol in the editor with just a few keystrokes. Trying to learn ReSharper shortcuts? First, decide which of the two default shortcut schemes is more convenient to you. All you need to do is create a caret at each location using Alt+Shift+Mouse Click and make your changes – they will be applied at all locations simultaneously. Show Line Number using IntelliJ Gutter Option. ⌘ + [option] + click if you're on a mac. There are alternative ways to apply edits to multiple locations of code, for example using the "repeat" command when in the Vim extension (by pressing the ". " key). CMD + T to open new tab in terminal. Shortcuts in IntelliJ. Execute statement: Cmd/Ctrl+Enter. Esc is not always going to put the focus on editor. To add a new line above the current line, press Ctrl Enter. Use middle click to have multiple cursors in Visual Studio 2019 like in VSCode. IntelliJ IDEA has a quick-fix that can convert a line comment into a block comment and vice versa. You can remove the keyboard shortcut (s) that trigger this functionality. ,While the column selection mode is useful, it is limited to cases where places you need to edit are vertically aligned, which may not usually be the case. This can be handy in all kinds of situations from changing the access modifiers of multiple variables at once to adding bullet. This are for the multiline selection to edit multiple lines at once, like you can do in "modern" editors like Atom editor or Sublime Text. If the suggested fix works for you, press Alt+Enter, and the IDE will add the import statement for you. Use Ctrl+Alt+Enter (or ⌥⌘Enter) to start a new line before your current line. I am using Linux and applying an ALT + Click does not apply multiple cursors on the page. Dragging the mouse while holding Ctrl+Alt+Shift ( Meta+Alt+Shift on Mac) will produce a rectangular selection that will also stack with the previous selections. This video is a part of JetBrains PhpStorm Video Tutorials by JetBrains Technical Evangelist Maarten Balliauw. Type any string in the editor, followed by one of the illustrated tags, to jump its position:Trigger the Refactor > Rename option. IntelliJ IDEA 2023. In Eclipse, it's possible by default. Find action. Both should now work. Go to Settings → Hotkeys to customise the keyboard shortcut for each action. 5. Alternatively, to add multiple carets (Clone Caret Below / Above):On Windows: Press Ctrl twice, and then without releasing it,. 6. Bonus: 4 More Shortcuts. An intuitive way to use only a handful of shortcuts and actions to become a power user in IntelliJ. Share. To activate them: Press ^`. Once you use mainly keyboard, you are much more productive. In sublime you can select a part of text or even whole text by Ctrl+A and tap Ctrl+Shift+L will split your selection into multi cursor, it is especially useful when you deal with a big selection, and it's a bit horribly to select it by Mouse3 dragging. WebStorm finds and. This saves a few keystrokes. 0. Right-click on each command that add a cursor and has a keyboard shortcut associated and select “Remove Keybinding”. I found this way much more conveniant, as you can choose to edit all the. 3,732 2 2 gold badges 26 26 silver badges 34 34 bronze badges. When you want to go back to single-cursor mode, just press Esc. :) Organize imports: Ctrl + Alt + O Move statement up / down: Cmd + Shift + Up/Down Move line up / down: Alt + Shift + Up/Down Indent line: Ctrl + Alt + I Reformat code: Cmd + Alt + L Comment line: Cmd + / Comment block: Cmd + Shift + / Incremental selection: Alt + Up /. 3 EAP 2 introduces a new Run to Cursor inlay option that offers a quick way to navigate to a specific line of code while debugging. 1 introduces Sublime style multiple selections, the top voted editor feature in our tracker! Here is how they work: Add/remove a selection: Alt + Shift + Mouse Click. The text from the start of the Visual mode up to and including the character under the cursor is highlighted. If we select a whole code block, we can use ⌥⌘/ (MacOS) or Shift+Ctrl+/ (Windows/Linux) to add a block comment. Set the caret at one corner of the rectangle, and then Alt+Shift+Middle-Click at the diagonally opposite corner. Nov 13, 2020 at 5:40 Add a comment 2 Answers Sorted by: 11 Intellij Idea calls this multiselection. On a MacOS you can use: Tap: Control + Command + G - Select all the same value. This is quicker than holding down Ctrl + D if there are lots of matches. To find it and set a key mapping: cmd+shift+a (if macosx; shift+shift might work cross-platform) for the find-command popup menu. Share. Now you can use the Select. Use Ctrl+F keyboard shortcut then press Enter. Yes, On mac, it is Command + Option + B. Load 7 more related questions Show fewer related questions Sorted by: Reset to default Know someone who. If there are several statements, a list of suggestions. . Intellij - Move Caret to Next/Previous Word with Selection UNTIL SPACE? 0. 8. (Multiple Line / Cursor / Selection Editing) Last modified: 2016-09-05 07:08:15 UTC121. Surprisingly it does not have a shortcut. Share. You can see this in action in the following video: IntelliJ shortcut a day: Column & Multi Cursor Select. ALT + F2 at some point later to re-open terminal (with existing tabs from before) CMD + SHIFT + ] / CMD + SHIFT + [ to switch between the Terminal tabs. , in the first column of the first line), then "double-tap" the Ctrl key to switch to "multiple cursor" mode (the second time, I think you have to hold it down), then hit the down arrow (while still holding Ctrl down) and it will put cursors on each line that you "down-arrow" to. For Mac, a keycord (Cmd + Alt + R) is required to resume the program. You can change them in Settings/Keymap if the default ones don't work (I think that these shortcuts are already used by the system in Ubuntu. Add carets above or below the current caret using keyboard. ago. In the editor, press Control+Alt+Insert to add a class, file, or package. The shortcut is: ⇧ + ⌘ + 8 on Mac. If there are lines with a length lower than the current position, the vertical line will be. Move Caret to Text End with Selection. On the flipside, IntelliJ can do a lot of tricks that pure text editors can't do - such as refactoring, assigning thing to values with the correct type annotation, look up stuff very easily, click to see. 3. As a result, you will have multiple selection ranges. Note: I removed a few keybinds that are not strictly Intellij e. Right now I can only test it with CTRL+ENTER inside the javascript. works for me: hit Alt, release it, then immediately hit it again, and, while holding it, use Up/Down keys. Select the number of lines that corresponds to the editor height, up/down from the current caret position and scroll the document accordingly, and then extend the selection to the same number of lines in the same direction. 8. Go to the Keymap section of your preferences and add your keyboard shortcut to the Toggle Insert/Override command. If you are on ubuntu running on a bootcamp mac (macbook pro here) then the key stroke is Alt + Shift + Fn + Enter. Just go to the Keymap section of preferences and add a Keyboard Shortcut for yourself to Toggle between the Instert/Overwrite cursor mode. Several useful shortcuts for the multiple carets: - p ress Alt+Shift and select the caret locations with the mouse - or press Ctrl+G to add the next occurrence of the current word to the selection - to delete from the selection, press Ctrl+Shift+G. If you want to turn any of them on, you have to enable it via this command in your ~/. As of version 1. Both should now work. Windows, Linux, and Mac OS shortcuts provided on-screen. Plug 'terryma/vim-multiple-cursors' By default, this plugin automatically maps the commands using the ALT key. In IDEA, I go to File -> Settings -> Keymap -> Main menu -> Window -> Editor Tabs. IDEA action name: 'Add or Remove Caret'. They include Presentation Mode, Distraction Free Mode, Full Screen, and Zen Mode. Click the light bulb(or use Alt+ Enter) and suggestions will appear. These keyboard shortcuts correspond to Back and Forward actions. To resize a horizontal tool window, press Ctrl Alt Shift 0↑ and Ctrl Alt Shift 0↓. Adding a shortcut to select something under cursor, however, indeed seems redundant. This is really handy when working with keyboard. IntelliJ IDEA 14. Comment/Uncomment current line or. Vim: handle it as a Vim shortcut. 2. g. Webstorm: Have terminal scale to. AFAIK WebStorm works a bit differently here. multiCursorModifier, to change the modifier key for applying multiple cursors to Cmd + Click on macOS and Ctrl + Click on Windows and Linux. Surface Studio vs iMac – Which Should You Pick? 5 Ways to Connect Wireless Headphones to TV. Simply hold down Alt or Option, depending on which OS you use, and drag up- or downward. Ctrl + Shift + A - Find actions. , map YOU_MAPPING <A-n>). You can use several of these shortcuts to fine-tine your selected text. alt + down = Create cursor under. The IntelliJ IDEA Community Edition is free and open source, while IntelliJ IDEA Ultimate requires you to purchase a license after a free 30-day trial. If you jump over the line at which a variable is initialized, this variable will take. Simply press Ctrl + G and go directly to the line in question. Here you can choose to generate setter with or without default value. There are a few more shortcuts I wanted to include but didn’t have time for the previous video. alt + up = Create cursor above. } will become. Ok - so I tried to create one using the "Add Mouse Shortcut". 4) Undo last cursor operation (CTRL+U) This one I didn't know about for a long time. Inspect Code. 1 Answer. " key). for selection. Structural search and replace. IntelliJ IDEA provides several possibilities to learn shortcuts: The Find Action lets you search for commands and settings across all menus and tools. There is the option to place cursors everywhere matches have been found. IntelliJ IDEA supports having multiple cursors at once, meaning you can type and edit at multiple locations at the same time. Cmd + Alt + s to open the IntelliJ-settings -> select Keymap and search for "Comment with Line Comment" or "Comment with Block Comment". Use column select. alt + 2 (twice) - jump from the terminal to the editor alt + F12 - open the terminal. To go the declaration of a member (Ctrl + Alt + B / Cmd + Opt + B) To go the usages of a member (Ctrl + Alt + B / Cmd + Opt + B) — you’ll have the context menu popup allowing you to choose where exactly to go if you have multiple usages of that member. While Ctrl + Tab lists the. Action. Share. If you exit IntelliJ IDEA without terminating the session, the shared link will be disabled. @Note Shortcut IntelliJ IDEA. IntelliJ shortcut a day: Column & Multi Cursor Select IntelliJ Shortcut a day gives you short, bite sized videos for you to consume at your own pace to massi. Adding a shortcut to select something under cursor, however, indeed seems redundant. We can immediately type to narrow our. 98. 5, aka IntelliJ IDEA 2018. one word to the left. IntelliJ shortcut previous/next caret. e. Editor basics. Windows: Ctrl + Shift M. The multi-cursor feature is very useful for some people, thanks for implementing it. If there are lines with a length lower than the current position, the vertical line will be broken. It has the caret position of line 1, column 9, and Offset 28. To do so, type ‘main’ and either press Tab or hit the Enter key to replace it with the main method. You can do column editing using the Edit | Column Selection Mode. For example, we use: Alt + S for Kotlin files. public void sth (String b, String. When you want to start a new line above the current line, there’s a shortcut that will help you cut down on the number of keystrokes even further. Very useful is you need to do some column based editing for example. The ability to toggle this process is achievable through F9. 1 Get Keymap: Eclipse (macOS) IntelliJ IDEA Classic (macOS) macOS macOS System Shortcuts Sublime Text (macOS) Visual Studio (macOS) Eclipse Emacs GNOME KDE NetBeans Soaring. Right-click on each command that add a cursor. Ctrl + Z – undo. Using Multiple Cursors in IntelliJ IDEA Mitchell Griest 18 subscribers Subscribe 0 Share No views 1 minute ago In this video we use IntelliJ IDEA's multiple cursors feature to. Place the caret at one corner of the rectangle, and then Alt Shift Middle click at the diagonally opposite corner. – Kedar Mhaswade. Multiple cursors can be really valuable, but if you’re trying to refactor something, prefer the dedicated shortcut for renaming so you don’t miss references outside the current file. IntelliJ IDEA provides a set of stepping actions, which are used depending on your strategy (for example, whether you need to go directly to the next line or enter the methods invoked on your way there). If you enable the "Add unambiguous imports on the fly" in Settings > Editor > General > Auto Import, IntelliJ IDEA will add them as you type without the need for any shortcuts. Multiple cursors. File Structure popup: CTRL + F12 This shortcut comes in handy if you are traversing through a huge file looking for a particular method name. Since Idea IntelliJ IDEA 13. This saves a few keystrokes. Alt + Left Mouse Click creates a new cursor where you clicked. I must be doing something wrong. Ctrl Alt 0S IntelliJ IDEA includes several predefined keymaps and lets you customize frequently used shortcuts. 2) Select all occurrences with Shift + Ctrl + Alt + J (Ctrl + Cmd + G for Mac OS X) 3) Press right arrow to remove selection. Follow answered Jan 28, 2018 at 4:08. In Visual Studio Code you can drag with the middle mouse button to create multiple cursors. I'm used to VS code shortcuts, is there anything way I can import vscode shortcuts for IntelliJ Idea. " shortcut), the entire word is selected. Jonathan Birnbaum answered on July 12, 2023 Popularity 8/10 Helpfulness 2/10 Contents ;. The PyCharm editor is the main part of the IDE that you use to create, read and modify code. Alt+F8 Stop Ctrl+F2 Resume Program F9IdeaVim plugins work like the original Vim plugins. Link to this answer Share Copy Link . Hold: Option + Mouse Click - Select multiline with a mouse. Press Ctrl Alt 0S to open the IDE settings and then select Plugins. Use Alt + Shift + Insert to switch between Column and Insert selection mode. see screen shot. E. Share. Contributed on Jul 03 2023 . Alternatively, go to settings Ctrl 0, then click the Edit button near the Keymap menu. row at the top, like in any other IDE. Place the caret at one corner of the rectangle, and then Alt Shift Middle click at the diagonally opposite corner. There are a few shortcuts you need to remember before you can really take advantage of multicursor, and this is basically a cheat. On the Keymap page of the Settings dialog Ctrl Alt 0S, right-click an action and select Add Keyboard Shortcut. If none of the above are working, I suggest using end. Multiple cursors are often the most efficient way to modify SQL code. On a Mac there is no short cut to Enable or Disable the Insert mode. 2) the cursor on point 1 and 4 will be present with the text in between highlighted in yellow - see screen shot. Comments are very important for adding the description of a complex code, for future reference purposes, or commenting on a part of code. Place the caret at one corner of the rectangle, and then Alt Shift Middle click at the diagonally opposite corner. Follow. Aims to replicate the multi-editing features of Sublime Text/Visual Studio Code for faster coding. -> : Find and select all occurrences with cursor = Ctrl + Alt + Shift + J-> : Multi cursor(Any line) = Alt + Shift + Mouse Click and Alt + Hold Mouse click-> : Select Entire Word = Ctrl + W. Double Shift. If you work a lot in the IntelliJ IDEA, you may know about some effective keyboard shortcuts that make the coding a lot faster. Ctrl + Shift + F12. As of version 1. For Mac, you can use ⌘+⌘(Hold)+↑ / ↓. Press Ctrl Shift 0A and start typing to get a list of suggested actions. If you want to have a continuous vertical line, it's enough to press Alt + drag your mouse vertically. Select the term to search for with your cursor. Simply hold down Alt or Option, depending on which OS you use, and drag up- or downward. To select ranges as multiple rectangular selections, Ctrl Alt Shift Click and drag the mouse over the desired parts of code. Ctrl + Shift + N. another_key sequence pasted from the clipboard will be displayed with the correct hierarchy. You can also select a few lines and then use this shortcut to duplicate some bigger parts of your code! Multiple cursors (two shortcuts. Cmd + shift + L = Create one cursor for each selected line 1. Alt Click and drag the mouse to make the selection. Pressing Alt+9 (or ⌘9) again hides this tool window. By default, you can also press Ctrl + Shift + A two times and begin typing Fix doc comment in order. Creating a live template of your own. Alt Click and drag the mouse to make the selection. Alt + F for text files (i. . Ctrl + Shift + N - Search for a file. With the likes of VSCode, Atom, Sublime Text, IntelliJ, even Neovim clamoring for the top spot in developer mindshare, why consider a 50-some year old Lisp operating system from the stone age?. ctrl + alt + down = Move the last-created cursor down. Created July 11, 2016 18:42. Alt+right - it navigates forward to the next cursor position in a different file, not to the next cursor position in the current file even if I already moved my cursor in the same file Ctrl+Q - moves the cursor to the last edit location. Amit Amit. Advanced editor actions, such as code completion and live templates are supported as well and will apply to each caret. ESC will end multi-line mode. 98. This shortcut will kickstart the debugger back into gear and get it moving to the next breakpoint. Use the power of IJ and Vim: set ideajoin to enable join via the IDE. To perform the multi-line search, we need to click on the arrow to enter a new line, so hit Ctrl + Alt +Down to see the multiple occurrences. 8. You can jump to a definition using CTRL + B and navigate between the previous/next cursor position using CTRL + ALT + LEFT/RIGHT (I am not familiar with the Mac keymap, they might look similar) I want to navigate to companion object, not to method definition. Provides the most common multi-editing features. . From IntelliJ Ultimate 2018. 4. For the full list of JetBrains Rider keyboard shortcuts, refer to Keyboard shortcuts in predefined keymaps. However, the indentation of the line is kept and is not adjusted according to the indentation of the new scope. Since we are going to pass arguments for running and debugging the program, make sure the run/debug configuration has these arguments in place. Depends where you do this, the different breakpoints will be created (Line, Method, or Field). The shortcut to turn it on/off is Alt+Shift+Insert. With this option selected, IntelliJ IDEA properly formats key sequences when you paste them from the clipboard. We can paste this line using ⌘V, or Ctrl + V, like in any application. . answered Jun 14. 1 Answer. If found, the changes you are making to the variable name can also be applied to these usages. You can cleverly get three cursors on the variable names, CTRL arrow over to start of strings, hold SHIFT + END, and then move the cursor back using the arrow keys. It's simple and straightforward. The problem was the ideaVim intellij plugin. Step Into: F7. android-studio intellij-13 intellij-idea multiple-columns textselection. Once it’s at a bracket, you can repeat this shortcut to go back and forth between the opening and closing brackets. Related: Cmd - Shift - Enter ( Ctrl + Shift + Enter on Windows) jumps to the next empty line. . intellij select multiple lines shortcut. However, you can remap them using the map command in your ideavimrc (e. This takes the cursor to the navigation bar. Moreover you can press and hold Alt and click the lines you need. If a line contains a string literal. another_key sequence pasted from the clipboard will be displayed with the correct hierarchy. The latest version of Eclipse in which I tested the above-mentioned shortcuts: Eclipse Luna 4. type/search for the "open project windows" command. Type mc (multicursor) and a vim command to create cursors; Type ms (multiselect) and a vim command to select multiple items; If you previously selected some text, then the commands work only in the selected text; Supported vim commands: /, f, t, w, W, b, B, e, E, ~, 0. To add or remove multiple carets, you can also press and hold the Alt key, then click at the next location of the caret. What differs this from the built-in multi-edit of VS. If, Then, Else 6. Create JSDoc comments. The only thing to remember is the home button on the Mac is fn + left arrow. This is quicker than holding down Ctrl + D if there are lots of matches. It is a new feature described in the release notes of march 2014. See the screenshot below to see what I mean. Multiple carets. See images. IdeaVim plugins work like the original Vim plugins. Note that you can assign preferred shortcuts to 'Clone Caret Above/Below' actions in Preferences | Keymap if double-Alt doesn't work for you for some reason. 2. Use Shift+Escape (or ⇧ Esc) to hide an active tool window. There are several editor shortcuts that you can use to speed up your workflows, for example, ⌘⌫, (or Ctrl + Y ), to delete the current line. There are a few more shortcuts I wanted to include but didn’t have time for the previous video. The WebStorm editor is the main part of the IDE that you use to create, read and modify code. Key Promoter X is a plugin that shows a popup notification with the corresponding keyboard shortcut whenever a command is executed using the mouse. to the right of the closing ;) Use the Introduce Field ( Ctrl + Alt + F) action. Improve this answer. Shift+Page Up – Select a frame of text above the cursor. Resume program (F9) Debugging is a constant stop and start process. How can I use multiple carets/cursors? To add or remove multiple carets, press and hold Shift+Alt and click at the next location of the caret. Learn the most useful IntelliJ IDEA keyboard shortcuts to be more productive. e. Ctrl + Shift + L selects all instances of the highlighted string. However, I'm unable to start a selection using the keyboard alone. Then select the necessary action and press Enter to execute it. The cursor ends where it was (i. Follow. The range of refactoring options in IntelliJ is fantastic, right click in your editor and hit R to see the entire menu. Shift+alt I think. Multiple cursors on the same column: Alt followed by Alt+Down, Down, Down, Down. You can exit column selection mode by using Esc key. Starting from IntelliJ IDEA 14 there is also Clone Caret Above / Below:. You can use Help | Find Action ( Ctrl + Shift + A or Cmd + Shift + A on Mac) to see all the actions and their shortcuts. This is not exactly a shortcut but it’s a great way to keep your code clean. Alt + W for Android resource files. I therefore suggest to provide a clean way to disable the multiple-cursor functionality in. When holding the Ctrl button, it’s possible to step through the list of open files. Basically, Intellij only highlights the box I draw with the cursor, but leaves the rest of the editor untouched. This extension makes it possible to select multiple occurrences of a selected text for simultaneous editing with multiple cursors. Use the Navigation bar as a handy tool to find your way across the project. IDEA action name: 'Add Rectangular selection on Mouse Drag'. Go to declaration or usages. It is also a shortcut to flex with junior developers. Make all your mistakes at the same time This module adds a multiple cursors implementation to Emacs. Idea uses three methods to input multiple cursors at the same time. There is an option to get multiple cursor with Ctrl + alt + mouse left long click on all the lines that you want to select. IntelliJ IDEA doesn't have a default keyboard shortcut for this action, but you can manually configure. Markdown, JSON) Set multiple cursors. For the full list of JetBrains Rider keyboard shortcuts, refer to Keyboard shortcuts in predefined keymaps. Apache NetBeans Bugzilla – Bug 200027 Multiline / Multiselection / Multicursor Editing such as in Notepad++, Sublime, and IntelliJ. Although Ctrl + D is my favourite way to create multiple shortcuts, there are other useful ways to do this:. Rather it has the ability to do such as you type. When a coworker yells across the room “Check line 732!” you don’t need to go on a scrolling marathon. Multiple Cursors In Phpstorm Like Sublime Text 3 – ADocLib. ago. Have a look at this answer for information on how to create and assign custom macros. But if you want to create multiple cursors which appear in multiple places, I can’t understand how you will find places for your cursors. You navigate with arrow keys to select blocks of text. Select/unselect the next occurrence: Alt + J / Shift + Alt + J (Ctrl + G / Shift + Ctrl +G for Mac OS X) 4. How to clone multiple cursors in IntelliJ IDEA? While still holding Ctrl, you can press ↑ and ↓ arrows to clone cursor to the line above or bellow. I can select multiple lines by creating more cursors with 'ALT+SHIFT+ARROW UP/DOWN' Since my keys have uneven number of spaces between them, selecting all text till ':' symbol with 'CTRL+SHIFT+ARROW LEFT/RIGHT' is with my knowledge not doable. . Press Ctrl Shift 0K and start typing Edit Keymap. To see the list of all breakpoints use Ctrl + Shift. Add carets above or below the current caret using keyboard. It will help you from the hassle of going aaaallll the way back and re-selecting only the occurrences you need. Option can be toggled via these methods: Menu Bar -> Edit -> Column selection mode.