SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Wizard
    Join Date
    Jun 2005
    Posts
    1,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Searching for particular syntax codes ?

    If you're looking for a particular syntax in external css sheets, and you've got loads of css files and 100's of lines of syntax in each one, how do you do a search, where it takes you directly to that particular syntax please ?

    Any help appreciated.

    Dez.

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That depends on what operating system you're using and what software. I'd do
    Code:
    grep -n 'phrase' *.css
    vi +<NNN> <filename>.css
    (where '<NNN>' is the line number shown by the first command and <filename> is the name of the file).
    Birnam wood is come to Dunsinane

  3. #3
    SitePoint Wizard
    Join Date
    Jun 2005
    Posts
    1,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Tommy - I'm on win xp pro, but would that code just tka eyou to the file, or straight to the actual code ?

    For css, I usually use topstylelite, but there's no find or find/replace - what styles editor do the others here use ?

  4. #4
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dez View Post
    Thanks Tommy - I'm on win xp pro, but would that code just tka eyou to the file, or straight to the actual code ?
    The first command finds the file and line number where the search phrases is.
    The second command opens the editor (vi) and sets the cursor on the specified line of code.

    It only works in Unix/Linux/BSD systems, of course.
    Birnam wood is come to Dunsinane

  5. #5
    SitePoint Guru Luki_be's Avatar
    Join Date
    Jun 2008
    Location
    Brazil, Minas Gerais. But i'm from Belgium.
    Posts
    867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dez View Post
    Thanks Tommy - I'm on win xp pro, but would that code just tka eyou to the file, or straight to the actual code ?

    For css, I usually use topstylelite, but there's no find or find/replace - what styles editor do the others here use ?
    I use TopStyle pro. But are you sure the lite version doesn't have a search function????
    SitePoint Guru
    Sitepoint - the ultimate Css well
    As a computer, I find your faith in technology amusing.
    Sitepoint reference, your friend in need

  6. #6
    SitePoint Wizard
    Join Date
    Jun 2005
    Posts
    1,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    The first command finds the file and line number where the search phrases is.
    The second command opens the editor (vi) and sets the cursor on the specified line of code.

    It only works in Unix/Linux/BSD systems, of course.
    Thanks Tommy, but only have windows.

  7. #7
    SitePoint Wizard
    Join Date
    Jun 2005
    Posts
    1,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Luki_be View Post
    I use TopStyle pro. But are you sure the lite version doesn't have a search function????
    Thanks Luki, but on looking through the lite version, it doesn't have that !


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •