New submission from Kirk McDonald <kirklin.mcdon...@gmail.com>: According to PEP 7, older C source files are indented with tabs, and newer ones are indented with spaces. The vimrc file in the repository assumes that existing C source files should be indented with tabs, and it should indent with spaces when you create a new C source file. This has an obvious drawback: It will configure vim to use tabs when you edit a file that in fact uses spaces.
The attached patch will search for the regex '^\t'; if it is found, vim will be configured to use tabs and an 8-column shiftwidth; and if it is not found, it will be configured to use spaces and a 4-column shiftwidth. ---------- components: Demos and Tools files: vimrc.diff keywords: patch messages: 84602 nosy: KirkMcDonald severity: normal status: open title: Auto-detect indentation in C source in vimrc versions: Python 2.7 Added file: http://bugs.python.org/file13477/vimrc.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5611> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com