Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linux Equiv.

Status
Not open for further replies.

theEclipse

Programmer
Dec 27, 1999
1,190
US
I am taking slow, but steady steps converting my computing life over to linux. Its fun -- I enjoy learning the new o/s.

I have been able to get ahold of the linux versions of most of what I am looking to do, but there are a few I am having trouble locating. Does anybody know of something that might satisfy my taste for these?:

* Ultraedit. Its a programmers text editor. VI is great. I am starting to get good with it, but I dont think that it has any column based editing. I dont even know if anybody else in the win market has column based editing.

* A stretch I know, but I am looking for decent video editing software. It doesnt have to be Final Cut, but something better than a windows media type would be nice.

Any suggestions?

Robert Carpenter
Remember....eternity is much longer than this ~80 years we will spend roaming this earth.
ô¿ô
 
Care to post a list of the programs you replaced and the Linux equivalents? Is there a web site somewhere that keeps an updated list?
 
I am a big fan of Kino for video editing. It's non-linear, but it does most of the things that I want. Helps me get good videos of family, etc. and make them great videos with good effects. Make sure to get the timfx packages as well. In a development environment, I actually prefer nano for command line based editor (vi is awkward and clunky, boo and hiss if you'd like), but if you want a GUI, Kate is what I use at work (because I'm forced to use SuSe and KDE. Not sure what you mean by column based, but I'm sure that it can't be all that hard to write yourself.
 
I've used UltraEdit before, before switching to Vim, and it is good.

The column-mode editing consists of being able to select a rectangular block or column of text and delete/copy it. I'm not sure how useful it is though; I don't think I ever used it.
 
If that's what you mean by column-mode editing, I'm pretty sure Vim can do that (your Vi is probably really Vim if your distro isn't from the stone age). Try the command [tt]Ctrl-v[/tt] to get into "Visual Block Mode." From there, you can use movement commands to select a rectangle, and use [tt]y[/tt] and [tt]d[/tt] and all your favorite Vim operators on that rectangle. Try the command [tt]:help visual[/tt] for more info.

Emacs can also do "column-mode editing" using so-called [tt]rectangle-*[/tt] commands. These usually begin with the command prefix [tt]Ctrl-x r[/tt]. Check out the Emacs manual for a section called "Rectangles" for more info.


In general, is a great place to find Linux software.
 
By the way, IFRs's suggestion might be a good idea for a new thread marked as a "helpful tip," or even an FAQ.
 
The biggest advantage of column based editing is not the block select, it is the ability to select several lines and type on them all at the same time. It is very usefull for setting up switch/case statements, ect where there are several lines in an row that have the same text for only part of the line. and example would be:

Code:
	$html = str_replace("\r\n","<br>",$txtBox);
	$html = str_replace("\n\r","<br>",$html);
	$html = str_replace("\n","<br>",$html);
	$html = str_replace("\r","<br>",$html);

You have to get into the habbit of thinking ahead of yourself in order to use it effectively, but that section of code would be easily written by first typing
Code:
	"\r\n","<br>",$txtBox);
	"\n\r","<br>",$html);  
	"\n","<br>",$html);    
	"\r","<br>",$html);
And then selecting a rectangle of zero width and height four at the begining of those lines and typing
[tt]$html = str_replace([/tt] on all the lines at the same time. To give you the full text.

It is also really useful for programming languages that dont have a block comment syntax (ie. perl)

Robert Carpenter
Remember....eternity is much longer than this ~80 years we will spend roaming this earth.
ô¿ô
 
I was able to do what you wanted in Emacs.

I wrote the text you started with:
Code:
    "\r\n","<br>",$txtBox);
    "\n\r","<br>",$html);  
    "\n","<br>",$html);    
    "\r","<br>",$html);

I then selected the area from the beginning of the first line to the beginning of the last line, defining the zero-width "rectangle":
Code:
    [COLOR=black red]"[/color]\r\n","<br>",$txtBox);
    "\n\r","<br>",$html);  
    "\n","<br>",$html);    
    [COLOR=black blue]"[/color]\r","<br>",$html);

I then ran the command [tt]C-x r t[/tt] ([tt]Ctrl-x[/tt], then [tt]r[/tt], then [tt]t[/tt]), which prompted me for the string I wanted to put on each line of the rectangle. I typed your replacement text, and hit [tt]ENTER[/tt]. I got the following:
Code:
    $html = str_replace("\r\n","<br>",$txtBox);
    $html = str_replace("\n\r","<br>",$html);  
    $html = str_replace("\n","<br>",$html);    
    $html = str_replace("\r","<br>",$html);


I'm sure similar facilities exist in Vim, or, if not, you can define them.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top