SlideShare a Scribd company logo
ViM – A text editor
About me
●   Keith Pickett
●   Married, 0 kids, 2 dogs
●   From SE Tennessee (Appalachian Mountains.. that explains the ak-cent :) )
●   Software developer (mostly web development)
●   22 years in Unix/Linux experience
●   Love technology and the recent push in the CSRA.
●   Why am I here? To provide what I know and to learn something from you.
●   @KeithPickett
●   http://about.me/KeithPickett
ViM – A text editor
What is Vim?
●    Vim is a text editor. Not a word processor.
●    Based on the vi text editor.
●    You can't 'WYSIWYG' it. Through syntax highlighting, you can get close. That's not its purpose,
     however.

History

Vi
     ●   Created by Bill Joy (one of the co-founders of Sun Microsystems).
     ●   Defined as "a screen-oriented text editor originally created for the Unix operating system. The
         portable subset of the behavior of vi and programs based on it, and the ex editor language
         supported within these programs, is described by (and thus standardized by) the Single Unix
         Specification and POSIX." (source: http://en.wikipedia.org/wiki/Vi )
     ●   Developed at first on an old ADM-3A terminal, before computer mice became ubiquitous. Users
         relied on commands and keyboard-based navigation to interact with the editor. (See pictures)
     ●   Derived from very painful editor named "ed" and a series of other command-line editors like ex.
         The ex functionality is still part of Vim.
     ●   Ex v2.0 became Vi. Version 3.1 became a permanent part of what we now know as Unix.
