Vscode: Allow to create multi-cursor with keyboard

Created on 16 Feb 2017  路  14Comments  路  Source: microsoft/vscode

  • VSCode Version: 1.10.0 - insider
  • OS Version: Windows

-- Sorry for the English, I used Google Translator --

Allow me to place multiple cursors by navigating with the arrow keys.

Like this extension multi-cursor-plus of Atom. Press alt + x to highlight a cursor, use the arrow keys to scroll to the next location you want (by pressing the altkey), and press again.

If I wanted to take some specific cursor, I'll enter the arrows to the location and press alt + x again.

68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f6b616e6b61726973746f2f61746f6d2d6d756c74692d637572736f722d706c75732f6769662f73686f77636173652e676966

editor-multicursor feature-request

Most helpful comment

I am looking for this exact feature on VSCode, I love it on Atom and was trying to replicate it on VSCode. Ctrl-Alt-Down/Up is not the same thing, I'd like to be able to freely move the active cursor while holding Alt and marking it with X whenever I want. After releasing Alt all cursors would be positioned where I wanted. It's a lot faster than using the mouse.

All 14 comments

This could be done from an extension. Out of the box, we ship with ctrl+alt+down that adds a cursor down for each cursor or alt+click.

In this specific example, I would select ': ' and use ctrl+d to swiftly and efficiently select all those instances.

I am looking for this exact feature on VSCode, I love it on Atom and was trying to replicate it on VSCode. Ctrl-Alt-Down/Up is not the same thing, I'd like to be able to freely move the active cursor while holding Alt and marking it with X whenever I want. After releasing Alt all cursors would be positioned where I wanted. It's a lot faster than using the mouse.

In sublime Ctrl-Alt-Down/Up, create cursors, and ctrl+ x would cut all cursors lines.
But vscode not, only cut the original cursor line.

We try to keep VS Code lean and we think the functionality you're asking for is great for a VS Code extension. Maybe you can already find one that suits you in the VS Code Marketplace. Just in case, in a few simple steps you can get started writing your own extension. See also our issue reporting guidelines.

Happy Coding!

-- Sorry for the English, I used Google Translator --

@mjbvz , sorry, but simply remove and re-add the label "* extension-candidate" to the bot to close the question? Really? Being an extension-candidate does not justify closing ... if someone is interested it will be easier to find.

Yes, in fact this issue was based on an Atom extension, but that might well be native to VSCode. I urge you to reopen the issue, or show a justification for closing it other than "Many Houses Open" or "Few Votes." For a significant vote, not to the point of being a priority.

@mjbvz or @alexandrudima , did you reopen the issue?

-- Sorry for the English, I used Google Translator --

A lot, but thank you very much @alexandrudima , for reopening the issue !! 鉂わ笍 馃槏

I'm happy for your understanding and other users still want this feature (either natively or by extension) 馃槃 馃憤

I don't know how this compares to how it's done in Atom, but the cursor-tools extension solves this issue for me.

-- Sorry for the English, I used Google Translator --

@vjdw The Atom extension works most intuitively to date for me.
Try it.
It has more features. See the gif in the first post.

@vjdw
Sorry, this ext doesn't work at all. ctrl+alt + downarrow would not add a cursor in down position of current.

cursor-tools extension works @eromoe, check your keybindings. You might have them already being applied to something else.
I set the option to mark the cursor with Alt+X and the option to enable all marks with Alt+Z and it works like a charm:
cursor_tools

-- Sorry for the English, I used Google Translator --

@ricardofreeman It still does not convince me ... Maybe you can explain how it worked! 馃

1- After activating some cursors, edit what you need, how can I disable only one cursor by navigating the file with (up, down, left, right) without affecting the position of the other cursors?
2 - After activating some cursors, edit what you need, how can I activate another cursor by navigating the file with (up, down, left, right) without affecting the position of the other cursors?

@Tekbr you're right, I wasn't able to change the active cursors once enabled. Perhaps the developer @sergiirocks will allow this in the future?
Still, it's better than nothing :)

Cursor tools FTW.

Was this page helpful?
0 / 5 - 0 ratings