LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices

Reply
 
Search this Thread
Old 09-17-2014, 12:31 AM   #16
astrogeek
Senior Member
 
Registered: Oct 2008
Distribution: Slackware: 12.1, 13.1, 14.1, 64-14.1, -current, FreeBSD-10
Posts: 1,953

Rep: Reputation: 727Reputation: 727Reputation: 727Reputation: 727Reputation: 727Reputation: 727Reputation: 727

Quote:
Originally Posted by maitree@123 View Post
No . I mean when I open a file in vi editor then I want to search a word in the entire file and that word should be hightlighted.
Of course you can do that in Vi(m)...

Code:
vi filename
:set hlsearch (probably on by default, but just in case)
/word-to-find [ENTER]
All occurances will be hilighted and cursor will be on the first one after initial cursor position.

To move cursor to next occurance...

Code:
/ [ENTER]

...or to previous one...

? [ENTER]
Why is that hard?
 
Old 09-17-2014, 03:03 AM   #17
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 1,810

Rep: Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501
Tested in AIX 6.1, result:
Code:
ex: 0602-093 hlsearch is not a recognized option.
Use set all to see all options.
 
1 members found this post helpful.
Old 09-17-2014, 12:39 PM   #18
astrogeek
Senior Member
 
Registered: Oct 2008
Distribution: Slackware: 12.1, 13.1, 14.1, 64-14.1, -current, FreeBSD-10
Posts: 1,953

Rep: Reputation: 727Reputation: 727Reputation: 727Reputation: 727Reputation: 727Reputation: 727Reputation: 727
Quote:
Originally Posted by NevemTeve View Post
Tested in AIX 6.1, result:
Code:
ex: 0602-093 hlsearch is not a recognized option.
Use set all to see all options.
Ah! Wasn't sure about hlsearch option itself, but I am sure that the search works the same, and searched terms are hilighted in every vi I have used in past so I would not expect AIX vi to be different. (Can you please verify/refute this on your AIX?)

I had the impression that the OP did not know how to search ("/") more so than not getting hilighted results... maybe wrong.

I also noted that the question 3 months old and the OP has not been back, so we may be talking among ourselves!

Last edited by astrogeek; 09-17-2014 at 12:58 PM.
 
Old 09-21-2014, 10:18 PM   #19
dunne
LQ Newbie
 
Registered: May 2014
Distribution: slackware
Posts: 7

Rep: Reputation: 3
"searched terms are hilighted in every vi I have used in past so I would not expect AIX vi to be different."

Sorry, but this is just bollocks. I suspect your experience with vi is in fact experience with vim, which is a "vi-LIKE" editor. The poster asked a specific question about vi; if you don't know the answer, that's fine; but don't post wrong information!
 
  


Reply

Tags
highlight


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing white spaces between words and joining the words in a given format Priyabio Linux - General 4 08-20-2009 07:42 AM
Search number of words in vi editor at a time sohail0399 Linux - Newbie 5 10-10-2008 03:02 PM
counting the words in vi editor. dina3e Linux - Software 6 07-16-2008 10:09 PM
How to highlight text in vi editor Gins Linux - General 17 07-25-2006 04:15 AM
Search and Replace: Asian Words to English Words ieeestd802 Linux - Software 0 10-27-2004 07:48 PM


All times are GMT -5. The time now is 03:12 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration