From 1213016d5e1d535237b28935ae1a859abb6bf307 Mon Sep 17 00:00:00 2001 From: Carlos Sosa Date: Thu, 19 Mar 2020 15:09:32 -0700 Subject: Add platicas and talks assets --- talks/workshop-vim-hackmeet/index.html | 807 +++++++++++++++++++++++++++++++++ 1 file changed, 807 insertions(+) create mode 100644 talks/workshop-vim-hackmeet/index.html (limited to 'talks/workshop-vim-hackmeet/index.html') diff --git a/talks/workshop-vim-hackmeet/index.html b/talks/workshop-vim-hackmeet/index.html new file mode 100644 index 0000000..b693e44 --- /dev/null +++ b/talks/workshop-vim-hackmeet/index.html @@ -0,0 +1,807 @@ + + + Make use of Vim + + + + + + + + +
+head-icon +

Make use of Vim

+
+
+vim-fuego +

Make use of Vim

+
+
+
+

Make use of Vim

+ +

Carlos Sosa
+gnusosa@gnusosa.net

+
+
+

Index

+
+
+
bonsai
+
    + +
  • Introduction +
      +
    • What is Vim?
    • +
    • Vim is not.
    • +
    • History.
    • +
    • Vim ne Vi
    • +
    • How do you use it? (How do you eat it?)
    • +
    • Modular = Modes
    • +
    +
  • +
+
+
+
+

Index

+
+
+
monje
+
    + +
  • Philosophy +
      +
    • KISS.
    • +
    • Programmer Virtues.
    • +
    • Edit, Don't type.
    • +
    • Seven habits of effective text editing.
    • +
    +
  • +
+
+
+
+

Index

+
+
+
zen2
+
    + +
  • The Zen of Vim +
      +
    • Control your energy. (Command line)
    • +
    • Don't waste your energy moving. (Command Mode)
    • +
    • Don't run through the valley, jump it. (Advance Command Mode)
    • +
    • Recycle, Reduce, Reuse. (Visual Mode)
    • +
    • Only record the essential. (Insertion Mode)
    • +
    • The one that repeats itself, loses. (dot and macros)
    • +
    • Beauty is essence. (Editing code)
    • +
    +
  • +
+
+
+
+

Index

+
+
+
img/iching.png
+
    + +
  • Seven habits of effective text editing. +
      +
    • Move around quickly.
    • +
    • Don't type it twice.
    • +
    • Fix it when it's wrong.
    • +
    • A file seldom comes alone.
    • +
    • Let's work together.
    • +
    • Text is structured.
    • +
    • Make it a habit (sharpen the saw).
    • +
    +
  • +
+
+
+
+
+

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?

+
    + +
  • Vim is a modular text editor.
    A clone of the infamous editor vi.

    Main Features: +
      +
    • Spell check integrated.
    • +
    • Auto complete of text and tokens.
    • +
    • Redo and Undo.
    • +
    • Tabs and buffer.
    • +
    • Multiple Window Area.
    • +
    • Syntax Highlighting and Tags.
    • +
    • Scripting language to create your own extensions.
    • +
    +
  • +
+
+
+
+

Introduction

+
+
+ +
vim-screen
+

Vim is not:

+
    + +
  • Vim is a text editor, NOT an IDE. +
      +
    • Not graphical. Sorry, terminal or gvim.
    • +
    • Not a text formatter.
    • +
    • Not WYSIWYG.
    • +
    • Not for everyone.
    • +
    • Vim script works only with text.
    • +
    • Not Emacs.
    • +
    +
  • +
+
+
+
+
+

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

+
    + +
  • Bram Moolenaar. In 1991, he published the first version of Vim. +
      +
    • Vim was first written for the Amiga.
    • +
    • Vim exists since the times of USENET.
    • +
    • Vim started with a strong community.
    • +
    +
  • +
+
+
+
+

Introduction

+
+
+
Billjoy-vi
+

History

