Linux Operating System A Practical Guide to Fedora
- Slides: 15
Linux Operating System A Practical Guide to Fedora and Red Hat Enterprise Linux Chapter 5: The vim Editor By Fred R. Mc. Clurg © Copyright 2016, All Rights Reserved
Install for this class … vi, vim, gvim: yum install vim-X 11 ascii man page: yum install man-pages
vi, vim, gvim: Visual Editor Syntax: gvim filename
vim: Modes of Operation �Command Mode: Accepts vim commands �Input Mode: Accepts any text cursor mode indicator line number column number percent content Escape Key: Toggles between Command Input Modes
vim: Command Modes �Vi Command Mode: ◦ Short (usually one or two) character commands �Ex Command Mode: ◦ Always begins with colon
Vi Commands
vi: Cursor Movement Commands goto first line of file home (top of screen) line up begin line middle screen ^ begin text 0 h left line down lower (btm of screen) goto last line of file 1 G H k M j L G end of line l $ right
vi: Insert/Append Commands append line open above cursor position insert line I i insert left open below O □ o a A append right
vi: Move by word, sentence, paragraph up { sentence up back big word B end word b back word sentence down paragraph down curso r ( □ ) } w e word end big word W E word big
vi: Delete Commands cursor position delete previous X delete character □x D delete to line end
vi: Delete and Change Cmd cw cc dw dd Description Change word Change line Delete word Delete line into buffer named "add “a”
vi: Yank and Put Commands Cmd Y yy P p "ayy "ap Description Yank (copy) line Put (paste) yanked line above Put (paste) yanked line below Yank line into buffer named “a” Put line from named buffer “a”
vi: Find string commands Cmd Description Define and find string /str “str” Define & find previous ? str “str” n N Find next string occurrence Find previous occurrence
Ex Commands
ex: Editing Files Syntax: ◦ : e file ◦ : e! ◦ : w file ◦ : q! ◦ : wq ◦ : n ◦ ZZ exit Edit file “filename” Revert file to last save Write file “filename” Quit the editor Quit without saving Write file and quit editor Next file Write file (if modified) and
- What are the design principles of linux system?
- Presentation on linux operating system
- Linux operating system concepts
- Unix sort reverse
- Linux operating system security features
- Linus thorvalds
- Dart fedora
- Fedora vs dpsace
- Fedora vi
- Fedora commons
- Unsworks
- No irq handler for vector fedora
- Wps fedora
- Icriccardomassa
- Linux kernel linux security module m1
- Cs423