Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Febuary 3rd, 2015 Notes
- vi - Moded Editing
- Command Insert
- - Copy/Paste - Inserting Text
- - Search
- - Saving/Loading
- - Exit
- vi fileName (Enters into VI/VIM)
- Simple VI Commands
- Insert Mode - i
- Return To Command Mode - [esc]
- Navigation (Command Mode)
- -------------------------
- // By Character
- h - Left #h --> Does it that number of times (Applies to All)
- j - Down
- k - Up
- l - Right
- // By Word
- w, W - By Word (Skips To Next Word)
- b, B - Back Word(Skips To Previous Word)
- // By Line
- ^ - Jumps To Start Of Line
- $ - Jumps To End Of Line
- #G - Jumps To Specific Line (Replace # w/ a number)
- Editing (Command Mode)
- ---------------------
- // Change By Word
- cw, cW - [Change Word] Deletes Word (Place cursor at the start of the word)
- cb, cB - [Change Word] Deletes Word (Place cursor at the end of the word)
- // Delete By Character
- x, X - Deletes A Character
- // Line Manipulation
- dd - Deletes The Line (Cut By Line)
- p - Pastes The Deleted Line
- // By Character Substitution
- s - Deletes The Current Character And Puts You Into Insert Mode
- . - Repeats The Last Command
- // Entering Insert Mode
- i - Current Cursor Position
- a - Appending (Moving forward after cursor position)
- I - Snaps To Start Of Line
- A - Appends To End Of Line
- o - Open New Line Below Current Line
- O - Open New Line Above Current Line
- // Programming Use
- >> - Indent
- << - De-indent
- /* - Search For (Replace * with a character or even string)
- n - Next
- N - Previous
- Extended Commands
- -----------------
- :w fileName - Write (Writes to a specific file name)
- :q - Quit (Quits the application [Requires A Save])
- :q! - Forces A Quit (Quits the application [Doesn't Require Saving])
- :wq - Save Then Quit
- :.co0 - Copy That Current Line To Line 0 (Change 0 To Anything)
- :%s/a/the - Search and replace (Replace a with anything and the)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement