On Jul 8, 7:37 am, TheLonelyStar <[email protected]> wrote:
> Is there some way I can reindent the current line (in C/C++ code) with some
> vim function?

Do you really need a function? Can you just use the = operator
instead?

To indent the current line (from normal mode): ==
To indent the current line (from a script): normal ==

> Can I somehow check if the reindention changed something?
>

" untested...
let prevline = getline('.')
normal ==
if getline('.') !=# prevline
  " line changed because of reindent, do what you will
endif
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to