sponsor Vim development Vim logo Vim Book Ad

ISBN-10 to EAN-13 converter : Convert ISBNs to EAN-13s

 script karma  Rating 7/3, Downloaded by 585  Comments, bugs, improvements  Vim wiki

created by
Brandon Waskiewicz
 
script type
utility
 
description
Allows conversions between ISBN-10 >> 978 prefix EAN-13s, and 978 prefix EAN-13s >> ISBN-10

There are three methods of converting ISBNs and EANs:

:ReplaceLineIsbnEan
    If the entirety of the current line is a valid ISBN-10, replaces it with the converted 978 prefix
    EAN-13
:ReplaceLineEanIsbn
    If the entirety of the current line is a valid EAN-13 with a 978 prefix, replaces it with the
    converted ISBN-10

:ReplaceSelectedIsbnEan
    If the selected text is a valid ISBN-10, replaces that text with the converted 978 prefix EAN-13
:ReplaceSelectedEanIsbn
    If the selected text is a valid EAN-13 with a 978 prefix, replaces it with the converted ISBN-10

:ReplaceAllIsbnEan
    Searches for any 10 digit number, of 9 digit number followed by x or X. For each match, if it is
    a valid ISBN-10, then it replaces that match with the converted 978 prefix EAN-13
:ReplaceAllEanIsbn
    Searches for any 13 digit number. For each match, if it is a valid 978 prefix EAN-13, then it
    replaces that match with the converted ISBN-10.
 
install details
Copy ean13.vim to your plugins directory.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
ean13.vim 0.95 2010-02-15 6.0 Brandon Waskiewicz Removed previous version.

Added several new functions.
Mapped basic user commands.
Added license.
Removed bug with replace-all that would skip valid match at beginning of buffer.
ip used for rating: 18.191.223.123

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github