Re: [vim] prettify
- From: Gary Johnson <garyjohn@xxxxxxxxxx>
- Date: 26 Aug 2009 15:35:41 GMT
Martin Trautmann <t-use@xxxxxxx> wrote:
Hi all,
does vim include any prettify functions? The syntax highlighting does
know the key words. The bracket operation does know about begin and end
of levels.
Thus a prettify would be very nice which would fix a broken indention, a
mix of tabs and spaces etc.
Broken indentation can be fixed with the = command. See
:help =
:help 30.3
A mix of tabs and spaces can be changed to all spaces with
:set expandtab
:retab
If instead you execute these:
:set noexpandtab
:retab
vim will replace sequences of tabs and/or spaces at the start of lines with
the fewest tabs and spaces that will result in the same indentation.
See
:help expandtab
:help retab
However, vim has no built-in way to prettify code by moving elements
(e.g., braces) from one line to another.
--
Gary Johnson
.
- Prev by Date: Re: vim of multiple linked files doesn't show filenames correctly
- Next by Date: Re: vim of multiple linked files doesn't show filenames correctly
- Previous by thread: [vim] How to split stderr from stdout on filter command
- Index(es):
Relevant Pages
|