This winter holiday season, give a precious gift to your career by upgrading your skills. | Get Flat 15 - 20% OFF on All Courses | Save Today

[iqquestion id=160]

2 thoughts on “Unix : Vi commands Discussion 5

  • bsingh

    x Delete character to the right of cursor
    X Delete character to the left of cursor
    D Delete to the end of the line
    dd Delete current line
    :d Delete current line
    i Insert before cursor
    I Insert before line
    a Append after cursor
    A Append after line
    o Open a new line after current line
    O Open a new line before current line
    r Replace one character
    R Replace many characters

  • Ed Nartey


    x delete character
    nx delete n characters
    X delete character before cursor
    dw delete word
    ndw delete n words
    dd delete line
    ndd delete n lines
    D delete characters from cursor to end of line
    r replace character under cursor
    cw replace a word
    ncw replace n words
    C change text from cursor to end of line
    o insert blank line below cursor
    (ready for insertion)
    O insert blank line above cursor
    (ready for insertion)
    J join succeeding line to current cursor line
    nJ join n succeeding lines to current cursor line
    u undo last change
    U restore current line


    w forward word by word
    b backward word by word
    $ to end of line
    0 (zero) to beginning of line
    H to top line of screen
    M to middle line of screen
    L to last line of screen
    G to last line of file
    1G to first line of file
    f scroll forward one screen
    b scroll backward one screen
    d scroll down one-half screen
    u scroll up one-half screen
    n repeat last search in same direction
    N repeat last search in opposite direction

Leave a Reply