Vim Commands.pdf

vi.pdf
Preview of Vim Commands
🔗 Source: darkdust.net
📊 Size: 12 KB
👤 Author: marc
⬇️ Downloads: 100

Summary

Switch to command mode
Load file :e
Revert to last saved state :e!
Save changes :w
Save changes as file :w
WARNING: editing the old file, to edit the newly saved type :e afterwards
Quit if saved :q
Quit without saving :q!
Save and quit :wq
ZZ Save and quit
Repeat command c n-times
Undo u
Start highlighting v
Basic movement
Move cursor left h
Move cursor down j
Move cursor up k
Move cursor right l
Move cursor to next word w
Move cursor to previous word b
Move cursor to start of previous or current paragraph {
Move cursor to start of next paragraph }
Move cursor to start of previous or current sentence (
Move cursor to start of next sentence )
Move cursor to start of line ^
Move cursor to end of line $
Move down one screen Ctrl+F
Move up one screen Ctrl+B
Move down ½ screen Ctrl+D
Move up ½ screen Ctrl+U
Jump to corresponding bracket %
Jump to end of file G
Jump to line n G
Jump to start of file gg
Basic input
Insert at cursor position i
Insert at start of line I
Append after cursor position a
Append at end of line A
Start new line after current line o
Start new line before current line O
Indention
Indent in command mode >>
Exdent in command mode <<
Indent in insert mode Ctrl+T
Exdent in insert mode Ctrl+D
Basic editing
Copy from cursor to position equivalent to command c y
Copy line yy
Cut, like y d
Cut line dd
Cut to end of line D
Cut current character x
Cut to start of line X
Paste at cursor position p
Paste after cursor position P
Advanced editing
Inserts the content of file :r
Inserts the output of the shell command sys :r!
Abbreviation for insert mode :abbr
Map commands to a :map

Switches
Ignore case :set ic
Don't ignore case :set noic
AutoIndent :set ai
Don't AutoIndent :set noai
Syntax highlighting :syntax on/off
Switch UNIX/DOS linebreaking :set fileformat=unix/dos
Ranges
Lines 4 to 7 4,7
Line 4 and the 7 following lines 4;7
Line 4 up to the last line 4,$
Line 4 up to current cursor line 4,.
Current cursor line to line 2000.,2000
From three lines above current cursor position to four lines after current cursor position -3,+4
From four lines after current cursor position to three lines before last line +4,$-3
Search forward for text /text
Repeat last search forward /
Search backward for text?text
Repeat last search backward?
Repeat last search in last direction n
Repeat last search in opposite direction N
Regular Expression Replacing :s
Execute command c in every line containing text :g/text/
Execute command c in every line NOT containing text :g!/text/

Description

:e <file> loads a file, :e! reverts to last saved state. :w saves changes, :w <file> saves as file.

Technical Information

  • File Format: PDF
  • File Size: 12 KB
  • Pages: 1
  • Language: EN
  • Author: marc
  • Total Downloads: 100
  • Last Updated: 4 weeks ago

Document Overview

This PDF document about Vim Commands provides comprehensive information and guidance. Whether you're a beginner or advanced user, this resource offers valuable insights into Vim Commands.

Related Topics

If you're interested in Vim Commands, you might also want to explore:

Download Vim Commands eBooks for free and learn more about Vim Commands. These books contain exercises and tutorials to improve your practical skills, at all levels!

Not satisfied with this document? We have related documents to Vim Commands, try searching with similar keywords: Vim Commands, Vim Commands Cheat Sheet Welcome To Bullium, Vim Commands Pdf, Vim Movement Commands, Amp Quot Learning The Vi And Vim Editors 7th Edit, Share Ebook OReilly Learning The Vi And Vim Edito, Share Ebook Vi Vim Tutorial, A Byte Of Vim

You can download PDF versions of the user's guide, manuals and ebooks about Vim Commands, you can also find and download for free A free online manual (notices) with beginner and intermediate, Downloads Documentation, You can download PDF files (or DOC and PPT) about Vim Commands for free, but please respect copyrighted ebooks.