vim c-formating unformated text
Is there a vim editor command that whould take
highlighted (but unformatted ) c code and format it, inserting indents and line feeds the documentation I looked at seems to be able to set it up to do that on input but how about existing text. |
5 seconds on google ...
http://www.vim.org/htmldoc/indent.html http://www.vim.org/tips/tip.php?tip_id=83 Cheers, Tink |
re vim indent
No, I saw those before I posted, they just didn't do what I was asking. This is what I am wondering about
1. hilighted existing unformated text a. no line feeds b. no indentation ( tabs or spaces ) c. block of text hilighted in visual mode 2. an editor directive ':somthing' that will reformat the highlighted block of text c indentqation style. somthing like- Code:
#include <stdio.h> #include <stdlib.h> int main(){ printf(" %s \n","hello World"); return 0; } |
All times are GMT -5. The time now is 02:09 AM. |