+
    + +
  • Bill Joy. He wrote Vi inspired by the union of ed and ex. +
      +
    • Learn to read when he was 3 years old.
    • +
    • Prodigy alumni of UC Berkeley.
    • +
    • One of the main contributors and designers of BSD.
    • +
    • One of the core devs of the foundation of SunOS, now Solaris.
    • +
    • Sun Microsystems engineer.
    • +
    +
  • +
+
+
+
+
+ +
+

Vim ne Vi

+

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

+
+
+
+

Introduction

+
+
+

How do you use it?

+
    + +
  • How do you eat it? +
      +
    • Vim is modular.
    • +
    • Depending on the mode it is, it will be its interpretation.
    • +
    • Each key is a command or an action.
    • +
    • Vim is never wrong, Vim never makes mistakes, We make mistakes.
    • +
    • Vim handles texts, not files.
    • +
    +
  • +
+
+
+
+

Philosophy

+
+
+

KISS.

+
    + +
  • Keep It Simple Stupid +
      +
    • Minimalism is beauty.
    • +
    • Write software that only manages text.
    • +
    • Choose portability over efficiency.
    • +
    • Every file should be a text file.
    • +
    +
  • +
+
+
+
+

Philosophy

+
+
+

Programmer Virtues.

+
    + +
  • 1. Laziness +
      +
    • Repetitive tasks must be automated.
    • +
    • Put your focus and attention in complex and interesting problems.
    • +
    • Let the computer work for you, after all, it is the computer!
    • +
    • Computer = Computing.
    • +
    +
  • +
+
+
+
+

Philosophy

+
+
+

Programmer Virtues.

+
    + +
  • 2. Impatience +
      +
    • Solve the task or problem as soon as possible.
    • +
    • Don't leave an unsolved problem for tomorrow.
    • +
    • Solve today, to relax tomorrow. :D
    • +
    +
  • +
+
+
+
+

Philosophy

+
+
+

Programmer Virtues

+
    + +
  • 3. Hubris +
      +
    • Try to make a good implementation.
    • +
    • A short code that solves a hard task, will always be acclaimed.
    • +
    • Good code has its consequences: Respect, opportunities and good future.
    • +
    +
  • +
+
+
+
+

Philosophy

+
+
+

Don't type, edit

+
    + +
  • Not typing is good. (Laziness)
  • +
  • Living in Insert Mode is the biggest sin. (Laziness)
  • +
+
+
+
+

The Zen of Vim

+
+
+

Control your energy.

+
    + +
  • Command line. Press ' : ' +
      +
    • :e file - edit file.(open)
    • +
    • :q - quit. +
    • :w - write.(save)
    • +
    • :r - read.(insert another file)
    • +
    • !date - call an external application an pipe it to Vim.
    • +
    +
  • +
+
+
+
+

The Zen of Vim

+
+
+

Don't waste your energy moving.

+
    + +
  • Command Mode. +
      +
    • Use h,j,k,l.
    • +
    • left,down,up,right.
    • +
    +
  • +
+
+
+
+

The Zen of Vim

+
+
+

Don't waste your energy moving.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
fxforward - Moves the cursor to the next character defined by x
txMoves the cursor to the next character after x
FxInverse action of fx.
wMoves the cursor to the first word infront of it.
bInverse action of w.
0Moves 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.
ggMoves the cursor to the beginning of the file.
GMoves the cursor to the end of the file.
numGMoves the cursor to the line num.
+
+
+
+
+

The Zen of Vim

+
+
+

Don't run through the valley, jump it.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
HMoves the cursor to the top of the window.
MMoves the cursor to the half of the window.
LInverse action of H.
*Selects the word under cursor, and seeks forward for the next occurrence.
#Inverse action of *.
/palabraSeeks the word after '/', and moves the cursor.
?palabraInverse action of '/'.
+
+
+
+
+

The Zen of Vim

+
+
+

Don't run through the valley, jump it.

+
+ + + + + + + + + + + + + + +
maCreates a Mark in current position
`aMoves the cursor to the mark 'a' in the file.
`.Go to the last modification made.
+
+
+
+
+

