Skip to content

Commit c893c79

Browse files
committed
added vim tutorial, updated .gitignore
1 parent c15bd3a commit c893c79

File tree

5 files changed

+113
-104
lines changed

5 files changed

+113
-104
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ pip-log.txt
3434

3535
source/cache/
3636
venv
37+
env

all.html

Lines changed: 37 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -841,30 +841,30 @@ <h2>Development environment resources</h2>
841841
</ul>
842842
<h1>Vim</h1>
843843
<p>Vim, short for Vi IMproved, is a configurable text editor often used as
844-
a Python development environment. Vim proponents commonly cite the numerous
844+
a Python development environment. Vim proponents commonly cite the numerous
845845
plugins, Vimscript and logical command language as major Vim strengths.</p>
846846
<h2>Why is Vim a good Python development environment?</h2>
847-
<p>Vim's philosophy is that developers are more productive when they avoid
848-
taking their hands off the keyboard. Code should flow naturally from the
849-
developer's thoughts through the keyboard and onto the screen. Using a mouse
850-
or other peripheral is a detriment to the rate at which a developer's
847+
<p>Vim's philosophy is that developers are more productive when they avoid
848+
taking their hands off the keyboard. Code should flow naturally from the
849+
developer's thoughts through the keyboard and onto the screen. Using a mouse
850+
or other peripheral is a detriment to the rate at which a developer's
851851
thoughts become code.</p>
852-
<p>Vim has a logical, structured command language. When a beginner is learning
853-
the editor she may feel like it is impossible to understand all the key
854-
commands. However, the commands stack together in a logical way so that over
852+
<p>Vim has a logical, structured command language. When a beginner is learning
853+
the editor she may feel like it is impossible to understand all the key
854+
commands. However, the commands stack together in a logical way so that over
855855
time the editor becomes predictable.</p>
856856
<div class="well see-also">
857-
If you're interested in Vim you'll also want to read about
857+
If you're interested in Vim you'll also want to read about
858858
<a href="/development-environments.html">development environments for coding</a>
859-
and learn
859+
and learn
860860
<a href="/why-use-python.html">what makes Python a great programming language</a>.
861861
</div>
862862

863863
<h2>Configuring Vim with a Vimrc file</h2>
864864
<p>The Vimrc file is used to configure the Vim editor. A Vimrc file can range
865865
from nothing in it to very complicated with hundreds or thousands of lines
866866
of configuration commands.</p>
867-
<p>Here's a short, commented example .vimrc file I use for Python development
867+
<p>Here's a short, commented example .vimrc file I use for Python development
868868
to get a feel for some of the configuration statements:</p>
869869
<div class="highlight"><pre>&quot; enable syntax highlighting
870870
syntax enable
@@ -884,7 +884,7 @@ <h2>Configuring Vim with a Vimrc file</h2>
884884
&quot; when using the &gt;&gt; or &lt;&lt; commands, shift lines by 4 spaces
885885
set shiftwidth=4
886886

887-
&quot; show a visual line under the cursor&#39;s current line
887+
&quot; show a visual line under the cursor&#39;s current line
888888
set cursorline
889889

890890
&quot; show the matching part of the pair for [] {} and ()
@@ -895,18 +895,18 @@ <h2>Configuring Vim with a Vimrc file</h2>
895895
</pre></div>
896896

897897

