SlideShare a Scribd company logo
Vim or not to Vim
by
github.com/anatoliliotych
All you need to know:
Note: you still don't need pedals to type
Vim modes: Normal/Insert/Visual/Nightmare
Movement is life
Operators
c change
d delete
y yank to register
gu make lowercase
gU make uppercase
d delete a symbol
D delete a line
* search by the word you're on
Left-Rigth motions
w next word including punctuation

W next word no punctuation

b beginning of word including punctuation

B beginning of word no punctuation

e end of word including punctuation

E end of word no punctuation

$ or g_ last char on line
h to the left on one symbol

l to the right on one symbol

^ or 0 - to the line start

f find

F previous find

t till

T previous till

; repeat latest f,t

, repeat latest f,t in opposite order
Up-Down motions
j,k - one line moving

gg - first line

G - last line

H - top of screen

M - middle of screen

L - bottom of screen

zz - current line to middle

zt - current line to top

zb - current line to bottom

zl - scroll to right

zh - scroll to left

ctrl + u or ctrl +d - scroll half page up and down

ctrl +b or ctrl + f - scroll page up and down
diw delete inner word
daw delete a word
diW delete inner WORD
daW delete a WORD
dd delete one line
dis delete inner sentence
das delete a sentence
dib delete inner '(' ')' block
dab delete a '(' ')' block
dip delete inner paragraph
dap delete a paragraph
diB delete inner '{' '}' block
daB delete a '{' '}' block
Text-Object operations
zi switch folding on or off
zv expand folds to reveal cursor
zj move down to top of next fold
zk move up to bottom of previous fold
zo open current fold
zO recursively open current fold
zc close current fold
zC recursively close current fold
za toggle current fold
zA recursively open/close current fold
zm reduce `foldlevel` by one
zM close all folds
zr increase `foldlevel` by one
zR open all folds
Folding
<< or >> moves one line in normal mode
5(>>,<<) moves 5 line in normal mode
>> or << moves selected lines in visual mode
gv(<,>) reselects last visual selections and move
Identing
ctrl + n - autocomplete all over
ctrl + p - autocomplete from pervious matches in this file
It could be sophisticated using CTAG...
Autocompletion
ctrl + r in insert mode to start using registers
" the default register
% the current file name
# the alternate file name
* the clipboard contents (X11: primary selection)
+ the clipboard contents
/ the last search pattern
: the last command-line
. the last inserted text
- the last small (less than a line) delete
Registers
:ls show the buffer list
:bn open the next buffer in the current window
:bp open the previous buffer in the current window
:b1 select buffer #1
Buffers
ctrl + ww switch windows in cycle
ctrl + w(l,h,j,k) switch to window right/left/down/up
ctrl + w5(-,+) makes window on 5 strings more|less
in horizontal split
ctrl + w5(>,<) makes window on 5 strings more|less
in vertical split
ctrl + wr change layout of windows
ctrl + w + (L,H) change layouts in horizontal
ctrl-w+| maximize current window
ctrl-w= make all equal size
:hide close current window
:only keep only this window open
set winwidth=80 set defaults minwidth for active window
Windows
:tabnew - open file/dir in a new tab

:tabf - search for file in open dir and open in a tab

gt -next, gT -previous - navigating through tabs

ctrl + wT - window to tab
Tabs
:e. at current working directory
:sp. in split at current working directory
:vs. in vertical split at current working directory
:E at directory of current file
:Se in split at directory of current file
:Vex in vertical split at directory of current file
File browsing in netrw: step 1
- up one directory
d Make a directory
D Attempt to remove the file/dir
gh Quick hide/unhide of dot-files
i Cycle between thin, long, wide, and tree listings
ctrl+l refresh the directory listing
o open file/dir under the cursor in a new split
R Rename the designed file/dir
t open file/dir under the cursor in a new tab
v open file/dir under the cursor in a new vsplit
% Open a new file in netrw's current directory
File browsing in netrw: step 2
How to start
•vimtutor
•https://vim-adventures.com/
•http://vimcasts.org/episodes/
•http://rayninfo.co.uk/vimtips.html
Try to use vim in real life...
set :questions

More Related Content

