Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 Refactor: MoveLine up/down
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

RoSe
Junior Member

15 Posts

Posted - Mar 31 2008 :  09:15:56 AM  Show Profile  Reply with Quote
I'm not sure if the functionality already exists but I haven't found it: very often I have to resort lines e.g. a variable declaration, or I want to move a console output statement. Therefore I have to select a line, cut it, move the curser and then paste the content. A shorter way would be a refactoring method with a shortcut that moves a selected line/block up/down in the code line by line like Alt-Up/Down on a line in a list in powerpoint ...

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Mar 31 2008 :  6:04:40 PM  Show Profile  Reply with Quote
Have you tried VA Outline?

To show it, select Tools - VA Outline from the VAssist menu.
It lists variables, functions, and any other file-scope declarations.
Simply drag and drop to rearrange code.
It is highly addictive You can rearrange even larger scopes, for example classes, function implementations, etc.

This feature is explained here:
http://www.wholetomato.com/products/features/vaoutline.asp

Edited by - accord on Mar 31 2008 6:16:50 PM
Go to Top of Page

RoSe
Junior Member

15 Posts

Posted - Apr 01 2008 :  05:43:00 AM  Show Profile  Reply with Quote
Yes I did and I agree with you that it is useful for rearranging large scopes. But usually I try to avoid using the mouse while coding ... and then a shortcut on the active line / selected lines would be handy to just move small scopes up and down, e.g. resorting elseif or catch exception statements, resorting variables or fields, moving debug output statements up and down ...
An extension to the functionality I described above would be a function 'copy selected line and insert after/before' which copys the active content and inserts after/before the active content. Combined with the 'MoveLine up/down' functionality it makes the creation of code blocks with just a few differences very smart (only 2 less than 'Ctrl-C, Up/Down, Ctrl-V' but very addictive).
Imaging shortcuts for the moving like Shift-Alt-Up/Down for moving and Ctrl-Alt-Up/Down for copying the content.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18941 Posts

Posted - Apr 04 2008 :  09:37:25 AM  Show Profile  Reply with Quote
You can use VA outline with the keyboard. You can place keyboard focus into VA Outline via the VAssistX menu (VAssistX -> Tools -> VA Outline) or you can map a keyboard shortcut to the command VAssistX.VAOutline

I am not sure I follow what you are talking about, for copying code inside functions. This sounds like something you will just do by selecting, copy and pasting the code.

VA next and previous context moves you to the next outermost context, and then up and down a file one function at a time. It is not designed to move you up and down inside a single function one context at a time.

I am not sure how VA will really help here.

zen is the art of being at one with the two'ness
Go to Top of Page

RoSe
Junior Member

15 Posts

Posted - Apr 08 2008 :  03:03:29 AM  Show Profile  Reply with Quote
Well, sorry for my english ... not used to it. Forget about the copy thing, got used to it while using eclipse but it is not that important. On the other hand this tiny feature of moving the actual line or the actual selected block line by line up/down is very convenient. Behaviour would be the same as using the outline for moving large scopes just for a small scope and completely performed by the keyboard ...
Go to Top of Page

RoSe
Junior Member

15 Posts

Posted - Apr 08 2008 :  04:14:40 AM  Show Profile  Reply with Quote
Just read another suggestion in the forum with the same intention and the tip 'Line.Transpose' is exacly what I want for moving down. It would be nice to have the same in the upper direction and for whole selected blocks ...
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18941 Posts

Posted - Apr 08 2008 :  09:11:22 AM  Show Profile  Reply with Quote
If you want to move code by a fixed distance have you tried using an IDE macro?

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000