898-
<p>Here is how these configuration options look with a dark background on
898+
<p>Here is how these configuration options look with a dark background on
899899
Mac OS X while editing the markdown for this webpage (how meta!).</p>
900900
<p><img src="theme/img/vim-dark-bg.jpg" width="100%" alt="Vim with basic configuration options on a dark background." class="technical-diagram" style="border-radius: 5px;"></p>
901901
<p>Take a look at another example using these configuration options, this time
902-
with a light background and editing Python code from my
902+
with a light background and editing Python code from my
903903
<a href="https://github.com/makaimc/choose-your-own-adventure-presentations">Choose Your Own Adventures Presentations</a>
904904
project.</p>
905905
<p><img src="theme/img/vim-white-bg.png" width="100%" alt="Vim with basic configuration options on a white background." class="technical-diagram" style="border-radius: 5px; border: 1px solid #999;"></p>
906906
<p>The Vimrc file lives under the home directory of the user account running
907907
Vim. For example, when my user account is 'matt', on Mac OS X my Vimrc
908908
file is found at <code>/Users/matt/.vimrc</code>. On Ubuntu Linux my .vimrc file
909-
can be found within the <code>/home/matt/</code> directory. </p>
909+
can be found within the <code>/home/matt/</code> directory.</p>
910910
<p>If a Vimrc file does not already exist, just create it within the user's
911911
home directory and it will be picked up by Vim the next time you open the
912912
editor.</p>
@@ -921,7 +921,7 @@ <h2>Vim tutorials</h2>
921921
<li>
922922
<p><a href="http://yannesposito.com/Scratch/en/blog/Learn-Vim-Progressively/">Learn Vim Progressively</a>
923923
is a wonderful tutorial that follows the path I took when learning Vim:
924-
learn just enough to survive with it as your day-to-day editor then begin
924+
learn just enough to survive with it as your day-to-day editor then begin
925925
adding more advanced commands on top.</p>
926926
</li>
927927
<li>
@@ -948,75 +948,78 @@ <h2>Vim tutorials</h2>
948948
</ul>
949949
<h2>Vimrc resources</h2>
950950
<p>These are a few resources for learning how to structure a <code>.vimrc</code> file. I
951-
recommend adding configuration options one at a time to test them
951+
recommend adding configuration options one at a time to test them
952952
individually instead of going whole hog with a Vimrc you are unfamiliar with.</p>
953953
<ul>
954954
<li>
955955
<p><a href="http://dougblack.io/words/a-good-vimrc.html">A Good Vimrc</a> is a fantastic,
956-
detailed overview and opinionated guide to configuring Vim. Highly
956+
detailed overview and opinionated guide to configuring Vim. Highly
957957
recommended for new and experienced Vim users.</p>
958958
</li>
959959
<li>
960960
<p><a href="https://justin.abrah.ms/vim/vim_and_python.html">Vim and Python</a> shows
961961
and explains many Python-specific .vimrc options.</p>
962962
</li>
963963
<li>
964-
<p>This
964+
<p>This
965965
<a href="https://github.com/amix/vimrc/tree/master/vimrcs">repository's folder with Vimrc files</a>
966-
has example configurations that are well commented and easy to learn from. </p>
966+
has example configurations that are well commented and easy to learn from.</p>
967967
</li>
968968
<li>
969969
<p>For people who are having trouble getting started with Vim, check out this
970-
blog post on the
970+
blog post on the
971971
<a href="http://adamdelong.com/two-simple-steps-helped-me-learn-vim/">two simple steps that helped this author learn Vim</a>.</p>
972972
</li>
973973
</ul>
974974
<h2>Vim installation guides</h2>
975-
<p>These installation guides will help you get Vim up and running on Mac OS X,
975+
<p>These installation guides will help you get Vim up and running on Mac OS X,
976976
Linux and Windows.</p>
977977
<ul>
978978
<li>
979979
<p><a href="http://prioritized.net/blog/upgrading-vim-on-os-x/">Upgrading Vim on OS X</a>
980-
explains why to upgrade from Vim 7.2 to 7.3+ and how to do it using
980+
explains why to upgrade from Vim 7.2 to 7.3+ and how to do it using
981981
<a href="http://brew.sh/">Homebrew</a>.</p>
982982
</li>
983983
<li>
984-
<p>The easiest way to install Vim on Windows 7+ is to download and run the
984+
<p>The easiest way to install Vim on Windows 7+ is to download and run the
985985
<a href="http://www.vim.org/download.php#pc">gvim74.exe</a> file.</p>
986986
</li>
987987
<li>
988-
<p>On Linux make sure to install the
988+
<p>On Linux make sure to install the
989989
<a href="https://launchpad.net/ubuntu/+source/vim">vim package</a> with
990990
<code>sudo apt-get install vim</code>.</p>
991991
</li>
992992
<li>
993-
<p>If you're using PyCharm as your IDE you won't need to install Vim as a
994-
separate text editor - instead use the
993+
<p>If you're using PyCharm as your IDE you won't need to install Vim as a
994+
separate text editor - instead use the
995995
<a href="https://plugins.jetbrains.com/plugin/164">IdeaVim</a> PyCharm plugin to get
996996
Vim keybindings, visual/insert mode, configuration with ~/.ideavimrc and
997-
other Vim emulation features. </p>
997+
other Vim emulation features.</p>
998998
</li>
999999
</ul>
10001000
<h2>Using Vim as a Python IDE</h2>
1001-
<p>Once you get comfortable with Vim as an editor, there are several
1002-
configuration options and plugins you can use to enhance your Python
1001+
<p>Once you get comfortable with Vim as an editor, there are several
1002+
configuration options and plugins you can use to enhance your Python
10031003
productivity. These are the resources and tutorials to read when you're
10041004
ready to take that step.</p>
10051005
<ul>
10061006
<li>
1007+
<p><a href="https://realpython.com/blog/python/vim-and-python-a-match-made-in-heaven/">VIM and Python - a Match Made in Heaven</a> details how to set up a powerful VIM environment geared towards wrangling Python day in and day out.</p>
1008+
</li>
1009+
<li>
10071010
<p>The <a href="https://github.com/klen/python-mode">python-mode</a> project is a Vim
10081011
plugin with syntax highlighting, breakpoints, PEP8 linting, code completion
10091012
and many other features you'd expect from an integrated development
10101013
environment.</p>
10111014
</li>
10121015
<li>
10131016
<p><a href="http://haridas.in/vim-as-your-ide.html">Vim as Your IDE</a> discusses how to
1014-
set up Vim for greater productivity once you learn the initial Vim language
1017+
set up Vim for greater productivity once you learn the initial Vim language
10151018
for using the editor.</p>
10161019
</li>
10171020
<li>
10181021
<p><a href="http://unlogic.co.uk/2013/02/08/vim-as-a-python-ide/">Vim as a Python IDE</a>
1019-
goes through the steps necessary to make Vim into a more comfortable
1022+
goes through the steps necessary to make Vim into a more comfortable
10201023
environment for Python development.</p>
10211024
</li>
10221025
<li>
@@ -1025,7 +1028,7 @@ <h2>Using Vim as a Python IDE</h2>
10251028
</li>
10261029
<li>
10271030
<p>If you're writing your documentation in Markdown using Vim, be sure to
1028-
read this
1031+
read this
10291032
<a href="http://www.swamphogg.com/2015/vim-setup/">insightful post on a Vim setup for Markdown</a>.</p>
10301033
</li>
10311034
</ul>
@@ -1053,7 +1056,7 @@ <h2>Vim Plugin resources</h2>
10531056
</li>
10541057
<li>
10551058
<p><a href="http://benmccormick.org/2014/07/21/learning-vim-in-2014-getting-more-from-vim-with-plugins/">Getting more from Vim with plugins</a>
1056-
provides a list of plugins with a description for each one on its
1059+
provides a list of plugins with a description for each one on its
10571060
usefulness. The comments at the bottom are also interesting as people have
10581061
suggested alternatives to some of the plugins mentioned in the post.</p>
10591062
</li>

