Skip to content

Commit b893e5e

Browse files
committed
working on vim page. making vimrc example better
1 parent d3b8817 commit b893e5e

File tree

4 files changed

+103
-25
lines changed

4 files changed

+103
-25
lines changed

all.html

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -604,20 +604,33 @@ <h2>Configuring Vim with a Vimrc file</h2>
604604
<p>The Vimrc file is used to configure the Vim editor. A Vimrc file can range
605605
from nothing in it to very complicated with hundreds or thousands of lines
606606
of configuration commands.</p>
607-
<p>Here's a simple example .vimrc file I use for Python development to get a feel
608-
for some of the configuration statements:</p>
609-
<div class="codehilite"><pre><span class="cp"># enable syntax highlighting</span>
610-
<span class="n">syntax</span> <span class="n">on</span>
607+
<p>Here's a short, commented example .vimrc file I use for Python development
608+
to get a feel for some of the configuration statements:</p>
609+
<div class="codehilite"><pre><span class="s">&quot; enable syntax highlighting</span>
610+
<span class="n">syntax</span> <span class="n">enable</span>
611611

612-
<span class="cp"># the next 4 lines set tabs to have 4 spaces, autoindent when already</span>
613-
<span class="cp"># working with indented lines, expand tabs key presses to spaces and</span>
614-
<span class="cp"># move lines 4 spaces each time the &gt;&gt; or &lt;&lt; commands are used</span>
612+
<span class="s">&quot; show line numbers</span>
613+
<span class="n">set</span> <span class="n">number</span>
614+
615+
<span class="s">&quot; set tabs to have 4 spaces</span>
615616
<span class="n">set</span> <span class="n">ts</span><span class="o">=</span><span class="mi">4</span>
617+
618+
<span class="s">&quot; indent when moving to the next line while writing code</span>
616619
<span class="n">set</span> <span class="n">autoindent</span>
620+
621+
<span class="s">&quot; expand tabs into spaces</span>
617622
<span class="n">set</span> <span class="n">expandtab</span>
623+
624+
<span class="s">&quot; when using the &gt;&gt; or &lt;&lt; commands, shift lines by 4 spaces</span>
618625
<span class="n">set</span> <span class="n">shiftwidth</span><span class="o">=</span><span class="mi">4</span>
619626

620-
<span class="cp"># enable all Python syntax highlighting features</span>
627+
<span class="s">&quot; show a visual line under the cursor&#39;s current line </span>
628+
<span class="n">set</span> <span class="n">cursorline</span>
629+
630+
<span class="s">&quot; show the matching part of the pair for [] {} and ()</span>
631+
<span class="n">set</span> <span class="n">showmatch</span>
632+
633+
<span class="s">&quot; enable all Python syntax highlighting features</span>
621634
<span class="n">let</span> <span class="n">python_highlight_all</span> <span class="o">=</span> <span class="mi">1</span>
622635
</pre></div>
623636

@@ -695,6 +708,20 @@ <h2>Vimrc resources</h2>
695708
and explains many Python-specific .vimrc options.</p>
696709
</li>
697710
</ul>
711+
<h2>Vim Plugin resources</h2>
712+
<ul>
713+
<li>
714+
<p><a href="http://joelhooks.com/blog/2013/04/23/5-essential-vim-plugins/">5 Essential VIM Plugins That Greatly Increase my Productivity</a>
715+
covers the author's experience with the Vundle, NERDTree, ctrlp, Syntastic
716+
and EasyMotion Vim plugins.</p>
717+
</li>
718+
<li>
719+
<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>
720+
provides a list of plugins with a description for each one on its
721+
usefulness. The comments at the bottom are also interesting as people have
722+
suggested alternatives to some of the plugins mentioned in the post.</p>
723+
</li>
724+
</ul>
698725
<h3>What do you want to learn about Python development?</h3>
699726
<h1>Emacs</h1>
700727
<p>Emacs is an extensible text editor that can be customized by writing Lisp

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-03-20T12:51:39Z</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-03-21T11:46:29Z</updated></feed>

source/content/pages/02-learning-programming/05-vim.markdown

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,34 @@ The Vimrc file is used to configure the Vim editor. A Vimrc file can range
4848
from nothing in it to very complicated with hundreds or thousands of lines
4949
of configuration commands.
5050

51-
Here's a simple example .vimrc file I use for Python development to get a feel
52-
for some of the configuration statements:
51+
Here's a short, commented example .vimrc file I use for Python development
52+
to get a feel for some of the configuration statements:
5353

54-
# enable syntax highlighting
55-
syntax on
54+
" enable syntax highlighting
55+
syntax enable
5656

57-
# the next 4 lines set tabs to have 4 spaces, autoindent when already
58-
# working with indented lines, expand tabs key presses to spaces and
59-
# move lines 4 spaces each time the >> or << commands are used
57+
" show line numbers
58+
set number
59+
60+
" set tabs to have 4 spaces
6061
set ts=4
62+
63+
" indent when moving to the next line while writing code
6164
set autoindent
65+
66+
" expand tabs into spaces
6267
set expandtab
68+
69+
" when using the >> or << commands, shift lines by 4 spaces
6370
set shiftwidth=4
6471

65-
# enable all Python syntax highlighting features
72+
" show a visual line under the cursor's current line
73+
set cursorline
74+
75+
" show the matching part of the pair for [] {} and ()
76+
set showmatch
77+
78+
" enable all Python syntax highlighting features
6679
let python_highlight_all = 1
6780

6881

@@ -128,4 +141,15 @@ program.
128141
and explains many Python-specific .vimrc options.
129142

130143

144+
## Vim Plugin resources
145+
* [5 Essential VIM Plugins That Greatly Increase my Productivity](http://joelhooks.com/blog/2013/04/23/5-essential-vim-plugins/)
146+
covers the author's experience with the Vundle, NERDTree, ctrlp, Syntastic
147+
and EasyMotion Vim plugins.
148+
149+
* [Getting more from Vim with plugins](http://benmccormick.org/2014/07/21/learning-vim-in-2014-getting-more-from-vim-with-plugins/)
150+
provides a list of plugins with a description for each one on its
151+
usefulness. The comments at the bottom are also interesting as people have
152+
suggested alternatives to some of the plugins mentioned in the post.
153+
154+
131155
### What do you want to learn about Python development?

vim.html

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,33 @@ <h2>Configuring Vim with a Vimrc file</h2>
6363
<p>The Vimrc file is used to configure the Vim editor. A Vimrc file can range
6464
from nothing in it to very complicated with hundreds or thousands of lines
6565
of configuration commands.</p>
66-
<p>Here's a simple example .vimrc file I use for Python development to get a feel
67-
for some of the configuration statements:</p>
68-
<div class="codehilite"><pre><span class="cp"># enable syntax highlighting</span>
69-
<span class="n">syntax</span> <span class="n">on</span>
66+
<p>Here's a short, commented example .vimrc file I use for Python development
67+
to get a feel for some of the configuration statements:</p>
68+
<div class="codehilite"><pre><span class="s">&quot; enable syntax highlighting</span>
69+
<span class="n">syntax</span> <span class="n">enable</span>
7070

71-
<span class="cp"># the next 4 lines set tabs to have 4 spaces, autoindent when already</span>
72-
<span class="cp"># working with indented lines, expand tabs key presses to spaces and</span>
73-
<span class="cp"># move lines 4 spaces each time the &gt;&gt; or &lt;&lt; commands are used</span>
71+
<span class="s">&quot; show line numbers</span>
72+
<span class="n">set</span> <span class="n">number</span>
73+
74+
<span class="s">&quot; set tabs to have 4 spaces</span>
7475
<span class="n">set</span> <span class="n">ts</span><span class="o">=</span><span class="mi">4</span>
76+
77+
<span class="s">&quot; indent when moving to the next line while writing code</span>
7578
<span class="n">set</span> <span class="n">autoindent</span>
79+
80+
<span class="s">&quot; expand tabs into spaces</span>
7681
<span class="n">set</span> <span class="n">expandtab</span>
82+
83+
<span class="s">&quot; when using the &gt;&gt; or &lt;&lt; commands, shift lines by 4 spaces</span>
7784
<span class="n">set</span> <span class="n">shiftwidth</span><span class="o">=</span><span class="mi">4</span>
7885

79-
<span class="cp"># enable all Python syntax highlighting features</span>
86+
<span class="s">&quot; show a visual line under the cursor&#39;s current line </span>
87+
<span class="n">set</span> <span class="n">cursorline</span>
88+
89+
<span class="s">&quot; show the matching part of the pair for [] {} and ()</span>
90+
<span class="n">set</span> <span class="n">showmatch</span>
91+
92+
<span class="s">&quot; enable all Python syntax highlighting features</span>
8093
<span class="n">let</span> <span class="n">python_highlight_all</span> <span class="o">=</span> <span class="mi">1</span>
8194
</pre></div>
8295

@@ -154,6 +167,20 @@ <h2>Vimrc resources</h2>
154167
and explains many Python-specific .vimrc options.</p>
155168
</li>
156169
</ul>
170+
<h2>Vim Plugin resources</h2>
171+
<ul>
172+
<li>
173+
<p><a href="http://joelhooks.com/blog/2013/04/23/5-essential-vim-plugins/">5 Essential VIM Plugins That Greatly Increase my Productivity</a>
174+
covers the author's experience with the Vundle, NERDTree, ctrlp, Syntastic
175+
and EasyMotion Vim plugins.</p>
176+
</li>
177+
<li>
178+
<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>
179+
provides a list of plugins with a description for each one on its
180+
usefulness. The comments at the bottom are also interesting as people have
181+
suggested alternatives to some of the plugins mentioned in the post.</p>
182+
</li>
183+
</ul>
157184
<h3>What do you want to learn about Python development?</h3>
158185
<div class="row">
159186
<div class="col-md-4">

0 commit comments

Comments
 (0)