Hi,

I have enable auto indentation ON.
When I write the following code in Perl, things get indented correctly.

if (a == b) {
  i++; # <---- This line is indented correct.
}
p = 10; # <---- This line also is indented correct.

But, if the whole state is in one line like this, the indentation is wrong.

if (a == b) {   i++; }
  p = 10; # <---- This line is NOT indented correct.

I have similar issues with other languages, where I use begin-end.

Can someone help me?

Regards
ANil

-----------
Jai Ho!


On Wed, Mar 25, 2009 at 1:43 AM, Christian Brabandt <cbli...@256bit.org>wrote:

>
> On Wed, March 25, 2009 3:12 am, andy richer wrote:
> > How can I let vim treat    metacharacters as ordinary characters?   so I
> > can
> > //a/b/c/d/e/f     to search /a/b/c/d/e/f   ?
>
> This is not possible for simple search "/", as the slash is used as
> delimiter. This is probably due to historical reasons. I think Posix
> demands that / acts as a delimiter for forward-search in vi.
>
> All other metacharacters (except \) can be treated as ordinary
> characters by the use of \V (see :help /\V). So the pragmatic solution
> would be to search using backward search (?) followed by N (for next
> search in reverse direction) together with a pattern that starts with \V
> You still would have to escape the backslash, though.
>
> You could also define a command to take care of the escaping, e.g.:
> :com! -nargs=1 Search :let @/='\V'.escape(<q-args>, '\/')| normal! n
>
> so you can literally search using Search a/b/c/d or even Search a\b\c\d
> and also Search a.b.c
>
>
> regards,
> Christian
> --
> :wq!
>
>
> >
>

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

Reply via email to