feeds/all.atom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<feed xmlns="http://www.w3.org/2005/Atom"><title>Matt Makai</title><link href="http://www.fullstackpython.com/" rel="alternate"></link><link href="http://www.fullstackpython.com/feeds/all.atom.xml" rel="self"></link><id>http://www.fullstackpython.com/</id><updated>2015-10-27T08:08:45Z</updated></feed>
2+
<feed xmlns="http://www.w3.org/2005/Atom"><title>Matt Makai</title><link href="http://www.fullstackpython.com/" rel="alternate"></link><link href="http://www.fullstackpython.com/feeds/all.atom.xml" rel="self"></link><id>http://www.fullstackpython.com/</id><updated>2015-10-27T08:14:03Z</updated></feed>

source/content/pages/02-development-environments/02-vim.markdown

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,26 @@ meta: Vim is a text editor with powerful string manipulation capabilities. Learn
77

88
# Vim
99
Vim, short for Vi IMproved, is a configurable text editor often used as
10-
a Python development environment. Vim proponents commonly cite the numerous
10+
a Python development environment. Vim proponents commonly cite the numerous
1111
plugins, Vimscript and logical command language as major Vim strengths.
1212

1313

1414
## Why is Vim a good Python development environment?
15-
Vim's philosophy is that developers are more productive when they avoid
16-
taking their hands off the keyboard. Code should flow naturally from the
17-
developer's thoughts through the keyboard and onto the screen. Using a mouse
18-
or other peripheral is a detriment to the rate at which a developer's
15+
Vim's philosophy is that developers are more productive when they avoid
16+
taking their hands off the keyboard. Code should flow naturally from the
17+
developer's thoughts through the keyboard and onto the screen. Using a mouse
18+
or other peripheral is a detriment to the rate at which a developer's
1919
thoughts become code.
2020

