タグ

ブックマーク / vim.fandom.com (3)

  • Remove unwanted spaces

    Tip 878 Printable Monobook Previous Next created 2005 · complexity intermediate · author Bertram Scharpf · version 6.0 Simple commands to remove unwanted whitespace[] In a search, \s finds whitespace (a space or a tab), and \+ finds one or more occurrences. The following command deletes any trailing whitespace at the end of each line. If no trailing whitespace is found no change occurs, and the e

    Remove unwanted spaces
    a2ikm
    a2ikm 2014/10/07
    “autocmd BufWritePre * :%s/\s\+$//e”
  • Using abbreviations

    Use the :abbreviate command to define abbreviations. Abbreviations can save typing, and can improve accuracy, when you need to enter the same text throughout your document. You can also create abbreviations to automatically correct common typing errors (such as changing teh to the). Examples: :ab rtfm read the fine manual Whenever you type 'rtfm' followed by punctuation such as a space or comma, t

    Using abbreviations
    a2ikm
    a2ikm 2013/04/20
  • Power of g

    Tip 227 Printable Monobook Previous Next created 2002 · complexity intermediate · author Arun Easi · version 6.0 The global command :g is very useful. Here are some examples showing the power of :g. Brief explanation of :g[] :[range]g/pattern/cmd This acts on the specified [range] (default whole file), by executing the Ex command cmd for each line matching pattern (an Ex command is one starting wi

    Power of g
    a2ikm
    a2ikm 2010/12/02
  • 1