PDF
Vi Cheat Sheet v 1 00
PDF
Mission vim possible-full
PPTX
PDF
Vi Cheat Sheet
PDF
Vi editor commands
PDF
Vi reference
PDF
Tuffarsi in vim
PPT
Chapter 4 Keyboard in MATLAB Shortcuts
Vi Cheat Sheet v 1 00
Mission vim possible-full
Vi Cheat Sheet
Vi editor commands
Vi reference
Tuffarsi in vim
Chapter 4 Keyboard in MATLAB Shortcuts

What's hot (17)

PPTX
ODP
PDF
Firefox shortcuts-win
PDF
Vi CheatSheet
PDF
Sketch Plugin & Prototyping Tools
DOCX
Temp conversion
PDF
Linked list int_data_fdata
PDF
R Data Visualization: Learn To Add Text Annotations To Plots
PDF
Easy Blogging With Emacs -- Cheatsheet
PDF
Data Visualization With R: Learn To Modify Font Of Graphical Parameters
PPTX
Unix Basic Commands
ODP
Semaphore
ODP
Semaphore
DOC
Infix to-postfix examples
PDF
Tower of HANOI
Firefox shortcuts-win
Vi CheatSheet
Sketch Plugin & Prototyping Tools
Temp conversion
Linked list int_data_fdata
R Data Visualization: Learn To Add Text Annotations To Plots
Easy Blogging With Emacs -- Cheatsheet
Data Visualization With R: Learn To Modify Font Of Graphical Parameters
Unix Basic Commands
Semaphore
Semaphore
Infix to-postfix examples
Tower of HANOI
Ad

Similar to Rubizza #1 | Special Lecture. Vim (20)

KEY
VIM for the PHP Developer
PDF
PDF
Vim Cheat Sheet.pdf
PDF
Vim For Php
PDF
VIM for (PHP) Programmers
ODP
Vim and Python
PDF
VIM for Programmers
PDF
3.8.a how to - vim course book
PDF
101 3.8.1 vim course book
PDF
Mission vim possible
PPTX
Presentacion vim
PDF
Vim Basics
PDF
Vim cheat-sheet-en
PPT
PPT
Vim Cards - Powerpoint Format
PDF
Vi reference
PDF
PDF
Vim Hacks (OSSF)
PDF
Using VI Editor in Red Hat by Rohit Kumar
PDF
Using vi editor
VIM for the PHP Developer
Vim Cheat Sheet.pdf
Vim For Php
VIM for (PHP) Programmers
Vim and Python
VIM for Programmers
3.8.a how to - vim course book
101 3.8.1 vim course book
Mission vim possible
Presentacion vim
Vim Basics
Vim cheat-sheet-en
Vim Cards - Powerpoint Format
Vi reference
Vim Hacks (OSSF)
Using VI Editor in Red Hat by Rohit Kumar
Using vi editor
Ad

More from Rubizza (9)

PDF
Intoduction to React
PDF
Linux commands-effectiveness
PDF
Sinatra
PDF
Catch and Throw in Ruby
PDF
Variables, expressions, standard types
PDF
Git
PDF
Hangout Utche #6. "Rambovidnaya problema"
PDF
Hangout Utche #6. Math Thinking
PPTX
Rubizza #1 Lecture Ruby OOP
Intoduction to React
Linux commands-effectiveness
Sinatra
Catch and Throw in Ruby
Variables, expressions, standard types
Git
Hangout Utche #6. "Rambovidnaya problema"
Hangout Utche #6. Math Thinking
Rubizza #1 Lecture Ruby OOP

Recently uploaded (20)

PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Pre independence Education in Inndia.pdf
PPTX
GDM (1) (1).pptx small presentation for students
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Sports Quiz easy sports quiz sports quiz
PDF
Basic Mud Logging Guide for educational purpose
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
master seminar digital applications in india
PDF
01-Introduction-to-Information-Management.pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Lesson notes of climatology university.
human mycosis Human fungal infections are called human mycosis..pptx
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Final Presentation General Medicine 03-08-2024.pptx
2.FourierTransform-ShortQuestionswithAnswers.pdf
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Pre independence Education in Inndia.pdf
GDM (1) (1).pptx small presentation for students
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Sports Quiz easy sports quiz sports quiz
Basic Mud Logging Guide for educational purpose
O5-L3 Freight Transport Ops (International) V1.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
master seminar digital applications in india
01-Introduction-to-Information-Management.pdf
O7-L3 Supply Chain Operations - ICLT Program
Lesson notes of climatology university.

