To replace ^M with a new line in vi, do the following.
:%s/^M/\r/g
where ^M is CTRL-V then CTRL-M
(The CTRL-V preface tells vi to use the next keystroke instead of taking it as a command.)
":set nowrap" to have no wrapping, ie. long lines will all be inside a single line. I was trying to remember this command for about 15 minutes just now.
-도시
Showing posts with label CS Tools Tip. Show all posts
Showing posts with label CS Tools Tip. Show all posts
Saturday, September 12, 2009
Tuesday, July 28, 2009
Visio Can't Resize UML State Shape???
I'm drawing a UML activity diagram and using activity state shape. Inside the state shape I have some text. When the text gets long, I would like to resize the shape so it looks better.
Well, I tried everything and I still couldn't find out how to resize a state shape in Visio.
After some googling, I finally found out that you have to use this trick --
1. Select the state shape.
2. Hit F2.
3. Edit the text to put new lines. Now you have multiple line in the state shape, which resizes the shape to look nicer.
Another note -- when you connect arrows between two states, the arrow is always a straight line. But in some cases you would want a "right-angle" line -- which is a line makes right angles at turns. So you right click on the line and you see in the options that a "right angle connector" is already selected. (I think this is a bug and may not be showing up in all visios). Anyways, what I do is select a "straight line connector". Then right click the line again to select "right angle connector". So an extra unnecessary step is required to make a line to be a right angle line.
-도시
Well, I tried everything and I still couldn't find out how to resize a state shape in Visio.
After some googling, I finally found out that you have to use this trick --
1. Select the state shape.
2. Hit F2.
3. Edit the text to put new lines. Now you have multiple line in the state shape, which resizes the shape to look nicer.
Another note -- when you connect arrows between two states, the arrow is always a straight line. But in some cases you would want a "right-angle" line -- which is a line makes right angles at turns. So you right click on the line and you see in the options that a "right angle connector" is already selected. (I think this is a bug and may not be showing up in all visios). Anyways, what I do is select a "straight line connector". Then right click the line again to select "right angle connector". So an extra unnecessary step is required to make a line to be a right angle line.
-도시