Vim settings for Python (was: tab replace to space 4)
Peter J. Holzer
hjp-python at hjp.at
Sat Dec 7 05:16:26 EST 2019
On 2019-11-29 13:46:38 +0900, 황병희 wrote:
> usally i write python code in gnu emacs on ubuntu 18.04 sometimes i
> re-edit the code vim in same machine so often when i do run the code in
> shell like as ./test.py i meet consol error -- which line wrong!
>
> so i am considering how can i replace all tab to space 4 within python
As an aside, to prevent vim from inserting tabs in the first place, set
expandtab
sw=4
and maybe also
ts=4
(The latter is very much a matter of taste. I don't unless I have to
edit code which already contains tabs intended to be at a certain width.)
hp
--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | hjp at hjp.at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20191207/dd151ba7/attachment.sig>
More information about the Python-list
mailing list