head-icon

Make use of Vim

vim-fuego

Make use of Vim


Make use of Vim

Carlos Sosa
gnusosa@gnusosa.net

Index


bonsai

Index


monje

Index


zen2

Index


img/iching.png

OH HAI!

Me

Vim is mah editor.
I can't work without Vim (sadly). KTHX. BAI


Work

Escritorio

Life is suffering.


I < Graphs

grafica

PAYS RENT
SUPER BORING COMPARED TO A WEB APP.


I < Graphs

grafica

PAYS RENT
SUPER BORING COMPARED TO A WEB APP.

Introduction


vim-screenshot

What is Vim?

Introduction


vim-screen

Vim is not:


BUT...

You can make use of Vim like the latter.

Vim Script enables developers to create plugins.
But don't abuse plugins, make use of what really is essential.

Introduction


BramMoo-vim

History

Introduction


Billjoy-vi

History


Vim ne Vi

ne eq "not equal"
eq === "equal"

Introduction


How do you use it?

Philosophy


KISS.

Philosophy


Programmer Virtues.

Philosophy


Programmer Virtues.

Philosophy


Programmer Virtues

Philosophy


Don't type, edit

The Zen of Vim


Control your energy.

The Zen of Vim


Don't waste your energy moving.

The Zen of Vim


Don't waste your energy moving.

fx forward - Moves the cursor to the next character defined by x
tx Moves the cursor to the next character after x
Fx Inverse action of fx.
w Moves the cursor to the first word infront of it.
b Inverse action of w.
0 Moves the cursor to the beginning of the current line.
^ Moves the cursor to the first character of the current line.
$ Moves the cursor to the last character of the current line.

The Zen of Vim


Don't run through the valley, jump it.

) Moves the cursor to the next sentence.
( Inverse action of ).
<C-F> Moves the cursor through a whole window block.
<C-B> Inverse action of C-F.
gg Moves the cursor to the beginning of the file.
G Moves the cursor to the end of the file.
numG Moves the cursor to the line num.

The Zen of Vim


Don't run through the valley, jump it.

H Moves the cursor to the top of the window.
M Moves the cursor to the half of the window.
L Inverse action of H.
* Selects the word under cursor, and seeks forward for the next occurrence.
# Inverse action of *.
/palabra Seeks the word after '/', and moves the cursor.
?palabra Inverse action of '/'.

The Zen of Vim


Don't run through the valley, jump it.

ma Creates a Mark in current position
`a Moves the cursor to the mark 'a' in the file.
`. Go to the last modification made.

The Zen of Vim

Recycle, Reduce, Reuse

v Selection per character.
V Selection per lines.
<C-V> Underlines blocks of characters.
d{acción} delete. Erase(cuts) the text, and sends it to the clipboard.
dd Erase(cut) the entire line under the cursor, and sends it to the clipboard.
y yank. (Copy). Similar action as d, but this only sends to the clipboard.
c cut. Similar action as d, but this ones activates insert mode.
p paste. Paste what is in current clipboard.

The Zen of Vim


Only record the essential.

i Enters Insert Mode.
I Enters Insert Mode, and places the cursor at the beginning of the current line.
a Inverse action of i.
A Inverse action of I.
o Creates a new line below current position of the cursor,
and enters Insert mode.
O Inverse action of o.

The Zen of Vim


The one that repeats itself, loses

qkeyword Starts recording of a macro under the name keyword.
q Ends the recording of the macro.
@registro Activates the macro keyword.
. Dot. Repeats the last action made.

The Zen of Vim


Beauty is essence.

]p Pre-formats the text that will be paste.
% If the cursor is placed at {,[,(, seeks for the related closing cursor.
>> Formats a block of text.
<< Inverse action of <<.

Siete hábitos para editar
texto efectivamente.


Move around quickly


Don't type it twice

Three simple steps:

Seven habits of effective text editing.

Don't type it twice

Seven habits of effective text editing.

Fix it when it's wrong

Seven habits of effective text editing

A file seldom comes alone.

Seven habits of effective text editing

Unity makes strength

Seven habits of effective text editing

Text is structured

Seven habits of effective text editing

Make it a habit (sharpen the saw)

More than practice, mastery comes from analyzing your actions. Every time you take the time to analyze and study your moves, you can slowly grow to a zero point.

Every IDE, text editor has its learning curve, ride it.

Like in any other Zen practice and philosophy, you have to think first, and then act.


Making use of Vim

Thanks for your time.
Don't use Emacs.
No, I kid ^_^! use whatever you want.
But please, please don't use nano, Por favor.

Carlos Ivan Sosa

gnusosa

github

log.gnusosa.net