Since all the other answers so far show how to do this, various programming languages, and you noted a question with Vim, here's how to do it in Vim:
:%s/\.\(\s\+\|$\)/.\r\r/g
I used two carriage returns according to the output format you indicated in the question. There are several alternative forms of regular expressions that you can use:
" Using a look-behind
:%s/\.\@<=\( \|$\)/\r\r/g
" Using 'very magic' to reduce the number of backslashes
:%s/\v\.( |$)/.\r\r/g
" Slightly different formation: this will also break if there
" are no spaces after the full-stop (period).
:%s/\.\s*$\?/.\r\r/g
and possibly many others.
A non-regexp way to do this:
:let s = getline('.')
:let lineparts = split(s, '\.\@<=\s*')
:call append('.', lineparts)
:delete
Cm:
:help pattern.txt
:help change.txt
:help \@<=
:help :substitute
:help getline()
:help append()
:help split()
:help :d
source
share