Presentation is loading. Please wait.

Presentation is loading. Please wait.

Advanced Vim (Vi Improved). Announcement Managements requests that all the Emacs chauvinist in the audience refrain from arguing with the Vim chauvinist.

Similar presentations


Presentation on theme: "Advanced Vim (Vi Improved). Announcement Managements requests that all the Emacs chauvinist in the audience refrain from arguing with the Vim chauvinist."— Presentation transcript:

1 Advanced Vim (Vi Improved)

2 Announcement Managements requests that all the Emacs chauvinist in the audience refrain from arguing with the Vim chauvinist on stage. Such arguments are generally considered intellectual combat between two unarmed opponents.

3 Topics ● What Vi users should know about Vim ● Using Vim to go perform Electronic Archeology (digging through legacy code) ● How to create a syntax coloring scheme or modify an existing one ● Scripting with Vim's internal language and using Perl for Vim scripting

4 What every Vi User Should Know About Vim

5 Turning on the new features Warning: By default Vim tries to act like Vi. This means that many of Vim's best features are turned off unless you tell Vim to operate in Vim mode. To tell Vim to be Vim create the file: $HOME/.vimrc

6 Starting ● vim – Start in current window ● gvim – Start in it's own GUI

7 First Commands ● Undo works multiple times (Use CTRL-R to redo a change) ● :help Help is actually very informative and useful!

8 Multiple Windows ● Open a new window :split file ● Go Up / Down a window CTRL-Wj CTRL-Wk ● Open a new window (vertical) :vsplit file ● Go Left / Right a window CTRL-Wh CTRL-Wl

9 Tabbed Editing ● To open a new tab: :tabnew file

10 Searching Features ● Highlight Searching :set hlsearch ● (Good for regular expression creation too!) ● Incremental Searching :set incsearch

11 Search History ● Use / then / to browse history ● (Also works for command (:) mode)

12 Spelling ● Turn on spelling :set spell ● List possible corrections for the word under the cursor z= ● Use the mouse to suggest spelling :set mousemodel=popup

13 Visual Mode ● Normal way to delete three words d3w ● Visual mode way v – Start visual mode www – Move over three words (3w works too) (Text is highlighted) d – Delete the highlighted text

14


Download ppt "Advanced Vim (Vi Improved). Announcement Managements requests that all the Emacs chauvinist in the audience refrain from arguing with the Vim chauvinist."

Similar presentations


Ads by Google