The Zen of Vim

+
+

Recycle, Reduce, Reuse

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
vSelection per character.
VSelection per lines.
<C-V>Underlines blocks of characters.
d{acción}delete. Erase(cuts) the text, and sends it to the clipboard.
ddErase(cut) the entire line under the cursor, and sends it to the clipboard.
yyank. (Copy). Similar action as d, but this only sends to the clipboard.
ccut. Similar action as d, but this ones activates insert mode.
ppaste. Paste what is in current clipboard.
+
+
+
+
+

The Zen of Vim

+
+
+

Only record the essential.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
iEnters Insert Mode.
IEnters Insert Mode, and places the cursor at the beginning of the current line.
aInverse action of i.
AInverse action of I.
oCreates a new line below current position of the cursor,
and enters Insert mode.
OInverse action of o.
+
+
+
+
+

The Zen of Vim

+
+
+

The one that repeats itself, loses

+
+ + + + + + + + + + + + + + + + + + +
qkeywordStarts recording of a macro under the name keyword.
qEnds the recording of the macro.
@registroActivates the macro keyword.
.Dot. Repeats the last action made.
+
+
+
+
+

The Zen of Vim

+
+
+

Beauty is essence.

+
+ + + + + + + + + + + + + + + + + + +
]pPre-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

+
    + +
  • Navigating a text file is a common habit.
    + Learn to browse while you jump text, without typing repeatedly. +
      +
    • Use /pattern to search and move to a keyword.
    • +
    • Use % to move between logic blocks and loops.
    • +
    • For repeating functions, words, and variables, use *.
    • +
    • Use ngg where n is the number of a line.
    • +
    +
  • +
+
+
+ +
+
+

Don't type it twice

+

Three simple steps:

+
+
    +
  • 1. While editing a text file, notice how many times you repeat the same keystrokes or movements.
  • +
  • 2. Lookup for a command, action, or a plugin, so that editor works around the repetition.
  • +
  • 3. Practice that command or action until it's part of your muscle memory
  • +
+
+
+
+

Seven habits of effective text editing.

+
+

Don't type it twice

+
    + +
  • Typing the same thing in insert mode, is like reinventing the wheel.
    +
      +
    • Use :s to automagically substitute a keyword in the entire file.
    • +
    • Use . to insert the last word written.
    • +
    • For inserting functions, variables, and words, that repeat a lot in the entire file, use C-N.
    • +
    • To insert files, directories, and paths, use C-X + C-F.
    • +
    +
  • +
+
+
+
+

Seven habits of effective text editing.

+
+

Fix it when it's wrong

+
    + +
  • If you keep typing a wrong word or it repeats, it must be corrected.
    +
      +
    • Use :abbr Lunix Linux to fix a keyword in the entire file.
    • +
    +
  • +
+
+
+
+

Seven habits of effective text editing

+
+

A file seldom comes alone.

+
    + +
  • Every text file has another text file in common.
    + Edit with various windows, tabs, and buffers. Divide and conquer. +
      +
    • Use C-w + s to divide the window area horizontally.
    • +
    • Use C-w + v to divide the window area vertically.
    • +
    +
  • +
+
+
+
+

Seven habits of effective text editing

+
+

Unity makes strength

+
    + +
  • Vim was made around Unix philosophy,
    + make use of that text stream . +
      +
    • Use :r file to insert a entire content of a file to the current window.
    • +
    • Use :r ! grep 192.168.1.102 log to insert text from the stream of another application.
    • +
    +
  • +
+
+
+
+

Seven habits of effective text editing

+
+

Text is structured

+
    + +
  • In code and formal texts,
    + the format and the order, matter more than the content of a file. +
      +
    • To format a text to the default setting, use =G.
    • +
    • To structure a text line or block, utiliza >>.
    • +
    • Inverse action of >>, use <<.
    • +
    +
  • +
+
+
+
+

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

+
+
+ + + -- cgit v1.3-2-g0d8e