2009-02-16 9 views
5

मैंने हाल ही में विम में इंडेंटिंग स्रोत फ़ाइलों से संबंधित this article पढ़ा है। हालांकि, मैं उनमें से कुछ को कस्टम इंडेंट करने में सक्षम होना चाहता हूं। क्या यह निर्दिष्ट करने का कोई तरीका है कि जब मैं दबाता हूं तो कौन सा द्विआधारी चलता है?मैं कस्टम के साथ एक फ़ाइल इंडेंट कैसे कर सकता हूं?

उत्तर

7
मदद से

:

 
={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|. 

यह equalprg विकल्प सेट की तरह दिखता है तुम क्या चाहते है।

+0

अपने '.vimrc' में ऐसा कुछ जोड़ें:' au FileType sql set equalprg = pg_format' – bonh

3

आप equalprg -option सेट कर सकते हैं। (देखें: वह = अधिक के लिए)।

संबंधित मुद्दे

 संबंधित मुद्दे