E pur si muove

Schizophrenic thoughts

Thursday, February 15, 2007

On one hand I use tab-completion on the command line all the time. I even go as far as creating my own -terribly incomplete- completion functions in bash for commands that I use often

On the other hand, when programming I don't use tab-completion -maybe mostly because it's not so easy to get in my preferred editor. But in this case my mind is going to argue that if you need tab completion to know your variables you're screwed anyway and should redesign. Although, somewhere my mind seems to acknowledge that tab-completion for an API would be useful. Indeed, I always have an ipython session nearby to play with the API and read docstrings.

Maybe I should take the time once to sort out my emacs so it can do all of that too.


Thursday, February 15, 2007 | Labels: |


Doug Napoleone said...

If you need tab completion to know your commands, your screwed anyway, and should go learn a new OS (kidding, kidding).

Tab completion is for more than just variable names, and if I see code with variable names which are all no larger than 3 characters, I want to scream. (Note: The standard JavaCamelCaseVariableNamseWhichGoOnForEverInterface also drive me nuts.)

The point is not to rely on tab completion, but like anything else, use it to increase your productivity and reduce the occruance of typo's.

Bruno said...

I also use Emacs' dabbrev expand to great results, ending up writing only 3 ou 4 letters of each word and then expanding it until it finds the correct match. Emacs matches it word by word, but i've found it works quite well.

But the default mapping is too much of a mess for it to be regularly usefull, so the following stanza binds it to a more user friendly mapping (in my case, Ctrl+Enter)

(define-key global-map [(control return)] 'dabbrev-expand)

Hope you (or someone else) finds this useful :)

New comments are not allowed.

Subscribe to: Post Comments (Atom)