views:

321

answers:

1

I wasn't quite sure if this would go on SU or here, but I figured people here were more likely to have an answer.

Everyone knows the 80 character column rule, right? I'd like to be able to follow this, but I use Dreamweaver, and until this point I have not been able to find a way to turn on a display for the current column in the text I am on.

Does anyone know where this might be found?

EDIT: An alternative answer to this question would be an alternative program that has as nice of an explorer module of Dreamweaver. (I don't like Eclipse or Notepad++'s explorer windows.)

+1  A: 

I assume that by the 80 character column rule that you mean that you lines of code shouldn't be longer than 80 characters. If so, I've not seen a built-in way to display what column you own.

At first I thought that Edit(Dreamweaver on Mac) -> Preferences -> Code Format: Automatic Wrapping and After Column set to the appropriate amount would get you what you were looking for by forcing the code to wrap at the line length you wanted to "max out" at. I tried on Mac in Dreamweaver CS3 and CS4 and in neither was I able to get the code to wrap when the line of code was longer than the setting in After column. I found out that the Automaic Wrapping only occurs when you're working in Design View, and as I was testing in Code View, I never saw this so called "automatic wrapping" occurring. I tried again with and without Word Wrap enabled (View -> Code View Options -> Word Wrap). I was only able to get the code to wrap when Word Wrap is enabled and the window is narrower than the line of code is wide.

So, with Word Wrap turned on, I think that you could create a line of code with 80 characters in it, then make the document editing widow narrow enough to just show all of the characters without wrapping. That will then wrap your code at 80 characters to let you know when you've topped out.

However, that's pretty unappealing. FWIW: I use Dreamweaver and Eclipse all the time together, so maybe if you really need the columns, you could set Eclipse as the external editor (Edit -> Preferences -> File types / Editors) and set the external code editor. Once that is set, you can go to Edit -> Edit with Eclipse (or whatever your editor is). You can also use a key board shortcut if you set it up via Edit (Dreamweaver on Mac) -> Keyboard shortcuts. If you haven't already modified the keyboard shortcuts, you need to create a new copy of the current set. This drill down into Edit -> Launch External Editor.

Also while ago I built a Dreamweaver extension: CMX Current Column. It's a commercial extension ($5). For full disclosure I created the extension, but don't get a cut of any sales of it any more as I'm no longer with CommunityMX. It only adds a single field that displays the current column the cursor is in, so it's likely not worth the $5 for most people.

Danilo Celic
Thanks for the answer. I tried the same thing with the same results. I may use Eclipse as an external editor.
John