Rubizza #1 | Special Lecture. Vim

  • 1. Vim or not to Vim by github.com/anatoliliotych
  • 2. All you need to know:
  • 3. Note: you still don't need pedals to type
  • 6. Operators c change d delete y yank to register gu make lowercase gU make uppercase d delete a symbol D delete a line * search by the word you're on
  • 7. Left-Rigth motions w next word including punctuation W next word no punctuation b beginning of word including punctuation B beginning of word no punctuation e end of word including punctuation E end of word no punctuation $ or g_ last char on line h to the left on one symbol l to the right on one symbol ^ or 0 - to the line start f find F previous find t till T previous till ; repeat latest f,t , repeat latest f,t in opposite order
  • 8. Up-Down motions j,k - one line moving gg - first line G - last line H - top of screen M - middle of screen L - bottom of screen zz - current line to middle zt - current line to top zb - current line to bottom zl - scroll to right zh - scroll to left ctrl + u or ctrl +d - scroll half page up and down ctrl +b or ctrl + f - scroll page up and down
  • 9. diw delete inner word daw delete a word diW delete inner WORD daW delete a WORD dd delete one line dis delete inner sentence das delete a sentence dib delete inner '(' ')' block dab delete a '(' ')' block dip delete inner paragraph dap delete a paragraph diB delete inner '{' '}' block daB delete a '{' '}' block Text-Object operations
  • 10. zi switch folding on or off zv expand folds to reveal cursor zj move down to top of next fold zk move up to bottom of previous fold zo open current fold zO recursively open current fold zc close current fold zC recursively close current fold za toggle current fold zA recursively open/close current fold zm reduce `foldlevel` by one zM close all folds zr increase `foldlevel` by one zR open all folds Folding
  • 11. << or >> moves one line in normal mode 5(>>,<<) moves 5 line in normal mode >> or << moves selected lines in visual mode gv(<,>) reselects last visual selections and move Identing
  • 12. ctrl + n - autocomplete all over ctrl + p - autocomplete from pervious matches in this file It could be sophisticated using CTAG... Autocompletion
  • 13. ctrl + r in insert mode to start using registers " the default register % the current file name # the alternate file name * the clipboard contents (X11: primary selection) + the clipboard contents / the last search pattern : the last command-line . the last inserted text - the last small (less than a line) delete Registers
  • 14. :ls show the buffer list :bn open the next buffer in the current window :bp open the previous buffer in the current window :b1 select buffer #1 Buffers
  • 15. ctrl + ww switch windows in cycle ctrl + w(l,h,j,k) switch to window right/left/down/up ctrl + w5(-,+) makes window on 5 strings more|less in horizontal split ctrl + w5(>,<) makes window on 5 strings more|less in vertical split ctrl + wr change layout of windows ctrl + w + (L,H) change layouts in horizontal ctrl-w+| maximize current window ctrl-w= make all equal size :hide close current window :only keep only this window open set winwidth=80 set defaults minwidth for active window Windows
  • 16. :tabnew - open file/dir in a new tab :tabf - search for file in open dir and open in a tab gt -next, gT -previous - navigating through tabs ctrl + wT - window to tab Tabs
  • 17. :e. at current working directory :sp. in split at current working directory :vs. in vertical split at current working directory :E at directory of current file :Se in split at directory of current file :Vex in vertical split at directory of current file File browsing in netrw: step 1
  • 18. - up one directory d Make a directory D Attempt to remove the file/dir gh Quick hide/unhide of dot-files i Cycle between thin, long, wide, and tree listings ctrl+l refresh the directory listing o open file/dir under the cursor in a new split R Rename the designed file/dir t open file/dir under the cursor in a new tab v open file/dir under the cursor in a new vsplit % Open a new file in netrw's current directory File browsing in netrw: step 2
  • 20. Try to use vim in real life... set :questions