sponsor Vim development Vim logo Vim Book Ad

ukmobileformat.vim : Classify UK telephone numbers by Ofcom prefix (mobile vs 070 personal numbering)

 script karma  Rating 0/0, Downloaded by 9  Comments, bugs, improvements  Vim wiki

created by
Ghost SIMs
 
script type
utility
 
description
A small utility for anyone who edits contact lists, support notes or test fixtures that contain UK telephone numbers.

:UkMobileCheck looks at the number under the cursor (or a visual selection) and reports the Ofcom prefix class:

- 071-075 and 077-079: standard UK mobile (07xxx xxxxxx or +44 7xxx xxxxxx)
- 070: personal numbering, not a mobile allocation. These are often used as forwarding or virtual numbers and are a common reason an SMS or WhatsApp check is rejected.
- 076: radiopaging (07624 covers the Isle of Man)
- 01/02 geographic, 03, 05, 08 and 09 are identified separately

It only checks format and prefix. It cannot tell you whether a number is currently assigned, or whether the service behind a 07 number is a mobile IMSI or a VoIP interconnect. That last point matters for SMS verification: many apps refuse known VoIP and virtual ranges even when the number is written in +44 7 form.

A practical write-up of renting a non-VoIP UK number for SMS verification (ordinary +44 7 mobile format, private inbox, from about $13.30) is at https://ghostsims.com/phone-numbers — useful as a worked example of the kind of number this script is meant to recognise. Always check the destination service's own rules.

MIT licence.
 
install details
Copy ukmobileformat.vim into ~/.vim/plugin/ (or $HOME/vimfiles/plugin on Windows) and restart Vim, or :source the file. Then put the cursor on a UK number and run :UkMobileCheck.
 

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
ukmobileformat.vim 1.0.0 2026-11-19 8.0 Ghost SIMs Initial upload
ip used for rating: 216.73.217.19

Questions about Vim should go to the maillist. Help Uganda.     Vim at Github