how move items up / down a list?

Everything related to our flagship word processor.
Post Reply
ronald
Posts: 2
Joined: 2017-05-12 03:35:25

how move items up / down a list?

Post by ronald » 2017-05-12 03:40:54

Hello,
How does one move items up and down (and if possible left and right) in a list?
How do I configure the corresponding shortcuts ?
thanks very much !!

adryan
Posts: 173
Joined: 2014-02-08 12:57:03
Location: Australia

Re: how move items up / down a list?

Post by adryan » 2017-05-12 14:58:23

G’day, Ronald et al

Moving list items to the left or right (ie, decreasing or increasing the list level of an item) can be accomplished in various ways. Here are some of them:–

(1) Place the cursor anywhere in the item in question, then use Cmd+Option+right_arrow (⌘⌥→) to move the item to the right, or Cmd+Option+left_arrow (⌘⌥←) to move the item to the left.
(2) Place the cursor at the beginning of the item in question, then hit the Tab key to move the item to the right, or Shift-Tab to move it to the left.
(3) Place the cursor anywhere in the item in question, then choose from the main menu: Format > Increase [or Decrease] Indent. You will notice here that Nisus Writer already provides shortcuts for these commands, as used in Method 1 above.
(4) Place the cursor anywhere in the item in question, then choose from the drop-down menu in the List Toolbar Item: Increase [or Decrease] Indent.
(5) Place the cursor anywhere in the item in question, then increase or decrease the level in the Lists Palette from the Palette Library.

Moving list items up or down is something you need to do manually by cutting and pasting the relevant paragraph(s) into the required position in the list. If it’s an ordered list, Nisus Writer takes care of the ordering (eg, numbering) automatically. One could write macros to shift items up or down, and perhaps assign shortcuts to these macros, but you’d probably want them to shift all the nested items as well.

Cheers,
Adrian
MacBook Pro (mid-2014)
macOS Sierra 10.12.6
Nisus Writer user since 1996

Axbax
Posts: 9
Joined: 2017-02-04 11:55:59

Re: how move items up / down a list?

Post by Axbax » 2018-04-06 00:50:59

Hi, does anyone know of a macro that can do this? Or could the developers implement this function? I use it a lot when I write in Scrivener/Ulysses/Bear/Word, so I'd love to see it implemented in Nisus as well.
Cheers

User avatar
phspaelti
Posts: 911
Joined: 2007-02-07 00:58:12
Location: Japan

Re: how move items up / down a list?

Post by phspaelti » 2018-04-06 07:40:02

The following macro will move a list item down one. It will keep the item selected, so you can use it repeatedly to move down two or three. It can't handle multiple items.
Attachments
Move List Item Down.nwm.zip
(2.92 KiB) Downloaded 34 times
philip

Axbax
Posts: 9
Joined: 2017-02-04 11:55:59

Re: how move items up / down a list?

Post by Axbax » 2018-04-06 10:02:39

This works very well. Thanks! But could you (or someone else) perhaps make one that moves up as well? (I tried, but I am not experienced with coding).

User avatar
phspaelti
Posts: 911
Joined: 2007-02-07 00:58:12
Location: Japan

Re: how move items up / down a list?

Post by phspaelti » 2018-04-06 18:48:15

I improved the logic of the macro. So now I'm able to provide both a "Move Up" and a "Move Down". As before the macros only apply to one list item (along with all its child items) at a time. I considered the possibility of moving multiple items at once. But the problem is that there is too much potential for the user to make "bad" selections (e.g. having a selection start in one list and cross over non-list text and end in another list), and then having to resolve all such limit cases is more work than I am prepared to invest in this problem at this time. So while the macro preserves the whole selection, it only considers the list item at the starting point of the selection. Best usage is to place the cursor in/on the list item you want to move.

If the selection is in the last item of a (sub-)list "Move Down" will silently terminate and do nothing. And vice versa for "Move Up".
Attachments
List macros.zip
(7.47 KiB) Downloaded 29 times
philip

Axbax
Posts: 9
Joined: 2017-02-04 11:55:59

Re: how move items up / down a list?

Post by Axbax » 2018-04-07 06:59:40

You are a star! This works like a charm and will be so helpful for my writing. Thanks!!

If you (or someone else out there) could make a similar macro to move table rows up and down, I'd be very thankful.

User avatar
phspaelti
Posts: 911
Joined: 2007-02-07 00:58:12
Location: Japan

Re: how move items up / down a list?

Post by phspaelti » 2018-04-07 19:08:46

Moving table rows is a much easier problem. This macro will work for multiple selected rows too.
Attachments
Table macros.zip
(5.8 KiB) Downloaded 28 times
philip

Post Reply