or...
/\%<c-r>=col('.')v\S
:h <c-r>
:h c_CTRL-R-=
--
Entered using opposable digits on my BlackBerry Bold
----- Original Message -----
From: [email protected] <[email protected]>
To: [email protected] <[email protected]>
Sent: Thu Mar 19 19:52:12 2009
Subject: Re: How do I go to the next non-blank character in the current column?
On 16/03/09 03:39, Nazri Ramliy wrote:
>
> On Mon, Mar 16, 2009 at 12:40 AM, jw232<[email protected]> wrote:
>>
>>
>> Going either up or down
>
> See :he /\%c
>
> e.g: /\%9c[^ ]
>
> searches for anything that is not a space in the 9th column
>
> nazri.
or
/\%9v\S
searches forward for anything in the 9th virtual column, except a space
or a tab. ("Virtual" column means each tab is counted for however many
columns it occupies, and that "wide" CJK characters are counted for two
columns each). (Use ? instead of / to search backward, of course.)
Then if you want only the "current" column, you can even use
:call search('\%' . col('.') . 'v\S')
to search down, or
:call search('\%' . col('.') . 'v\S', 'b')
to search up. Or map them to keys, using for instance
:map <F7> :call search('<Bslash>%' . col('.') . 'v<Bslash>S')<CR>
:map <S-F7> :call search('<Bslash>%' . col('.') . 'v<Bslash>S', 'b')<CR>
see
:help /\%v
:help search()
:help col()
Best regards,
Tony.
--
Basic, n.:
A programming language. Related to certain social diseases in
that those who have it will not admit it in polite company.
---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential
information, privileged material (including material protected by the
solicitor-client or other applicable privileges), or constitute non-public
information. Any use of this information by anyone other than the intended
recipient is prohibited. If you have received this transmission in error,
please immediately reply to the sender and delete this information from your
system. Use, dissemination, distribution, or reproduction of this transmission
by unintended recipients is not authorized and may be unlawful.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---