Skip to content

Instantly share code, notes, and snippets.

@cevhyruz
Created February 1, 2018 06:46
Show Gist options
  • Save cevhyruz/2a891f19d3dd37c726cecee76a801cb4 to your computer and use it in GitHub Desktop.
Save cevhyruz/2a891f19d3dd37c726cecee76a801cb4 to your computer and use it in GitHub Desktop.
test

Vim Reference Manual

*editing.text - For Vim version 8.0

Editing files

  1. Introduction
  2. Editing a file
  3. The argument list
  4. Writing
  5. Writing and quitting
  6. Dialogs
  7. The current directory
  8. Editing binary files
  9. Excryption
  10. Timestamps
  11. File Searching
keys description NOTE
:_% current file
  • As long as you don't write the buffer, the original file remains unchanged.
  • Name of the current buffer.
  • :_# alternate file
  • If there already was a current file name, that one becomes the alternate file name.
  • The alternate file name is not changed when :keepalt is used.
  • :keepalt {cmd}, :keepa {cmd} execute {cmd} while keeping the current alternate file name commands invoked directly (e.g., with a function) may still set the alternate file name.
    CTRL-G,:f,:fi,:file prints the current file name (as typed, unless the :cd was used), cursor position (unless the ruler option is set) and the file status see the shortmess option about how to make the message shorter
    :file! don't trunctate the name even when shortmess indicate this
    {count}CTRL-G prints the current file name with full path if the count is higher than 1 the current buffer number is also given.
    g CTRL-G Prints the current position of the cursor if 5 ways: Column, Line, Word, Character, and Bytes
  • If the number of Characters and Bytes is the same then the Character position is ommited.
  • If there are characters in the line that take more than one position on the screen (<Tab> or special character), both the real column and the screen comun are shown, separated with a dash.
  • See the ruler option and the wordcount() function.
  • {Visual}g CTRL-G

    Test

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment