Wednesday, 18 November 2009

Eclipse regexp Find/Replace error "Incompatible line delimiter near index"

Eclipse Find/Replace error:  "Incompatible line delimiter near index"
Searching for: " - %i,*" replace with "0\\\n"

Because you have dos line ending in file, eclipse will be happier with this:
Searching for: " - %i,*" replace with "0\\\r\n"

Or better make sure everything is dos2unix converted if touched by something which converts it the other way. In eclipse you can select File -> Convert line delimiters to ...

WARNING: Don't mess with file encoding unless you know what you'er doing!
In eclipse these other settings are relevant:
 Right-click on Project -> Properties
    Resource -> Text File Encoding
      Might be best to leave this (Inherited from container Cp1252 for windows)

    Resource -> New Text File Line Delimiter
      Change to "unix"
 Windows -> Preferences
    General -> Editors -> Text Editors
      Select "Insert spaces for tabs"
    General -> Content types -> Text -> Tcl Content Type
Set default enccoding (leave it alone is probably best policy!)

1 comment:

sergey81 said...

Thanks! it helped!