21-
Vim has a logical, structured command language. When a beginner is learning
22-
the editor she may feel like it is impossible to understand all the key
23-
commands. However, the commands stack together in a logical way so that over
21+
Vim has a logical, structured command language. When a beginner is learning
22+
the editor she may feel like it is impossible to understand all the key
23+
commands. However, the commands stack together in a logical way so that over
2424
time the editor becomes predictable.
2525

2626
<div class="well see-also">
27-
If you're interested in Vim you'll also want to read about
27+
If you're interested in Vim you'll also want to read about
2828
<a href="/development-environments.html">development environments for coding</a>
29-
and learn
29+
and learn
3030
<a href="/why-use-python.html">what makes Python a great programming language</a>.
3131
</div>
3232

@@ -36,7 +36,7 @@ The Vimrc file is used to configure the Vim editor. A Vimrc file can range
3636
from nothing in it to very complicated with hundreds or thousands of lines
3737
of configuration commands.
3838

39-
Here's a short, commented example .vimrc file I use for Python development
39+
Here's a short, commented example .vimrc file I use for Python development
4040
to get a feel for some of the configuration statements:
4141

4242
" enable syntax highlighting
@@ -57,7 +57,7 @@ to get a feel for some of the configuration statements:
5757
" when using the >> or << commands, shift lines by 4 spaces
5858
set shiftwidth=4
5959

60-
" show a visual line under the cursor's current line
60+
" show a visual line under the cursor's current line
6161
set cursorline
6262

6363
" show the matching part of the pair for [] {} and ()
@@ -67,13 +67,13 @@ to get a feel for some of the configuration statements:
6767
let python_highlight_all = 1
6868

6969

70-
Here is how these configuration options look with a dark background on
70+
Here is how these configuration options look with a dark background on
7171
Mac OS X while editing the markdown for this webpage (how meta!).
7272

7373
<img src="theme/img/vim-dark-bg.jpg" width="100%" alt="Vim with basic configuration options on a dark background." class="technical-diagram" style="border-radius: 5px;">
7474

