Author Topic: Duplicate line and other wishings  (Read 5278 times)

Offline Radek

  • Multiple posting newcomer
  • *
  • Posts: 104
Duplicate line and other wishings
« on: December 30, 2009, 10:26:20 pm »
Here are my small wishings related to CodeBlocks. I haven't found some general "wishlist", if it exist, excuse me.

(1) Duplicate line: The behaviour should be duplicate line AND move cursor one line down. Usually, it's the duplicated line which is about to be modified. Currently, the line is duplicated but the cursor remains on the first line.
(2) Allow line blocks: The code consists of lines, not of "paragraphs". Line blocks look better than the "stream" blocks in a code. Unessential.
(3) Allow "virtual space" behind the end of line. If something is typed in the "virtual space", the line gets blanked to the cursor column and then the typed text is added. Virtual space can, among others, eliminate cursor jerks when you move cursor up or down and pass shorter lines. Virtual space makes formatting the code simpler.

A small bug, most likely in duplicate line:
When I start writing code, fill the editor area, and then I duplicate the last line, the vertical scrollbar will not occur. It will occur after adding 2 or 3 new lines. In the meantime, I can scroll the window by moving cursor up and down.
Once the scrollbar occurs, no more problems. This can be survived easily, but ...  :mrgreen:

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Duplicate line and other wishings
« Reply #1 on: December 30, 2009, 11:12:46 pm »
(1) it's a matter of taste, if I duplicate a line, I sometimes modify the first and sometimes the second line

(2) I do not understand, sorry

(3) the virtual space will come, if we merge the new scintilla test-branch into trunk.

If I duplicate the last (or any other line), the vertical scrollbar occurs if more then one line is (partly) hiddden, this is most likely a scintilla bug.
I hope I find the time to look into it.

Offline Radek

  • Multiple posting newcomer
  • *
  • Posts: 104
Re: Duplicate line and other wishings
« Reply #2 on: December 31, 2009, 08:14:32 pm »
(1) Yes, it is. What about adding "duplicate and cursor down" as an alternative? Users can choose what suits them best. They can choose both if they want to :)
(2) I have meant blocks which extends over complete lines, not only to the end of the line. If you paste such block, it inserts below the cursor line instead of inserting at the cursor position.

Line blocks can be "emulated" easily. Well the block will be a "stream block" and you must make sure that you have started the block at the first column of the first line of the block and that you have ended the block at the last char of the last line of the block. Then insert a blank line and paste the block. Line blocks aren't vital but, IMO, they are more natural to a code than stream blocks - which are more natural to an ordinary text.

Some special actions which can be made with a line block:

- move the contents of the block one column left/right
- comment out the block (insert '//' at the beginning of each line)
- uncomment the block (delete '//' from the beginning of each line starting with '//')

Speaking the keyboard interface for the editor, here are some more suggestions for the "Edit - line" section :)

- delete to the end of line
- move cursor to the end of line
- move cursor to the first nonblank char of the line
- move cursor to the beginning of the line