Some of the features offered by CLion are: Smart Editor. With this feature you can: Set multiple cursors in the editor area: Alt + Mouse Click (Option + Mouse Click for Mac OS X). 1) indent-rainbow. As of IntelliJ IDEA 13. /ideavimrc: set multicursor. Ctrl Shift End. Use the power of IJ and Vim: set ideajoin to enable join via the IDE. A tag already exists with the provided branch name. For advanced customization you can open and edit keybindings. IntelliJ IDEA includes several predefined keymaps and lets you customize frequently used shortcuts. Alternatively, go to settings Ctrl 0, then click the Edit button near the Keymap menu. Press F3 to go to the next occurrence. I want to edit multiple lines in eclipse, but I can't find any short cut or Plugin. I suggest not to do it in the second case because resulting interface would. Currently when pressing Alt IntelliJ uses the multicursor feature, which always results in me having an aditional cursor somewhere where I don't want it. After hitting Ctrl+X and Ctrl+V in another method: One can notice that there are empty spaces after every pasted line. E. One of the most useful methods for editing multiple lines of code or XML in Android Studio (or IntelliJ) is multicursor. Check out more ex commands. Video Player. Advanced editor actions, such since code completion and live templates can supported as now and will apply to each caret. Yes, it is possible. Sublime Text pioneered this concept, which IntelliJ added for all the IDEs atop its platform. Does anyone know that whether there is multiple cursors feature in PHPStorm 6. Place the caret at one corner of the rectangle, and then Alt Shift Middle click at the diagonally opposite corner. The commentary plugin emulates vim-commentary, and enables. If I want to copy and paste something this is now the terrible result. toggleMultiCursorModifier) is not binded to any key combination (I assumed that this is the given feature) and even if I try to bind a key combination to that and use the combination, this. java. Alt Click and drag the mouse to make the selection. Not only simple ones such as syntax errors but also a lot of complex ones such as code duplication or Control Flow Analysis. Drag to Create Rectangular Selection. Learn even more with my course on. This plugin brings multiple cursors and selections to IdeaVim Usage Type mc (multicursor) and a vim command to create cursorsType ms (multiselect) and a vim command to. Just remember that for carets in a vertical line, press Option (macOS) and Ctrl (Windows/Linux) twice, holding it down the second time. In your editor, press Alt + Windows Key and use your mouse to place the cursor on the lines you want to have multiple cursors on. Shift + Command + 8 and phpStorm will get back to normal selection. We can paste this line using ⌘V, or Ctrl + V, like in any application. 42. Control+ Click for multi-cursor ,Command+ Click to go to declaration or open link. The shortcuts covered in this post are: Search Everywhere – ⇧⇧ on macOS, or Shift + Shift on Windows/Linux. Aden Date. Reformatting Entire Files. Not quite a keyboard shortcut, this one is more of a code completion helper. I think you have enabled 'column selection'. You can see this in action in the following video: IntelliJ shortcut a day: Column & Multi Cursor Select. Create. Out of the box, IntelliJ IDEA provides a comprehensive feature set including tools and integrations with the most important modern technologies and frameworks for enterprise and web development with Java, Scala, Groovy and other languages; NetBeans IDE: Quickly and easily develop desktop, mobile and web applications with Java,. With PyCharm's multicursor, multiple carets can be used, with IDE actions applying to each caret. icons (2023. Adds a cursor on the previous/next line. Surface Studio vs iMac – Which Should You Pick? 5 Ways to Connect Wireless Headphones to TV. GoLand: Environment for Go development. In the Keyboard Shortcut dialog, press the necessary key combination. Ctrl Shift 0A. . 0. Set multiple cursors. Code surround-multicursor. It's called vim-visual-multi in analogy with visual-block, but the plugin works mostly from normal mode. Pycharm: Cursor multiline selection as block. Share. Share. But I am new so I am willing to learn. Welcome to a new Helen's Take On video. Add `suppress. Name the new configuration: HelloWorldJar. 1 ? I have been using Sublime Text 2 and I became addicted to the feature. Some of the features offered by GitHub Enterprise are: Compliance and auditing. How can I add multiple cursors? I'd like to edit multiple lines of text at the same time. I can only figure out once i click and caret shows up. If you are on ubuntu running on a bootcamp mac (macbook pro here) then the key stroke is Alt. Hold Ctrl + Alt. Summary. 0. What are live templates in IntelliJ?How do I get IntelliJ to position the cursor at the end of a line when I click or move the cursor with the arrow keys? By default it places it where I click, or directly above/below where it last was in the case of arrow key usage. To add a line. IntelliJ IDEA has keyboard shortcuts for most of its commands related to editing, navigation, refactoring, debugging, and other tasks. Press Alt 0→ and Alt 0← to switch between active tabs. mirror. Find Usages – ⌥F7 on macOS, or Alt + F7 on Windows/Linux. Read stories about Multi Cursor on Medium. Download the latest version of IntelliJ IDEA for Windows, macOS or Linux. I know you can have somewhat the same behaviour in Visual Studio 2019 using Alt + LMB . answered Sep 2, 2020 at 9:51. Hi,I love the multiline cursor and edit feature in Webstorm. editorconfig file in it. 1 That functionality is available for you via mouse3 dragging. Intellij Shortcut A Day: Column Multi Cursor Select. 46 lines 1. PhpStorm Tips & Tricks #11 – Multi Cursor Usage Is a Must Multi-cursors are so powerful and a must-have in every code editor. First row no problem, ctrl+v marking block and x. responsive. 1) the cursors on point 2 and 3 will dissappear. The following table lists some of the most useful shortcuts to learn: Shortcut. intellij. Multicursor support. Indenting a block of code A block of code can be effortlessly indented using the visual block mode. Documentation comment block: /** + Enter. If you know how to solve this, please let me know). These keyboard shortcuts correspond to Back and Forward. IntelliJ idea provides diff views for different entities like code, revisions and also images! For comparing content with clipboard, just select the particular entity and then, choose the Compare with clipboard command in the view. 41 4. I'm working on two files simultaneously in the split mode and I would love to know how can I have multiple cursors in two different files simultaneously?vim-visual-multi. Additionally, quick key. Maybe some 3rd-party add-ins could help you do this in Word. Alt + J selects the next occurrence of the currently selected text and adds another caret. Do one of the following: Successively press Alt + J to find and select the next occurrence of case-sensitively matching word or text range. com/idea @intellijidea blog. IntelliJ 14. I put a video here to. This can be handy in all kinds of situations from changing the access modifiers of multiple variables at once to adding. 9. 6. IdeaVim-EasyMotion (1. Install plugin from Intellij Idea Marketplace and add the following option on top of your . S. Using Alt with the mouse click you can set the cursors in all places you need (please note that you may always change the shortcut in Settings -> Keymap -> Editor Actions -> Add or Remove Caret ): You can also use keyboard. You can also press Ctrl twice, and then without releasing it, press Up or Down. CREATE AND EDIT JetBrains Rider 'IntelliJ' Keymap Show Context Actions ⌥⏎ Basic Code Completion ⌃Space Smart Code Completion ⌃⇧Space Type Name Completion ⌃⌥Space Complete Statement ⇧⌘⏎In order to generate such diagrams you need to install a plugin for IntelliJ. If you want to organize the imports use Ctrl+Alt+O, to execute all the formatting features just use Ctrl+Shift+Alt+T. Intellij Shortcut A Day: Column Multi Cursor Select. Steps: 1: Put the cursor on the variable ex: Press shift+f6. IntelliJ 8. Donn, Kaushik. How it works? Press Shift+Alt+left click. IntelliJ IDEA can be classified as a tool in the "Integrated Development Environment" category, while Vim is grouped under "Text Editor". another_key sequence pasted from the clipboard will be displayed with the correct hierarchy. Multicursor selection in Jupyter without mouse. This plugin brings multiple cursors and selections to IdeaVim Usage Type mc (multicursor) and a vim command to create cursorsType ms (multiselect) and a vim. Alt Click and drag the mouse to make the selection. lermitage. You can press Alt + Shift and using the mouse left click you can put many carets. I followed by instructions here but they didn't help:. 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. However, the <A-n> keys are not the keys used by the extension that IdeaVim's multiple-cursors is based on ( terryma/vim-multiple-cursors ). For example, enter the following comment in a Java file. Did you know that IntelliJ IDEA can be used to edit multiple lines at once with its column selection feature!? And. . Popularity 5/10 Helpfulness 1/10 Language whatever. Modified 5 years, 2 months ago. Share. Multiple-cursors is useful features to do coding. Follow. If you are on ubuntu running on a bootcamp mac (macbook pro here) then the key stroke is Alt + Shift + Fn + Enter. There's lots of places that multiple carets are helpful in IntelliJ IDEA, especially when you're working with lists. In my example, the word key Next, select all occurrences: press ctrl+alt+shift+J; alternatively use the find action menu ctrl+shift+A; Now you can expand your selection (ctrl+W) to the entire keys, and then copy and past elsewhere. Review and edit key bindings. IntelliJ IDEA, the flagship IDE by JetBrains, is designed to help you stay productive during development. February 07, 2017. Setup. 3. You can read more if you want. This is finally available! IntelliJ IDEA 13. I'm running on Gnome 3. Steps: 1: Put the cursor on the variable ex: Press shift+f6. 0-IJ2022. 0. Follow. for as long as Ctrl+D is pressed again, continuously, those flags will. If you found this article useful, please share it. 6 Answers. So if you are like me, you can just temporarily change it to IntelliJ keymap, press SHIFT+ALT+INSERT and switch back to your previous keymap settings. jupyter-notebook markdown for multiline code. 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. 10) com. 4. Improve this answer. For example, the key2. VSCode is also free. To select ranges as a single rectangle, do one of the following: Place the caret at one corner of the rectangle, and then Alt Shift Middle click at the diagonally opposite corner. Ngoài ra, cũng có rất nhiều shortcuts hữu ích khác như: ⌘→ hoặc ⌘← để di chuyển con trỏ xuống cuối dòng hoặc đầu dòng. stealing=false` to a new line. As a result, you will have multiple selection ranges. 10. Complete Current Statement, ⇧⌘⏎ (MacOS) or Shift+Ctrl+Enter (Windows/Linux), is one of the most useful shortcuts while coding. In Adobe Brackets, i could move cursor for a mutltipe selection with ALT+SHIFT+UP/DOWN. Select/unselect the next occurrence: Alt + J / Shift + Alt + J ( Ctrl. Android Studio - Android development environment based on IntelliJ IDEA. Likewise, Ctrl+Alt+P is for extracting the method parameter. Now, instead of going through each file one by one, you can see all of the modified files from a changeset in a single, scrollable frame. To work with cursors you must use the following SQL statements: DECLARE CURSOR. They appreciate its plugin architecture, integrated version control, and reliability. But it works for more complex code, for example if you. When typing, copying, or pasting in IntelliJ IDEA editor, you can toggle multiple cursors so that your actions apply in several places simultaneously. After pressing some keys like a it changes back to. With this option selected, IntelliJ IDEA properly formats key sequences when you paste them from the clipboard. Alexander Barker's answer above only works if you use the IntelliJ keymap in settings: I was using the VSCode KeyMap and found that it didn't work. On the other hand, SourceTree provides the following key features: Create, clone, commit, push, pull, merge, and more are all just a click away. ⌥ + ⇧ on Mac. typing "added" only once. Advanced editor actions, such as code completion and live templates are supported as well and will apply to each caret. The shortcuts work across all IntelliJ IDE, such as Android Studio, Webstorm, PyCharm, etc. In the Settings dialog ( Ctrl Alt 0S ), select Plugins. On the Keymap page of the Settings dialog Ctrl Alt 0S, right-click an action and select Add Keyboard Shortcut. Follow. If you want to Add Selection To Next Find Match then use Ctrl+D. dankinsoid. Hi! A annoying behavior happens when I click the editor at some character and just moves the pointer around, this makes a selection of the text. Using this feature also automatically brings up the diff between what you have now and the last Git version, so you can also use this primarily for that functionality as well. Just go to the Keymap section of preferences and add a Keyboard Shortcut for yourself to Toggle between the Instert/Overwrite cursor mode. Hot Network Questions Will US universities consider the application of a person with a PhD from India/Singapore/Australia for a faculty position in the US?Shift Pg Dn. Other caret settings are under Settings -> Editor -> Colors & Fonts -> General. 12-231) PlantUML integration (6. Find the IdeaVim plugin in the Marketplace and click Install. Bartosz Gorlewicz. 3 now supports multiline TODO comments, now the first and all subsequent TODO comment lines are highlighted in the editor and listed in the TODO Tool Window. 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. The shortcut to turn it on/off is Alt + Shift + Insert. Note that on some systems you also have to use Shift with the shortcuts mentioned. Share. Atom is modern, approachable, and hackable to the core. Advanced editor actions, such as code completion live templates are supported as well and will apply to each caret. If you jump over the line at which a variable is initialized, this variable will take. Place the caret at one corner of the rectangle, and then Alt Shift Middle click at the diagonally opposite corner. They have a free (limited feature) and paid edition. Since IntelliJ is the de-facto standard for writing Java/Kotlin/Scala application, and in Relay42 we are heavy Java users, every new engineer gets an Ultimate subscription from day1. Designmulti cursor intellij with arrow key Comment . . ; If you want to Move Last Selection To Next Find Match then use Ctrl+K +Ctrl+D. Sometimes it is useful to edit multiple places in the file at once, which can save you precious time and increase your productivity. (Multiple Line / Cursor / Selection Editing) Last modified: 2016-09-05 07:08:15 UTCMulti Cursor (Alt + J) This is personally my favorite shortcut. multi cursor intellij; phpstorm turn off multi cursor; Information related to the topic phpstorm multiple cursor. 1. X. You navigate with arrow keys to select blocks of text. Intellij IDEA will show a popup where you can enter the name of the method along with the visibility (access modifiers). Disable Vim Emulator for Intellij. IntelliJ IDEA has a broader approval, being mentioned in 815 company stacks & 1065 developers stacks; compared to PyCharm, which is listed in 372 company stacks and 527 developer stacks. 3. jetbrains. Share. com/idea Windows & Linux keymap REMEMBER THESE SHORTCUTS Smart code completion Ctrl + Shift + SpaceIf you want to create 'long' multiple cursor you can set shortcuts for 'Clone Caret Below' and 'Clone Caret Above' with keyboard. VsCode, Sublime and IntelliJ they all have it. Code completion. Recent Files – ⌘E on macOS, or Ctrl + E on Windows/Linux. However, - the multicursor-functionality isn't that nice, when using IdeaVim. I recently swtiched from CLion/Intellij to Neovim for C/C++/Rust/Flutter development and I managed to "configure" every CLion feature I used into Neovim - and much more. Apply EditorConfig. P. It starts of in a sort of protected mode, which looks like the insert mode but it isn't, where I can't insert anything. Restart IntelliJ IDEA. Open the cursor to establish the result set. Eclipse - IDE for Java EE Developers. Good evening, I am trying to set the cursor from block caret to |, it doesn't seem working since. Press Esc to return to the first line. Put your cursor on the first line, then press & hold Option + Shift (on a Mac. Tap: Control + Command + G - Select all the same value. 3. Use Ctrl+F keyboard shortcut then press Enter. FiraCode - Free monospaced font with programming ligatures. ⇧⌘→ hoặc ⇧⌘← để chọn chuỗi từ vị trí con trỏ đến cuối dòng. and buttons boxes". Setup. Drag your mouse over the code’s desired parts. Within the IDE Settings section of that dialog, you'll find it under Editor | Appearance. 15. 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. . My current approach is to autocomplete each, but this gets exhausting, especially because the autocomplete list re-orders itself each time I go to fill in the next element. <ALT-x>: deselect the current occurrence and go to the next one. Improve this answer. Simply hold down Alt or Option, depending on which OS you use, and drag up- or downward. Press Ctrl Shift 0A, find and run the Edit Configurations action. mermaid (0. Configure the "Down with Selection" and "Up with Selection" options. Discover smart, unique perspectives on Multi Cursor and the topics that matter most to you like Coding, Intellij, Vscode, Awesome, C Sharp Programming. You can now change the virtual cursors + selection with visual mode commands. I prefer middle click and. Ctrl + Shift + N. Please go to Settings -> Keymap -> Editor Actions and set up. This extension overrides the default insertCursorBelow/Above keybindings: Windows: Ctrl+Alt+Down/Up. answered Sep 2, 2020 at 9:51. Command Palette. Matplotlib is a Data Visualization library in python. Otherwise, if the option is cleared, key sequences are pasted from the clipboard. 1 Answer. println("Number of times the planet rotates around the sun is " + NUMBER_OF_DAYS_IN_A_YEAR); View steps. <ALT-n>: Start multi cursor mode, select the current word, or select the next occurrence. As a result, you will have multiple selection ranges. Assume the following piece of code. IntelliJ IDEA and Spyder can be categorized as "Integrated Development Environment" tools. Log in, to leave a comment. It supports many languages, but is very slow and bad for beginners. 41 4. ctrl + shift + n - Open a class or a file from your current project 2. intellij. In the Keymap, go to "Editor Actions". If you press and hold the Ctrl / ⌘ button while dragging the arrow, the IDE will highlight all the lines in green. As a result, you will have multiple selection ranges. You can use Ctrl+Shift+Enter to complete your statement (in your case it will place caret at the end of line and will add ";" there) -- action called "Complete Current Statement" and shortcut can be. 0. Another way it to press Ctrl (Lin/Win) or ⌥ (macOS) twice. Hi there, Looks like you are in Column Selection Mode (which you can toggle on/off in Edit menu -- Alt+Shift+Insert is the shortcut here on Windows using Default keymap). Select/unselect the next occurrence: Alt + J / Shift + Alt + J (Ctrl + G / Shift + Ctrl +G for Mac OS X) Select all occurrences: Shift. 2 - 13. This is finally available! IntelliJ IDEA 13. You can also “shelve” changelists, similarly to git stash, but from our point of view the IntelliJ variant to be much more powerful. 1. I googled, checked the Jetbrains plugins directory but still no luck. No additional set commands in ~/. During that I realized that Jetbrains IDEs are in most cases. When a Document is opened, the Editor assigns an internal, zero-based coordinate system to lines and columns in the Document. Click Advanced System Settings in the Control Panel Home tab. Lyft, Asana, and Square are some of the popular companies that use IntelliJ IDEA, whereas JetBrains Rider is used by UGroop, Quote Software, Inc. As soon as it goes into editor panel, it switches to a different style and becomes very difficult to see. The shortcut was being overridden by the Gnome "mouse-button-modifier" that allows you to Alt + click and drag windows around for example. Please. Drag multi cursors (Hold ⌥, left click, drag) To create multiple cursors, hold ⌥, click anywhere within the first line you want to the first cursor to be, and drag it down vertically. For your use case once vim-visual-multi is installed. Do a multi-line edit starting an any arbitrary column as normal, then press the "END" key and the insertion points will move to the end of each line. IntelliJ IDEA is fast, reliable, best-in-class IDE. Is it possible to split selection into multi cursor in Intellij IDEA? 0. 2 Answers Sorted by: 11 Intellij Idea calls this multiselection. Check out to fin. Down with selection is ^⇧↓ - but that key combination doesn't appear to do the trick. Auto expand key sequences upon paste. I want the cursor to go to the end of a line when I click on a line not here in the middle of the screen. Kudos to the first person who leaves a comment with the answer. Press Cmd/Ctrl+Enter. Select a block using Ctrl + v and the navigation keys. Formatting and cleaning. Such functionality. 1. This is tedious to do every time. Breakpoint best practices. Intuitive. " They also call it powerful, robust, and helpful. Hope it helps! 👏 if you liked. Press F3 to go to the next occurrence. For more information about adding and editing code, refer to Write and edit source code. We can immediately type to narrow our. Find Action. IntelliJ Idea has a very cool feature of changing multiple lines simultaneously. Please keep in mind, that you should make it easy to get all necessary information to make an answer easy. On the other hand, pre-commit provides the following key features: pre-commit is an open source tool with 755 GitHub stars and 96 GitHub forks. Multiple cursors are often the most efficient way to modify SQL code. ideavimrc are required. Vim is distributed free as charityware. Dec 29, 2017. Any number of child processes can be attached like this, and each will open its own separate debugging session with its own local variables and ability to step through it, all in separate tabs in the one IDE instance. So, switch to single line is pretty simple, select lines and press ctrl + shift + j (already discussed here). Apache NetBeans Bugzilla – Bug 200027 Multiline / Multiselection / Multicursor Editing such as in Notepad++, Sublime, and IntelliJ. Instead, the IDE will act as if you have used the Run to Cursor (⌥F9) action. Use Ctrldown to select the part of the column you want to edit (like Ctrlv + down would do in standard Vim),; Use i to switch to insert mode,; Type your text, Leave insert mode Esc,;. edited Oct 17, 2014 at 18:21. Keyboard Shortcut -> ALT + SHIFT + INSERT. IdeaVim-EasyMotion (1. ex: Hit the Refactor button. dankinsoid. From IntelliJ 8. IntelliJ shortcut a day: Column & Multi Cursor Select. 1. Mouse is selecting the text by itself. select all: <A-n> start multicursor and directly select all matches. 6-231) AceJump (3. 3) If I now type some text the lines between point 1 and 4 are immediatley deleted and the text appears on line 1. On the other hand, IntelliJ IDEA provides the following key features: Smart Code Completion. Follow. So if you are like me, you can just temporarily change it to IntelliJ keymap, press SHIFT+ALT+INSERT and switch back to your previous keymap settings. E. When I click and drag on the IDE over. This plugin brings multiple cursors and selections to IdeaVim Usage Type mc (multicursor) and a vim command to create cursorsType ms (multiselect) and a vim command to. Open your project in IntelliJ, click on: File → Settings → Plugins and type SequenceDiagram in the search field. It's nice that Visual Studio Code has a multi-cursor mode, and it's nice that it is possible to access it solely from the keyboard (although it would be much better if it worked according to native UI patterns on the Mac, but that's a different matter). Find the IdeaVim plugin in the Marketplace and click Install. Hold: Option + Shift and Tap: Mouse Click - duplicate cursor for a each tap place. So two windows , separate windows , on two different monitors viewing the same file. vimrc file using source ~/. {"payload":{"allShortcutsEnabled":false,"fileTree":{"src/main/kotlin/com/github/dankinsoid/multicursor":{"items":[{"name":"Extensions. "Fantastically intelligent", "Best-in-class ide" and "Many languages support" are the key factors why developers consider IntelliJ IDEA; whereas "Intellisense, ui", "Complete ide and debugger" and "Plug-ins" are the primary reasons. Drag to. 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. IdeaVim Casts #8: Multiple-Cursors. Sorted by: 212. If you want to have a continuous vertical line, it's enough to press Alt + drag your mouse vertically. Here are the search results of the thread phpstorm multiple cursor from Bing. It can be a subquery or a group of statements. PyCharm, IntelliJ IDEA are both products of JetBrains. Let’s start with the very beginning. Working with intellij, i could easily use the multi-cursor function, for deleting the quotes in the first row, then strg+right jumping a word to the right, and then del for deletion of the second quote. The stepping buttons are located on the Debug. I how I fix this terrible selector / cursor. From version 14. Just a comment: @jbyler 's answer end up being more practical in the sense that it temporarily disables ideavim so that it doesn't interfere with the other IntelliJ features. 12-231) PlantUML integration (6. To use cursors in SQL procedures, you need to do the following: Declare a cursor that defines a result set. I'm not sure if there is a plugin that can help with this. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. 3. 9. typing "added" only once. Quick code selection. On the other hand, Xcode provides the following key features: "Fantastically intelligent" is the top reason why over 271 developers like IntelliJ IDEA, while over 127 developers mention "IOS Development" as the leading cause for. intellij multiple cursors; golang multi cursor; phpstorm change all occurrences; auto save webstorm; phpstorm rename multiple files; Information related to the topic phpstorm edit multiple lines. What I’m missing most is multi cursor/caret placing with mouse click (VS Code uses Alt+Mouse click for. Refer to the figure below for comparison. All you need to. It makes it very easy to read, write and change the code; IntelliJ IDEA: Capable and Ergonomic IDE for JVM. 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.