• Packages
  • Themes
  • Documentation
  • Blog
  • Discuss
Sign in

list-edit

List-aware cut, copy & paste operations that automatically handle separators and whitespace.
  • #list
  • #edit
  • #cut
  • #copy
  • #paste
Oblosys
1.0.1 428
0
  • Repo
  • Bugs
  • Versions
  • License
Flag as spam or malicious

list-edit package Build Status

List-edit provides list-aware cut, copy, and paste operations that automatically handle separators and whitespace, while taking into account strings and comments. For example, to cut the first element from [Three, One, Two] and paste it at the end:

Single-line list edit

On list-cut the list element that contains the cursor is removed, together with its trailing separator and whitespace. After moving the cursor past the last element, list-paste inserts the cut element and puts a separator and whitespace in front of it. List-edit also works in a vertical layout and on multiple elements:

Multi-line list edit

And even between different lists (with yet another layout):

List-edit between lists edit

List-edit uses the grammar of the edited file to ignore strings and comments, but list detection takes place purely on a lexical level. Currently, {}, [], and () are brackets, and , and ; are separators.

For more information, including a small emulator, in which you can try out the package, visit list-edit.oblomov.com.

Key bindings (Mac)

Keys Command  
alt-cmd-s list-select Select element at cursor, or range of elements in selection
alt-cmd-x list-cut Cut elements (and separator+whitespace) at cursor/selection
alt-cmd-c list-copy Copy elements at cursor/selection to the clipboard
alt-cmd-v list-paste Paste elements (and separator+whitespace) at cursor/selection

Windows and Linux key bindings use ctrl-alt instead of alt-cmd.

I think this package is bad news.

Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.

  • Terms of Use
  • Privacy
  • Code of Conduct
  • Releases
  • FAQ
  • Contact
with by