LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194

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: 4,862
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
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
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
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
Member
 
Registered: May 2014
Distribution: OpenBSD
Posts: 67

Rep: Reputation: 36
"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



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

LinuxQuestions.org > Forums > Other *NIX Forums > AIX

All times are GMT -5. The time now is 01:21 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration