The project that I'm currently on demands that I write alot of SQL. The architect for the project chose a naming standard that includes putting the "_" character between words in a variable, column, or table name. For example "Amount Type" would become "amt_type".
Under normal conditions, Emacs treats "_" as a non-word consituent character. This means that when you move forward a word over "amt_type" you would have to execute forward-word twice. This is a pain when there are ALOT of words that have the "_" as part of the word.
So, an easy hack for this project is to make "_" a word constituent character. You can do this by evaluating:
(modify-syntax-entry ?_ "w" sql-mode-syntax-table)
This can be in your .emacs file or you can simply evaluate it in the *scratch* buffer (or run ESC-:). From that point on, you can forward-word over the entire variable named "trans_amt_in_your_face_forward_word".
10:06:01 AM
|