We are going down memory lane and try to understand why VI(M) exists and what sets it apart from other editors. With the history straightened up, we learn how to quit VIM and some other advanced tricks as well as the mental modal behind editing files with VIM. Last but not least we are going to look at how to configure VIM and where it makes sense to use and where it doesn't.
2. 2
@ k a i _ r i c h a r d
Currently on a mission to narrow the gap
between human thinking and computer
language
Kai Richard König
P A R T N E R @ B I T S P A R K
3. 3
@ k a i _ r i c h a r d
Vi user for 10 years
Switched from textmate
I use VI(M) professionally for a long time
now
4. 4
@ k a i _ r i c h a r d
Before falling in love with VI(M) I used
notepad++ and later textmate
5. 5
@ k a i _ r i c h a r d
Manipulating text is the most fundamental skill a
programmer should have.
The better you are at it the faster you can
translate ideas and concepts into working code.
6. 6
@ k a i _ r i c h a r d
VI(M) has a special
place among all
other editors
7. 7
@ k a i _ r i c h a r d VI(M) has a special place among all other editors
8. 8
@ k a i _ r i c h a r d VI(M) has a special place among all other editors
9. 9
@ k a i _ r i c h a r d
What I hope you take away from this
> History of the first flamewar (emacs vs. vi)
> Understand the differences between emacs and vim
> And how to turn vim + shell into a workable IDE
10. 10
@ k a i _ r i c h a r d
'Those who do not learn history are doomed to repeat it.'
11. 11
@ k a i _ r i c h a r d
DEMO like it‘s 01.01.1970
12. 12
@ k a i _ r i c h a r d
ed‘s ideas and limitation?
> Two distinct modes insert and command/normal
> No arrowkeys and no backspace
> Pain in the a$$ to work with
> No idea where the cursor is or what the document looks like
13. 13
@ k a i _ r i c h a r d
A little History of Editors
ed sed
ex vi
emacs
1976
https://en.wikipedia.org/wiki/Editor_war
1991
vim
1970
14. 14
@ k a i _ r i c h a r d
Operators and Motions are the building blocks
of text manipulation language in VIM
opertator:count:motion
d - delete
y - copy
c - change
/ - search
w - word
f - find
15. 15
@ k a i _ r i c h a r d
The fundamental difference is how you execute
commands against text
In Emacs every command can be bound any keystroke –
e.g. `deleteWordUnderCursor()` can be CTRL+Shift+Y
In VI every keystroke is a command that can be
composed with other commands – e.g. `diw`
BTW: this resembles the UNIX philosophy more closely
16. 16
@ k a i _ r i c h a r d
DEMO like it‘s 01.01.1990 – sort of
17. 17
@ k a i _ r i c h a r d
You can turn VIM into an IDE with tmux and
some essential plugins
18. 18
@ k a i _ r i c h a r d You can turn VIM into an IDE with tmux and some essential plugins
Don't put anything in your .vimrc you don't understand!
https://dougblack.io/words/a-good-vimrc.html
19. 19
@ k a i _ r i c h a r d You can turn VIM into an IDE with tmux and some essential plugins
Don‘t be like me
20. 20
@ k a i _ r i c h a r d You can turn VIM into an IDE with tmux and some essential plugins
https://github.com/Shougo/dein.vim
21. 21
@ k a i _ r i c h a r d You can turn VIM into an IDE with tmux and some essential plugins
https://github.com/ctrlpvim/ctrlp.vim
https://github.com/scrooloose/nerdtree
22. 22
@ k a i _ r i c h a r d You can turn VIM into an IDE with tmux and some essential plugins
https://github.com/tmux/tmux
23. 23
@ k a i _ r i c h a r d
You wont succeed if you don‘t practice – but
don‘t be to hard on your self.
VI is not difficult it‘s just uncommon because we
are so used to the ideas of emacs
Start slow and ease into it - when using the shell to
change code use VI from time to time.
Don‘t go crazy with plugins.
26. 26
@ k a i _ r i c h a r d
Slides and Links
Twitter: @kai_richard
Github: https://github.com/kairichard/
LinkedIn: https://www.linkedin.com/in/kairichard/
Hinweis der Redaktion
Beore using VI i used textmate and before that i think it was notepad ++
Beore using VI i used textmate and before that i think it was notepad ++
I can talk a little bit about vim and share my experience with you but not at all would I call my self an advance user. But manipulating text is the most fundamental skill a programmer should have. The better you are at changing things to match you internal concept/idea the faster you are at translating ideas into working code.
Backspace wan‘t invented yet that is vim tried to be effcient
Then came the mouse and changed everything. Because it is easy to learn and does not require remembering keystrokes and movements, it only needs visual cortex which costs less energy and is easier to use.
Make the metaphore with the champions chips of remembering stuff and the one strategy they use to put stuff into imaganiary places.
When you are not inserting new code what are you doing?
There are many motions, word-motion, text-motions, line motions - but the underlying syntax of the language stays the same. To gether these from commands