LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-13-2004, 03:24 AM   #1
blackzone
Member
 
Registered: Jun 2004
Posts: 256

Rep: Reputation: 30
vi question


when searching, we use "n" to find next string
But any short cut to find previous?

Also is it possbiel to search string disregaurding case sensitivity?
eg. want to search for a string but not sure if first character is upper or lower case.
 
Old 08-13-2004, 03:37 AM   #2
arobic
Member
 
Registered: Jul 2003
Location: Geneva, Switzerland
Distribution: Debian 3.1, SLC3 (based on RHEL)
Posts: 84

Rep: Reputation: 15
Hi!

So:
/string search forward
?string search backward
n repeat search forward
N repeat search backward
/ same as n
? same as N

I don't think it is possible to do a case insensitive search in vi, though I am not sure, but you can use grep -i "string" "filename" to get the same result.

I was wrong... just type ":set ignorecase" in command mode or put it in your .exrc (or .vimrc if your are using recent version of vim) file to ignore case in search.

Last edited by arobic; 08-13-2004 at 03:41 AM.
 
  


Reply



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
Question, Apples Contribution to Open Source + MacOs file structure question Higgy3k Other *NIX 5 07-25-2005 04:23 AM
Not your regular GRUB question - just a short question for a fried MBR!! ziphem Linux - General 3 01-31-2005 01:51 PM
2 part question: Speeding up MDK9.1/GNOME question wardialer Linux - Newbie 6 10-14-2004 03:16 PM
login prompt question & kde scheme question JustinCoyan Slackware 2 06-09-2004 02:02 PM
RE: Suse 8.0 hardware question {newbie question, pls help} Radiouk Linux - Distributions 2 06-04-2002 12:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:19 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