Author Topic: Optimizing keystroke efficiency for Add New File  (Read 5625 times)

Offline jonas thomas

  • Multiple posting newcomer
  • *
  • Posts: 18
Optimizing keystroke efficiency for Add New File
« on: January 11, 2009, 04:31:30 pm »
I'm a bit of a newb, so I imagine this functionality exists but I just don't know how to enable it.
I've been really enjoying the ease of use of code::blocks but I would like to see code::blocks do the following:
Problem Statement:
Minimize Overall Keystrokes to add a Add New File

Say for example I wish to add the following C++ files to the project
filename.h
filename.cpp

Current minimum keystrokes to add file
Keystrokes: {Shift-Ctrl-N}
Keystrokes: {Enter} (Accept Yes for add File to project)
Keystrokes: filename.h {Enter} ("Untitled##" is highlighted(Nice) so it is easily overwritten)
Keystrokes: {Alt-A Enter} (Accept All Debug Release)
Keystrokes:  do your thing and enter code

Now time to add filename.cpp
Keystrokes: {Shift-Ctrl-N}
Keystrokes: {Enter} (Accept Yes for add File to project)
Keystrokes: f{Tab} (This now puts in filename.cpp
Keystrokes: {Backspace}{Backspace}.cpp (This is the source of the in-efficiency)

Basically, I've been copying   zetcode wxtutorial posted on the web to code::blocks.  I've been doing this repetitive key stroke and each time it do it, it breaks my rhythm because I keep thinking how there should be a more efficient way to do this.

I would think that the tab behavior should be something like this.
f{Tab}
// Some is either adding a matching file name to the project.//
Copy everything up to the .
Is the auto populate project flag on?
Auto populate with the appropriate file extension.  In this case
filename.cpp

Does functionality like this exist? If so, how does one enable it?
If not, could this post be moved to development.

Thanks
JT
















« Last Edit: January 11, 2009, 04:41:12 pm by jonas thomas »

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Optimizing keystroke efficiency for Add New File
« Reply #1 on: January 12, 2009, 10:50:02 am »
Kill the annoying wizards, is what I've been saying for ages.  8)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Optimizing keystroke efficiency for Add New File
« Reply #2 on: January 12, 2009, 12:07:43 pm »
Kill the annoying wizards, is what I've been saying for ages.  8)
If you read carefully what he wants has nothing to do with wizards. He wants to add existing files to a project. This is not wizard based.

Long live the wizards! :lol:
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Optimizing keystroke efficiency for Add New File
« Reply #3 on: January 12, 2009, 07:57:02 pm »
No, no... I did read carefully. What he wants is something like "Press Ctrl-N, enter name, get a new, empty file", without having to click a million things and going through 27,000 questions.

I'd even optimize that to skip the "do you want to add it to the project?" question, so the filename is all you have to type in.  99% of the time, it is rather useless to ask whether to add the file to the project.
Either, you have no project at all, then obviously you can't do it anyway. Or, you are working on a project, then you most probably want the file to be added.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline rhf

  • Multiple posting newcomer
  • *
  • Posts: 123
Re: Optimizing keystroke efficiency for Add New File
« Reply #4 on: January 12, 2009, 09:41:52 pm »
Patch 2162 by olipfei, which I have been using for months, is a very nice similar feature.
Drag a file into the Management pane and it is opened by the editor. The patch provides a context menu option to add it to the project.This is a very nice feature that I hope will be added to the trunk.

Offline jonas thomas

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: Optimizing keystroke efficiency for Add New File
« Reply #5 on: January 13, 2009, 01:09:36 am »
No, no... I did read carefully. What he wants is something like "Press Ctrl-N, enter name, get a new, empty file", without having to click a million things and going through 27,000 questions.

I'd even optimize that to skip the "do you want to add it to the project?" question, so the filename is all you have to type in.  99% of the time, it is rather useless to ask whether to add the file to the project.
Either, you have no project at all, then obviously you can't do it anyway. Or, you are working on a project, then you most probably want the file to be added.
Fewer keystrokes are always nice, although I suppose some out there may need that fine level of control.
I just think that if a have a filename.h in my project and a I type f{tab]) ( assuming that no other files being with f) and filename.cpp doesn't exist) it should know that I meant filename.cpp or at the very least not filename.h again.
« Last Edit: January 13, 2009, 01:29:30 am by jonas thomas »