Skip to content

Opens the current selection in a new tab, optionally writes back the changes to the origin

License

Notifications You must be signed in to change notification settings

idleberg/atom-edit-in-new-tab

Repository files navigation

edit-in-new-tab

apm apm apm CircleCI David

Opens the current selection in a new tab. Based on an idea by Lea Verou.

Screenshot

Edit selection in a new tab

Screenshot

Edit in new tab and write changes back to origin

Installation

Install edit-in-new-tab from Atom's Package Manager or the command-line equivalent:

$ apm install edit-in-new-tab

Using Git

Change to your Atom packages directory:

# Windows
$ cd %USERPROFILE%\.atom\packages

# Linux & macOS
$ cd ~/.atom/packages/

Clone the repository as edit-in-new-tab:

$ git clone https://github.com/idleberg/atom-edit-in-new-tab edit-in-new-tab

Inside the cloned directory, install Node dependencies:

$ yarn || npm install

Usage

This package provides several commands in the command palette, the context menu or by using the keyboard shortcuts

  • Edit in New Tab: Copy Selection – Edit current selection in new tab (Ctrl+Shift+T)
  • Edit in New Tab: Settings – Open the settings pane for this package

Settings

It's well worth taking a look at the package settings, where you can tweak the default behaviour.

Option Default Description
Synchronize Changes true Writes changes in the new tab back to the origin¹
Target Pane Specifies the default pane for the new tab
Auto-indent Origin false Auto indent changes written back to the originating tab
Ignore Scope false Doesn't apply the origin's grammar on the new tab
Default Tab-name Define a default scheme for new tabs²
Select false Selects the newly added text
Auto-indent true Indents all inserted text appropriately
Auto-indent New Line true Indent newline appropriately
Auto-decrease Indent true Decreases indent level appropriately
Normalize Line Endings true Normalizes line endings

¹ see it in action
² accepts placeholders %file%, %id%, and %count%

License

This work is licensed under the The MIT License.

About

Opens the current selection in a new tab, optionally writes back the changes to the origin

Resources

License

Stars

Watchers

Forks

Packages

No packages published