ADM-3A Terminal
Photo courtesy: http://www.nekochan.net
ADM-3A Keyboard
Photo courtesy: http://www.vintagecomputer.net
ViM – A text editor
Vim (Vi IMproved)


 ●   Created by Bram Moolenaar in 1988 for the Atari platform. Mr. Moolenaar is active in the
     International Child Care Fund (ICCF) to help educate children in Uganda.
 ●   First public release in 1991 (Unix and early implementations of Linux later).
 ●   The name "Vim" is an acronym for "Vi IMproved" because Vim is an extended version of the vi
     editor, with many additional features designed to be helpful in editing program source code. -
     [Source: http://en.wikipedia.org/wiki/Vim_(text_editor) ]
 ●   Ported to Unix in 1992.
ViM – A text editor
Feature List
 ●   Highly customizable

 ●   Compatible with Vi (but now 100% compatible)
 ●   Built in vimtutor for learning Vim
 ●   GUI mode (gVim) with full mouse integration.

 ●   Multi-level undo.
 ●   Extended Regular Expression support.
 ●   Code-completion
 ●   Code merging
 ●   Strong diff functionality (vimdiff)
 ●   Code folding
 ●   Syntax highlighting

 ●   Session / State Preservation
 ●   Built in text expansion using “iab” or can use plugins (snippetsEMU).
 ●   Has its own scripting language (vimscript) for configuration and writing plugins.

 ●   Plugins can be written in Lua (as of Vim 7.3), Perl, Python, Racket (formerly PLT Scheme), Ruby, and Tcl. It's not real robust, but scripts in these languages do work.
 ●   Project distributions exist to make Vim more specific in its functionality. Cream is the most popular of these. Its aim is to make Vim more modern by taking advantages
     of the GUI feature set.
ViM – A text editor
    Availability
●   All major operating systems and even the minor ones too.
●   Versions are available for Android and iOS.

    Other Interesting Facts
●   Shells like KSH and BASH have vi mode. (set -o vi)
●   Allows you to use most of the ex/vi commands and movements on the command line.
●   ESC invokes vi mode. ESC-k brings up previous command. Pressing j or k will scroll through
    command history. Pressing h or l will move the cursor over the command. 0 places cursor at the
    beginning of the line and $ at the end.
ViM – A text editor
Navigation
When Vim is launched, the window is in “Normal” mode. This allows for the navigation of the cursor through the document. Pressing h, j,
k, l navigates the cursor.
0(Zero) -- positiosn cursor at the beginning of line
$ -- positions cursor at the end of the line
e – place cursor at the end of the next word. (dog, ford, cigar)
w -- set cursor to the beginning of the next word
b -- set cursor to the beginning of the previous word
E – place cursor at the end of the next non-blank spaced character (dogfood”, ford-focus”, cigar^box')
– Same for W and B respectively
Tab -- normal function
"." -- Repeat action
yy -- yank (copy) current line (line that cursor is positioned on).
dd -- delete current line (line that cursor is positioned on).
u -- undo last action    (multi-level undo)
CTRL-R – Repeat next history item (multi-level re-do)
Augusta Linux User Group - Vim Introduction
Augusta Linux User Group - Vim Introduction
Augusta Linux User Group - Vim Introduction
Augusta Linux User Group - Vim Introduction
Augusta Linux User Group - Vim Introduction
Augusta Linux User Group - Vim Introduction
Augusta Linux User Group - Vim Introduction
ViM – A text editor
Follow-up items from the discussion:
Is there a vi mode in ZSH? Yes. It apparently doesn't behave as you would expect. A couple of Google searches yielded some
blog posts discussing the matter.

To split a Vim session horizontally, go into command mode and type “split”.

To split a Vim session vertically, go into command mode and type “vsplit”.
Examples:
(horizontal split)
        :split

(vertical split)
        :vsplit

To switch between windows * See Note-1 below*:
      Split windows :: CTRL+ws
                   or :split in command mode.

        Split windows vertically :: CTRL+wv
                     or :vsplit in command mode.

        Switch between windows :: CTRL+ww
        Quit a window :: CTRL+wq -


*Note-1*
The CTRL+<key> sequences above (example: CTRL+ws) probably look confusing and may not actually work if you don't execute
them correctly. The proper way to execute the command is to hold down CTRL and 'w', let go, and then tap the letter next to w. For
example, CTRL+ws, 's' would be the key to tap after 'CTRL w'.
ViM – A text editor

Links:
www.vim.org

www.viemu.com

http://arstechnica.com/information-technology/2011/11/two-decades-of-productivity-vims-20th-ann

http://en.wikipedia.org/wiki/Vi

http://en.wikipedia.org/wiki/Vim_(text_editor)




Questions?

More Related Content

PPTX
Vim Showcase
PPTX
Vim survival guide
PDF
Vim Loves Perl - Perl Casual#2
PDF
Kodar-lan - Text and editors Vi/Vim (2013-06-15)
PDF
Let's talk about neovim
ODP
Basics
PDF
ODP
Linux basics (part 2)
Vim Showcase
Vim survival guide
Vim Loves Perl - Perl Casual#2
Kodar-lan - Text and editors Vi/Vim (2013-06-15)
Let's talk about neovim
Basics
Linux basics (part 2)

Similar to Augusta Linux User Group - Vim Introduction (20)

PPTX
Introduction to Vim
PPTX
Unit -6_linux operating system_1234.pptx
PDF
What is Vim?
PDF
Vim Book
PDF
Unit 5 vim an advanced text editor
PPTX
PPT
Vi editor in linux
PPT
Vim Vi Improved
ODP
PPTX
Vi and redirection & piping in linux
ODP
Linuxppt
ODP
Open Source Virtualization Hacks
PDF
Vi Improved Vim First Edition Steve Oualline
KEY
Small Screen Development
ODP
PDF
Vi survival guide
DOCX
swl--3 (1).docx
PDF
Linux network manager configuration
PDF
Linux network manager configure
Introduction to Vim
Unit -6_linux operating system_1234.pptx
What is Vim?
Vim Book
Unit 5 vim an advanced text editor
Vi editor in linux
Vim Vi Improved
Vi and redirection & piping in linux
Linuxppt
Open Source Virtualization Hacks
Vi Improved Vim First Edition Steve Oualline
Small Screen Development
Vi survival guide
swl--3 (1).docx
Linux network manager configuration
Linux network manager configure
Ad

Recently uploaded (20)

PDF
Machine learning based COVID-19 study performance prediction
PPTX
Cloud computing and distributed systems.
PDF
cuic standard and advanced reporting.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPT
Teaching material agriculture food technology
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Electronic commerce courselecture one. Pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Review of recent advances in non-invasive hemoglobin estimation
Machine learning based COVID-19 study performance prediction
Cloud computing and distributed systems.
cuic standard and advanced reporting.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Teaching material agriculture food technology
Mobile App Security Testing_ A Comprehensive Guide.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Electronic commerce courselecture one. Pdf
Chapter 3 Spatial Domain Image Processing.pdf
The AUB Centre for AI in Media Proposal.docx
Diabetes mellitus diagnosis method based random forest with bat algorithm
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Understanding_Digital_Forensics_Presentation.pptx
NewMind AI Weekly Chronicles - August'25 Week I
sap open course for s4hana steps from ECC to s4
Building Integrated photovoltaic BIPV_UPV.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Per capita expenditure prediction using model stacking based on satellite ima...
Review of recent advances in non-invasive hemoglobin estimation
Ad

Augusta Linux User Group - Vim Introduction

  • 1. ViM – A text editor About me ● Keith Pickett ● Married, 0 kids, 2 dogs ● From SE Tennessee (Appalachian Mountains.. that explains the ak-cent :) ) ● Software developer (mostly web development) ● 22 years in Unix/Linux experience ● Love technology and the recent push in the CSRA. ● Why am I here? To provide what I know and to learn something from you. ● @KeithPickett ● http://about.me/KeithPickett
  • 2. ViM – A text editor What is Vim? ● Vim is a text editor. Not a word processor. ● Based on the vi text editor. ● You can't 'WYSIWYG' it. Through syntax highlighting, you can get close. That's not its purpose, however. History Vi ● Created by Bill Joy (one of the co-founders of Sun Microsystems). ● Defined as "a screen-oriented text editor originally created for the Unix operating system. The portable subset of the behavior of vi and programs based on it, and the ex editor language supported within these programs, is described by (and thus standardized by) the Single Unix Specification and POSIX." (source: http://en.wikipedia.org/wiki/Vi ) ● Developed at first on an old ADM-3A terminal, before computer mice became ubiquitous. Users relied on commands and keyboard-based navigation to interact with the editor. (See pictures) ● Derived from very painful editor named "ed" and a series of other command-line editors like ex. The ex functionality is still part of Vim. ● Ex v2.0 became Vi. Version 3.1 became a permanent part of what we now know as Unix.
  • 3. ADM-3A Terminal Photo courtesy: http://www.nekochan.net
  • 4. ADM-3A Keyboard Photo courtesy: http://www.vintagecomputer.net
  • 5. ViM – A text editor Vim (Vi IMproved) ● Created by Bram Moolenaar in 1988 for the Atari platform. Mr. Moolenaar is active in the International Child Care Fund (ICCF) to help educate children in Uganda. ● First public release in 1991 (Unix and early implementations of Linux later). ● The name "Vim" is an acronym for "Vi IMproved" because Vim is an extended version of the vi editor, with many additional features designed to be helpful in editing program source code. - [Source: http://en.wikipedia.org/wiki/Vim_(text_editor) ] ● Ported to Unix in 1992.
  • 6. ViM – A text editor Feature List ● Highly customizable ● Compatible with Vi (but now 100% compatible) ● Built in vimtutor for learning Vim ● GUI mode (gVim) with full mouse integration. ● Multi-level undo. ● Extended Regular Expression support. ● Code-completion ● Code merging ● Strong diff functionality (vimdiff) ● Code folding ● Syntax highlighting ● Session / State Preservation ● Built in text expansion using “iab” or can use plugins (snippetsEMU). ● Has its own scripting language (vimscript) for configuration and writing plugins. ● Plugins can be written in Lua (as of Vim 7.3), Perl, Python, Racket (formerly PLT Scheme), Ruby, and Tcl. It's not real robust, but scripts in these languages do work. ● Project distributions exist to make Vim more specific in its functionality. Cream is the most popular of these. Its aim is to make Vim more modern by taking advantages of the GUI feature set.
  • 7. ViM – A text editor Availability ● All major operating systems and even the minor ones too. ● Versions are available for Android and iOS. Other Interesting Facts ● Shells like KSH and BASH have vi mode. (set -o vi) ● Allows you to use most of the ex/vi commands and movements on the command line. ● ESC invokes vi mode. ESC-k brings up previous command. Pressing j or k will scroll through command history. Pressing h or l will move the cursor over the command. 0 places cursor at the beginning of the line and $ at the end.
  • 8. ViM – A text editor Navigation When Vim is launched, the window is in “Normal” mode. This allows for the navigation of the cursor through the document. Pressing h, j, k, l navigates the cursor. 0(Zero) -- positiosn cursor at the beginning of line $ -- positions cursor at the end of the line e – place cursor at the end of the next word. (dog, ford, cigar) w -- set cursor to the beginning of the next word b -- set cursor to the beginning of the previous word E – place cursor at the end of the next non-blank spaced character (dogfood”, ford-focus”, cigar^box') – Same for W and B respectively Tab -- normal function "." -- Repeat action yy -- yank (copy) current line (line that cursor is positioned on). dd -- delete current line (line that cursor is positioned on). u -- undo last action (multi-level undo) CTRL-R – Repeat next history item (multi-level re-do)
  • 16. ViM – A text editor Follow-up items from the discussion: Is there a vi mode in ZSH? Yes. It apparently doesn't behave as you would expect. A couple of Google searches yielded some blog posts discussing the matter. To split a Vim session horizontally, go into command mode and type “split”. To split a Vim session vertically, go into command mode and type “vsplit”. Examples: (horizontal split) :split (vertical split) :vsplit To switch between windows * See Note-1 below*: Split windows :: CTRL+ws or :split in command mode. Split windows vertically :: CTRL+wv or :vsplit in command mode. Switch between windows :: CTRL+ww Quit a window :: CTRL+wq - *Note-1* The CTRL+<key> sequences above (example: CTRL+ws) probably look confusing and may not actually work if you don't execute them correctly. The proper way to execute the command is to hold down CTRL and 'w', let go, and then tap the letter next to w. For example, CTRL+ws, 's' would be the key to tap after 'CTRL w'.
  • 17. ViM – A text editor Links: www.vim.org www.viemu.com http://arstechnica.com/information-technology/2011/11/two-decades-of-productivity-vims-20th-ann http://en.wikipedia.org/wiki/Vi http://en.wikipedia.org/wiki/Vim_(text_editor) Questions?