LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   vim:how to change code style. (https://www.linuxquestions.org/questions/linux-newbie-8/vim-how-to-change-code-style-870262/)

e3399 03-22-2011 11:37 AM

vim:how to change code style.
 
if(flag)
{
a = 1;
}
if(flag)
{

}
I want to change the code style the way below:

if(flag){
a = 1;
}
How can I do this with the help of powerful vim.
Any help will be appreciated.

druuna 03-22-2011 12:04 PM

Hi,

Which "code" are you talking about? Could this be perl?

Here's one that does perl: perltidy and A Brief Perltidy Tutorial

BTW: This is not a native vim solution, but as explained in the brief tutorial, it can be used from within vim.

Hope this helps.


All times are GMT -5. The time now is 06:58 PM.