7575
Take a look at another example using these configuration options, this time
76-
with a light background and editing Python code from my
76+
with a light background and editing Python code from my
7777
[Choose Your Own Adventures Presentations](https://github.com/makaimc/choose-your-own-adventure-presentations)
7878
project.
7979

@@ -84,7 +84,7 @@ project.
8484
The Vimrc file lives under the home directory of the user account running
8585
Vim. For example, when my user account is 'matt', on Mac OS X my Vimrc
8686
file is found at ``/Users/matt/.vimrc``. On Ubuntu Linux my .vimrc file
87-
can be found within the ``/home/matt/`` directory.
87+
can be found within the ``/home/matt/`` directory.
8888

8989
If a Vimrc file does not already exist, just create it within the user's
9090
home directory and it will be picked up by Vim the next time you open the
@@ -100,7 +100,7 @@ to get started with these tutorials.
100100

101101
* [Learn Vim Progressively](http://yannesposito.com/Scratch/en/blog/Learn-Vim-Progressively/)
102102
is a wonderful tutorial that follows the path I took when learning Vim:
103-
learn just enough to survive with it as your day-to-day editor then begin
103+
learn just enough to survive with it as your day-to-day editor then begin
104104
adding more advanced commands on top.
105105

106106
* [A vim Tutorial and Primer](https://danielmiessler.com/study/vim/) is an
@@ -123,74 +123,76 @@ to get started with these tutorials.
123123

124124
## Vimrc resources
125125
These are a few resources for learning how to structure a `.vimrc` file. I
126-
recommend adding configuration options one at a time to test them
126+
recommend adding configuration options one at a time to test them
127127
individually instead of going whole hog with a Vimrc you are unfamiliar with.
128128

129129
* [A Good Vimrc](http://dougblack.io/words/a-good-vimrc.html) is a fantastic,
130-
detailed overview and opinionated guide to configuring Vim. Highly
130+
detailed overview and opinionated guide to configuring Vim. Highly
131131
recommended for new and experienced Vim users.
132132

133133
* [Vim and Python](https://justin.abrah.ms/vim/vim_and_python.html) shows
134134
and explains many Python-specific .vimrc options.
135135

136-
* This
136+
* This
137137
[repository's folder with Vimrc files](https://github.com/amix/vimrc/tree/master/vimrcs)
138-
has example configurations that are well commented and easy to learn from.
138+
has example configurations that are well commented and easy to learn from.
139139

140140
* For people who are having trouble getting started with Vim, check out this
141-
blog post on the
141+
blog post on the
142142
[two simple steps that helped this author learn Vim](http://adamdelong.com/two-simple-steps-helped-me-learn-vim/).
143143

144144
## Vim installation guides
145-
These installation guides will help you get Vim up and running on Mac OS X,
145+
These installation guides will help you get Vim up and running on Mac OS X,
146146
Linux and Windows.
147147

148148
* [Upgrading Vim on OS X](http://prioritized.net/blog/upgrading-vim-on-os-x/)
149-
explains why to upgrade from Vim 7.2 to 7.3+ and how to do it using
149+
explains why to upgrade from Vim 7.2 to 7.3+ and how to do it using
150150
[Homebrew](http://brew.sh/).
151151

152-
* The easiest way to install Vim on Windows 7+ is to download and run the
152+
* The easiest way to install Vim on Windows 7+ is to download and run the
153153
[gvim74.exe](http://www.vim.org/download.php#pc) file.
154154

155-
* On Linux make sure to install the
155+
* On Linux make sure to install the
156156
[vim package](https://launchpad.net/ubuntu/+source/vim) with
157157
``sudo apt-get install vim``.
158158

159-
* If you're using PyCharm as your IDE you won't need to install Vim as a
160-
separate text editor - instead use the
159+
* If you're using PyCharm as your IDE you won't need to install Vim as a
160+
separate text editor - instead use the
161161
[IdeaVim](https://plugins.jetbrains.com/plugin/164) PyCharm plugin to get
162162
Vim keybindings, visual/insert mode, configuration with ~/.ideavimrc and
163-
other Vim emulation features.
163+
other Vim emulation features.
164164

165165

166166
## Using Vim as a Python IDE
167-
Once you get comfortable with Vim as an editor, there are several
168-
configuration options and plugins you can use to enhance your Python
167+
Once you get comfortable with Vim as an editor, there are several
168+
configuration options and plugins you can use to enhance your Python
169169
productivity. These are the resources and tutorials to read when you're
170170
ready to take that step.
171171

172+
* [VIM and Python - a Match Made in Heaven](https://realpython.com/blog/python/vim-and-python-a-match-made-in-heaven/) details how to set up a powerful VIM environment geared towards wrangling Python day in and day out.
173+
172174
* The [python-mode](https://github.com/klen/python-mode) project is a Vim
173175
plugin with syntax highlighting, breakpoints, PEP8 linting, code completion
174176
and many other features you'd expect from an integrated development
175177
environment.
176178

177179
* [Vim as Your IDE](http://haridas.in/vim-as-your-ide.html) discusses how to
178-
set up Vim for greater productivity once you learn the initial Vim language
180+
set up Vim for greater productivity once you learn the initial Vim language
179181
for using the editor.
180182

181183
* [Vim as a Python IDE](http://unlogic.co.uk/2013/02/08/vim-as-a-python-ide/)
182-
goes through the steps necessary to make Vim into a more comfortable
184+
goes through the steps necessary to make Vim into a more comfortable
183185
environment for Python development.
184186

185187
* [Setting up Vim for Python](http://stackoverflow.com/questions/9172802/setting-up-vim-for-python)
186188
has a well written answer on Stack Overflow for getting started with Vim.
187189

188190
* If you're writing your documentation in Markdown using Vim, be sure to
189-
read this
191+
read this
190192
[insightful post on a Vim setup for Markdown](http://www.swamphogg.com/2015/vim-setup/).
191193

192194

193-
## Vim Plugin Managers
195+
## Vim Plugin Managers
194196
* [Vundle](https://github.com/gmarik/Vundle.vim) comes highly recommended
195197
as a plugin manager for Vim.
196198

@@ -207,7 +209,7 @@ ready to take that step.
207209
and EasyMotion Vim plugins.
208210

209211
* [Getting more from Vim with plugins](http://benmccormick.org/2014/07/21/learning-vim-in-2014-getting-more-from-vim-with-plugins/)
210-
provides a list of plugins with a description for each one on its
212+
provides a list of plugins with a description for each one on its
211213
usefulness. The comments at the bottom are also interesting as people have
212214
suggested alternatives to some of the plugins mentioned in the post.
213215

0 commit comments

Comments
 (0)