Change:
Atom 1.8 will introduce two new commands to move text selections left and right. A description of the feature is available in It would be great to have these commands on VSCode. !
Thanks for bringing this feature to our attention fyi
That looks so cool
Could we use the <kbdAlt</kbd+<kbd←</kbd(respectively <kbdAlt</kbd+<kbd→</kbd) as the keyboard shortcut? That would match perfectly the actions to move lines up or down.
I think <kbdcontrol</kbd+ <kbdcmd</kbd+ <kbd←/→</kbdis better(Atom 1.8). <kbdAlt</kbd+ <kbd←/→</kbdis to move the cursor around the word.

Discussion:
import 'vs/editor/contrib/inPlaceReplace/common/inPlaceReplace'; import 'vs/editor/contrib/iPadShowKeyboard/browser/iPadShowKeyboard'; import 'vs/editor/contrib/linesOperations/common/linesOperations'; <ins> import 'vs/editor/contrib/carretOperations/common/carretOperations'; </ins> import 'vs/editor/contrib/links/browser/links'; import 'vs/editor/contrib/multicursor/common/multicursor'; import 'vs/editor/contrib/outlineMarker/browser/outlineMarker';

<ins> /*--------------------------------------------------------------------------------------------- *  Copyright (c) Microsoft Corporation. All rights reserved. *  Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ 'use strict'; import * as nls from 'vs/nls'; import {KeyCode, KeyMod} from 'vs/base/common/keyCodes'; import {TPromise} from 'vs/base/common/winjs.base'; import {EditorAction} from 'vs/editor/common/editorAction'; import {ICommand, ICommonCodeEditor, IEditorActionDescriptorData} from 'vs/editor/common/editorCommon'; import {CommonEditorRegistry, ContextKey, EditorActionDescriptor} from 'vs/editor/common/editorCommonExtensions'; import {MoveCarretCommand} from './moveCarretCommand'; class MoveCarretAction extends EditorAction { private left:boolean; constructor(descriptor:IEditorActionDescriptorData, editor:ICommonCodeEditor, left:boolean) { super(descriptor, editor); this.left = left; } public run():TPromise<boolean> { var commands:ICommand[] = []; var selections = this.editor.getSelections(); for (var i = 0; i < selections.length; i++) { commands.push(new MoveCarretCommand(selections[i], this.left)); } this.editor.executeCommands(this.id, commands); return TPromise.as(true); } } class MoveCarretLeftAction extends MoveCarretAction { static ID = 'editor.action.moveCarretLeftAction'; constructor(descriptor:IEditorActionDescriptorData, editor:ICommonCodeEditor) { super(descriptor, editor, true); } } class MoveCarretRightAction extends MoveCarretAction { static ID = 'editor.action.moveCarretRightAction'; constructor(descriptor:IEditorActionDescriptorData, editor:ICommonCodeEditor) { super(descriptor, editor, false); } } CommonEditorRegistry.registerEditorAction(new EditorActionDescriptor(MoveCarretLeftAction, MoveCarretLeftAction.ID, nls.localize('carret.moveLeft', "Move Carret Left"), { context: ContextKey.EditorTextFocus, primary: KeyMod.Alt | KeyCode.LeftArrow, linux: { primary: KeyMod.Alt | KeyCode.LeftArrow } }, 'Move Carret Left')); CommonEditorRegistry.registerEditorAction(new EditorActionDescriptor(MoveCarretRightAction, MoveCarretRightAction.ID, nls.localize('carret.moveRight', "Move Carret Right"), { context: ContextKey.EditorTextFocus, primary: KeyMod.Alt | KeyCode.RightArrow, linux: { primary: KeyMod.Alt | KeyCode.LeftArrow } }, 'Move Carret Right')); </ins>  No newline at end of file

<ins> /*--------------------------------------------------------------------------------------------- *  Copyright (c) Microsoft Corporation. All rights reserved. *  Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ 'use strict'; import {Range} from 'vs/editor/common/core/range'; import {Selection} from 'vs/editor/common/core/selection'; import {ICommand, ICursorStateComputerData, IEditOperationBuilder, ITokenizedModel} from 'vs/editor/common/editorCommon'; export class MoveCarretCommand implements ICommand { private _selection: Selection; private _isMovingLeft: boolean; private _cutStartIndex: number; private _cutEndIndex: number; private _moved: boolean; private _selectionId: string; constructor(selection: Selection, isMovingLeft: boolean) { this._selection = selection; this._isMovingLeft = isMovingLeft; } public getEditOperations(model: ITokenizedModel, builder: IEditOperationBuilder): void { var s = this._selection; this._selectionId = builder.trackSelection(s); if (s.startLineNumber !== s.endLineNumber) { return; } if (this._isMovingLeft && s.startColumn === 0) { return; } else if (!this._isMovingLeft && s.endColumn === model.getLineMaxColumn(s.startLineNumber)) { return; } var lineNumber = s.selectionStartLineNumber; var lineContent = model.getLineContent(lineNumber); var left; var middle; var right; if (this._isMovingLeft) { left = lineContent.substring(0, s.startColumn - 2); middle = lineContent.substring(s.startColumn - 1, s.endColumn - 1); right = lineContent.substring(s.startColumn - 2, s.startColumn - 1) + lineContent.substring(s.endColumn - 1); } else { left = lineContent.substring(0, s.startColumn - 1) + lineContent.substring(s.endColumn - 1, s.endColumn); middle = lineContent.substring(s.startColumn - 1, s.endColumn - 1); right = lineContent.substring(s.endColumn); } var newLineContent = left + middle + right; builder.addEditOperation(new Range(lineNumber, 1, lineNumber, model.getLineMaxColumn(lineNumber)), null); builder.addEditOperation(new Range(lineNumber, 1, lineNumber, 1), newLineContent); this._cutStartIndex = s.startColumn + (this._isMovingLeft ? -1 : 1); this._cutEndIndex = this._cutStartIndex + s.endColumn - s.startColumn; this._moved = true; } public computeCursorState(model: ITokenizedModel, helper: ICursorStateComputerData): Selection { var result = helper.getTrackedSelection(this._selectionId); if (this._moved) { result = result.setStartPosition(result.startLineNumber, this._cutStartIndex); result = result.setEndPosition(result.startLineNumber, this._cutEndIndex); } return result; } } </ins>

<ins> /*--------------------------------------------------------------------------------------------- *  Copyright (c) Microsoft Corporation. All rights reserved. *  Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ 'use strict'; import {Selection} from 'vs/editor/common/core/selection'; import {MoveCarretCommand} from 'vs/editor/contrib/carretOperations/common/moveCarretCommand'; import {testCommand} from 'vs/editor/test/common/commands/commandTestUtils'; function testMoveCarretLeftCommand(lines: string[], selection: Selection, expectedLines: string[], expectedSelection: Selection): void { testCommand(lines, null, selection, (sel) => new MoveCarretCommand(sel, true), expectedLines, expectedSelection); } function testMoveCarretRightCommand(lines: string[], selection: Selection, expectedLines: string[], expectedSelection: Selection): void { testCommand(lines, null, selection, (sel) => new MoveCarretCommand(sel, false), expectedLines, expectedSelection); } suite('Editor Contrib - Move Carret Command', () => { test('move selection to left', function () { testMoveCarretLeftCommand( [ '012345' ], new Selection(1, 3, 1, 5), [ '023145' ], new Selection(1, 2, 1, 4) ); }); test('move selection to right', function () { testMoveCarretRightCommand( [ '012345' ], new Selection(1, 3, 1, 5), [ '014235' ], new Selection(1, 4, 1, 6) ); }); test('move selection to left - from first column - no change', function () { testMoveCarretLeftCommand( [ '012345' ], new Selection(1, 1, 1, 1), [ '012345' ], new Selection(1, 1, 1, 1) ); }); test('move selection to right - from last column - no change', function () { testMoveCarretRightCommand( [ '012345' ], new Selection(1, 5, 1, 7), [ '012345' ], new Selection(1, 5, 1, 7) ); }); }); </ins>  No newline at end of file