Comment puis-je personnaliser l’indentation d’un fichier avec vim ?
-
23-08-2019 - |
Question
J'ai lu récemment Cet article lié à l'indentation des fichiers source dans Vim.Cependant, j'aimerais pouvoir personnaliser certains d'entre eux.Existe-t-il un moyen de spécifier quel binaire s'exécute lorsque j'appuie sur = ?
La solution
De l'aide:
={motion} Filter {motion} lines through the external program given with the 'equalprg' option. When the 'equalprg' option is empty (this is the default), use the internal formatting function |C-indenting|. But when 'indentexpr' is not empty, it will be used instead |indent-expression|.
Cela ressemble à définir le equalprg
l'option est ce que vous voulez.
Autres conseils
Vous pouvez définir le equalprg
-option.(voir :he = pour en savoir plus).
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow