Vim Text Editor

Vim is a clone of the popular vi editor for Unix. It is a text editor designed for speed and increased productivity, and is ubiquitous in most UNIX-based systems.

Vimtutor is an excellent application that teaches us how to use vim. It comes with the vim package during the installation.

You can run “vimtutor” on the command line to open this tutor. Here is the look at the screen -

Vim text editor Gujarat Technological University GTU

Here are some popular and most used commands of vim

    vim <filename>   # Open <filename> in vim
    :help <topic>    # Open up built-in help docs about <topic> if any exists
    :q               # Quit vim
    :w               # Save current file
    :wq              # Save file and quit vim
    ZZ               # Save file and quit vim
    :q!              # Quit vim without saving file
                     # ! *forces* :q to execute, hence quiting vim without saving
    ZQ               # Quit vim without saving file
    :x               # Save file and quit vim, shorter version of :wq

Modes

Vim is based on the concept of modes. Here is a quick view to all the modes-

    i                # Puts vim into insert mode, before the cursor position
    a                # Puts vim into insert mode, after the cursor position
    v                # Puts vim into visual mode
    :                # Puts vim into ex mode
    <esc>            # 'Escapes' from whichever mode you're in, into Command mode

I hope this is enough for a beginner if you want to learn more you can visit the site below. let me know if this post is helpful to you



To know more visit this site

Comments

YouTube

Popular posts from this blog

GTU OOP Programs - 11

Mini project ideas for Operating System

GTU OOP Program - 17 tic-tac-toe