Hi Tony, On this one I get the error: "E486: pattern not found: \p\.\s\+zs\l " Why is that?
Rgds, Jeri On Mon, Apr 14, 2014 at 11:53 AM, Tony Mechelynck < [email protected]> wrote: > On 14/04/14 10:58, Jeri Raye wrote: > >> Hi, >> >> I have an SRT file that have dialog sentences that sometimes ends halve >> way with a dot. >> And then a next sensentence starts. >> This text doesn't start then with a uppercase character, but with a >> lower case letter. >> >> For example: >> I want to tell you this. and also this. >> >> How to change this into: >> I want to tell you this. And also this. >> >> >> It's basicly search for "<one or more character and spaces ending with >> chars>. <lower char>" >> I played with getline and toupper() in an function call, but got lost. >> >> >> >> Rgds, >> Jeri >> >> > What about (untested) > > :[range]s/\p\.\s\+\zs\l/\u\0/g > > : this is an Ex-command > [range] see :help [range], e.g. fromline,toline > s substitute, see :help :s > / what to find starts here, see :help pattern-overview > \p printable character > \. period > \s whitespace > \+ the preceding atom may occur 1 or more times > \zs start replacing here > \l lowercase letter > / what to replace by starts here, see :help > sub-replace-special > \u make the next character uppercase > \0 the original replace-from string > / end of replace-by part, start of flags, see :help :s_flags > g any number of times (not only one) per line > > > Best regards, > Tony. > -- > grep me no patterns and I'll tell you no lines. > > -- > -- > You received this message from the "vim_use" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- You received this message because you are subscribed to the Google > Groups "vim_use" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
