This document discusses features that a programmer's text editor should have, including syntax highlighting, indentation support, and programmability. It provides tips for setting up an editor, such as configuring shortcuts for common tasks, automatically formatting code on save, and enabling real-time syntax checking. Advanced features like auto-completion and browsing documentation from within the editor are also mentioned but noted as difficult to implement perfectly. The document encourages sharing one's editor configuration online and taking questions from the audience.
17. Syntax highlighting
• If nothing else, this helps catch stupid typos
faster
• Can also sometimes obscure the code -- you
may want to be able to easily toggle it on
and off
18. Syntax highlighting
• If nothing else, this helps catch stupid typos
faster
• Can also sometimes obscure the code -- you
may want to be able to easily toggle it on
and off
• Not to the angry fruit salad level
19. Syntax highlighting
• If nothing else, this helps catch stupid typos
faster
• Can also sometimes obscure the code -- you
may want to be able to easily toggle it on
and off
• Not to the angry fruit salad level
• Just something that distinguishes keywords
from variables from function names
24. Programable
• Doesn’t need to be Turing complete or
anything crazy
• (Although you may be missing out if it isn’t.)
25. Programable
• Doesn’t need to be Turing complete or
anything crazy
• (Although you may be missing out if it isn’t.)
• If you can send a selection to an external
program and replace the selection with the
output, you’re probably set
28. The generic advice
• Pay some attention to what you’re doing
• Set things up so stuff you do most often can be
done most easily
29. The generic advice
• Pay some attention to what you’re doing
• Set things up so stuff you do most often can be
done most easily
• E.g., saving a file, closing a file, defining and running
macros, etc. etc.
30. The generic advice
• Pay some attention to what you’re doing
• Set things up so stuff you do most often can be
done most easily
• E.g., saving a file, closing a file, defining and running
macros, etc. etc.
• The F keys are not there just so you can skip tracks
in your MP3 player
31. The generic advice
• Pay some attention to what you’re doing
• Set things up so stuff you do most often can be
done most easily
• E.g., saving a file, closing a file, defining and running
macros, etc. etc.
• The F keys are not there just so you can skip tracks
in your MP3 player
• Keep your config in git so you can revert it when
you screw it up
39. Commit messages
• Set up $GIT_EDITOR so you can write
commit messages in your editor of choice
40. Commit messages
• Set up $GIT_EDITOR so you can write
commit messages in your editor of choice
• emacsclient is particularly nice here:
41. Commit messages
• Set up $GIT_EDITOR so you can write
commit messages in your editor of choice
• emacsclient is particularly nice here:
export GIT_EDITOR=‘emacsclient -t’
44. Code Tidying
• Same idea as “make executable on save”
• When you save a file, before the write, run
perltidy, and save the output of that instead
45. Code Tidying
• Same idea as “make executable on save”
• When you save a file, before the write, run
perltidy, and save the output of that instead
• If you don’t want to do that, do the world a
favor and set up your editor to delete trailing
whitespace when you save a file.
46. Code Tidying
• Same idea as “make executable on save”
• When you save a file, before the write, run
perltidy, and save the output of that instead
• If you don’t want to do that, do the world a
favor and set up your editor to delete trailing
whitespace when you save a file.
• Please.