Skip to content

Commit b55af5c

Browse files
author
Kenneth Reitz
committed
Merge pull request realpython#214 from pengkui/master
added some comments on .vimrc for vim beginners
2 parents cefa740 + 6493482 commit b55af5c

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

docs/dev/env.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@ the default settings for indentation and line-wrapping to values compliant with
1919
`PEP 8 <http://www.python.org/dev/peps/pep-0008/>`_. In your home directory,
2020
open a file called `.vimrc` and add the following lines:::
2121

22-
set textwidth=79
23-
set shiftwidth=4
24-
set tabstop=4
25-
set expandtab
26-
set softtabstop=4
27-
set shiftround
22+
set textwidth=79 " lines longer than 79 columns will be broken
23+
set shiftwidth=4 " operation >> indents 4 columns; << unindents 4 columns
24+
set tabstop=4 " an hard TAB displays as 4 columns
25+
set expandtab " insert spaces when hitting TABs
26+
set softtabstop=4 " insert/delete 4 spaces when hitting a TAB/BACKSPACE
27+
set shiftround " round indent to multiple of 'shiftwidth'
28+
set autoindent " align the new line indent with the previous line
2829

2930
With these settings, newlines are inserted after 79 characters and indentation
3031
is set to 4 spaces per tab. If you also use VIM for other languages, there is a

docs/starting/which-python.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ level of compatibility with Python packages and C extension modules.
5252

5353
If you are writing open-source Python code and want to reach the widest possible
5454
audience, targeting CPython is your best bet. If you need to use any packages
55-
that are rely on C extensions for their functionality (eg: numpy) then CPython
55+
that rely on C extensions for their functionality (eg: numpy) then CPython
5656
is your only choice.
5757

5858
Being the reference implementation, all versions of the Python language are

0 commit comments

Comments
 (0)