> >        :silent! normal! heb
>
> Won't work if the word is a single character.

Also won't work at the start of this text: "== blah".
The idea is to put the cursor at the start of the word that
expand("<cword>") would return.

This works quite well:

func! Sow()
    if (getline(".")[col(".") - 1] =~ '\k')
        normal wb
    else
        call search('\<', 'sW')
    endif
endfunc

Except that it may search onto the next line if there are no more words,
and won't find a non-word sequence at the end of the line if no words exist.

Rob.

--

Robert Webb <[EMAIL PROTECTED]>,
MineSweeper3D - Take Minesweeper to a whole new dimension!
http://www.software3d.com/Mines3D


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui