You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Be sure to create a symlink named 'vim-for-humans' in the project directory. This symlink should point to a directory where you've cloned [code examples](https://github.com/vjousse/vim-for-humans).
6
6
@@ -11,6 +11,17 @@ You will need some prerequisites to be able to compile the LaTeX source code:
11
11
-[Sphinx](http://sphinx-doc.org/) to generate the epub file.
12
12
-[kindlegen](http://www.amazon.com/gp/feature.html?docId=1000765211) to generate the .mobi file.
13
13
14
-
##Compiling
14
+
### Gentoo
15
15
16
-
If you've installed everything, running the `makedist.sh` script should do the trick. If not, be sure to check the content of the script and to run each command one after another.
16
+
* dev-python/sphinx[latex]
17
+
* dev-python/pygments
18
+
* app-text/texlive
19
+
* kindlegen package not available.
20
+
21
+
## Compile
22
+
23
+
After the dependencies have been installed, create the dist directory via `mkdir dist` then run `makedist.sh` script to start compiling. The compilation fails be sure to check the content of the script and try running each command one after another.
24
+
25
+
## Enjoy
26
+
27
+
Upon success outputs can be found in the `dist/vimpourleshumains/` directory. Enjoy!
Copy file name to clipboardExpand all lines: rst/en/plugins.rst
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,7 @@ Once the modification made and taken into account by |vim| (by restarting |vim|
76
76
77
77
.. _lusty:
78
78
79
-
.. image:: ../book-tex/graphics/vim-lusty.png
79
+
.. image:: ../../book-tex/graphics/vim-lusty.png
80
80
81
81
The next thing to do is to deactivate *The Nerd Tree* by commenting the corresponding line like I have done on the screenshot above. It will not be useful anymore as *Lusty Explorer* is a better replacement when using the keyboard.
82
82
@@ -86,7 +86,7 @@ You can see on the `lusty`_ screenshot that *Lusty Explorer* is made of two part
Here are some commands available inside this window:
149
149
@@ -204,7 +204,7 @@ Now we need to add the shortcut to our |vimrc| to invoke CtrlP like in the listi
204
204
205
205
Here is CtrlP in action.
206
206
207
-
.. image:: ../book-tex/graphics/vim-ctrlp.png
207
+
.. image:: ../../book-tex/graphics/vim-ctrlp.png
208
208
209
209
Launch it with ``,c`` and then type the name of the file you want to search. When the searched file will be selected first, you will just have to press |ttenter| to open it.
Copy file name to clipboardExpand all lines: rst/en/text-manip.rst
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ To copy/past using |vim|, you will have to switch to the "normal" mode (the defa
40
40
41
41
.. _mode insert:
42
42
43
-
.. image:: ../book-tex/graphics/vim-insert.png
43
+
.. image:: ../../book-tex/graphics/vim-insert.png
44
44
45
45
46
46
When there is nothing displayed at the bottom left, it's because you are currently in "normal" mode. In order to quit a mode to return to the normal one, you just have to press |ttesc|. You may already have noticed that pressing |ttesc| is a pain for your fingers. No worries, it's just a temporary thing, I will explain why in the ":ref:`secesc`" section.
@@ -49,15 +49,15 @@ Let's say that you are currently in the "normal" mode and that you already have
49
49
50
50
.. _twain:
51
51
52
-
.. image:: ../book-tex/graphics/vim-twain.png
52
+
.. image:: ../../book-tex/graphics/vim-twain.png
53
53
54
54
The most intuitive way (but not the most efficient, we will see why a little bit later) to copy/paste the "impossible" word is to move the cursor at the first letter of the word using the directional keys, to press |ttv| (to switch to the "visual" mode), to move to the last letter of the word (you should have the word "impossible" highlighted) and then to press |tty| (|tty| stands for *yank*). You've just copied your first word using |vim|. Hooray!
55
55
56
56
Then, move to the end of the sentence (in "normal" mode) and press |ttp| (|ttp| standing for *paste*). The word should now be pasted at the end, and you should have something like the figure below.
57
57
58
58
.. _vim-paste:
59
59
60
-
.. image:: ../book-tex/graphics/vim-paste.png
60
+
.. image:: ../../book-tex/graphics/vim-paste.png
61
61
62
62
We can see that |vim| uses the mode switching trick (including the "normal" mode for moving) in order to not have to use the mouse.
63
63
When you will be used to switch quickly from one mode to another (and in order to do so, going without |ttesc| will be mandatory), using the mouse will appear like a pure waste of time. But obviously, you will first need to train yourself.
@@ -84,7 +84,7 @@ When in normal mode, 4 keys will allow you to move your cursor:
84
84
85
85
.. _hjkl:
86
86
87
-
.. image:: ../book-tex/graphics/hjkl.png
87
+
.. image:: ../../book-tex/graphics/hjkl.png
88
88
89
89
As you can notice, those keys are located on the home row so that you don't have to move your hands. Your index has two moves (left and bottom) while your auricular doesn't have any. You will see that it's not a problem, it's even a feature: your index is stronger than your auricular. By checking the keyboard that was used to develop *Vi* in the ":ref:`secesc`" section, you will understand why.
90
90
@@ -139,7 +139,7 @@ Here is an handy graphical cheat sheet that you can download on http://www.viemu
Keep in mind that the main goal here is to increase your speed while keeping your hands on the "home row" and using the "normal mode". Get down to work!
145
145
@@ -154,7 +154,7 @@ To understand why |ttesc| is used by default to exit the "insert mode", we have
So we agree that we need another key to exit the insert mode. There are many solutions, here are some possibilities that you can try in your |vimrc|: ::
160
160
@@ -316,6 +316,6 @@ To awaken the child in you, I urge you to go have fun with http://vim-adventures
If your are using |vim| along with a graphical interface (I suppose it's the case for 99% of you) you will by default have a ``File`` menu available. This menu should allow you to open a file. It's, for sure, a good start. But having a file explorer a la Netbeans or Textmate can be very handy. To mimic the same behavior, we will be using `The NERD Tree <http://www.vim.org/scripts/script.php?script_id=1658>`_. Be aware that, once you will have read this guide, you will not need the mouse anymore.
@@ -38,15 +38,15 @@ The first thing to do will certainly be to install a |vim| version for your oper
38
38
39
39
When you will start |vim|, you should see a welcome text asking you to help poor children in Uganda (or something along the lines).
This text will disappear as soon as we will be writing text in |vim|.
44
44
45
45
We will start by adding a comment in the header of the file to specify the author of the document (should be you). To be able to type text, the first thing to do will be to press |tti| (the cursor should have changed). The welcome text should have disappeared and you should have `a blank page`_ looking like the image below:
46
46
47
47
.. _a blank page:
48
48
49
-
.. image:: ../book-tex/graphics/en/vim-new.png
49
+
.. image:: ../../book-tex/graphics/en/vim-new.png
50
50
51
51
**On a side note**: if you don't really understand what you have done and |vim| is displaying red messages at the bottom left or doesn't seem to react as it should when you press |tti|, don't panic. Pressing multiples times on |ttesc| (two times should be enough) should bring |vim| to its default mode, the *Normal mode*. Then it should behave as you would expect again.
52
52
@@ -60,7 +60,7 @@ You should know be able to write down `the comment below`_:
60
60
61
61
You will have noticed that comments in *VimL* (the name of the |vim| programing language) start with a :viml:`"`. Then press |ttesc| to come back to the default mode (the normal mode) of |vim|. That's all, you are done. Here is a screenshot of what your |vim| should look like now:
I can already hear you: all that fuss for that? Well, yes. And you even don't know how to save a file. But all these things are logical that I'm gonna explain to you. One of the advantages of |vim| is that, usually, it is logical. Once you will have understood the logic behind it, all will be crystal clear for you (at least I hope so).
66
66
@@ -83,7 +83,7 @@ So what do you have the right to do? Not a lot to be honest (but it's for your o
@@ -163,7 +163,7 @@ Themes will allow you to have a nicer |vim| than the default one. A theme will c
163
163
164
164
To install it, you will first need to create a directory called `.vim` in the same directory than your |vimrc| (that is to say, in your home directory). Note that when using Windows, the `.vim` directory is called `vimfiles`. Each time I'll be speaking of the `.vim` directory, it will be the `vimfiles` directory for people using Windows. In this `.vim` directory, create a sub directory named `colors`. Then, download the *Solarized* theme file https://raw.github.com/altercation/vim-colors-solarized/master/colors/solarized.vim (it's the same file for the light and the dark version) and copy it in your `vim/colors/` directory. You `.vim` directory should look like the picture below.
@@ -222,7 +222,7 @@ The main problem with this approach is that the plugins are not isolated. So you
222
222
223
223
That's why *Pathogen* is especially useful, it will allow each plugin to be located in a separate directory. Here is an example of a |.vim| directory before and after the usage of *Pathogen*:
@@ -308,7 +308,7 @@ I have to admit that this command is a little bit obscure. Actually it means: ev
308
308
309
309
Nothing special then, *The NERD Tree* will display the tree of the directory where you've launched |vim| as you can see on the picture below. You can use your mouse and/or your keyboard to move inside *The NERD Tree*.
0 commit comments