SIDEBAR
»
S
I
D
E
B
A
R
«
Remove DOS Carriage Returns
Nov 1st, 2006 by pixel

Vi(m) EditorIf you are like me you get alot of source/text files created in windows that are filled with the usual extra carriage return. To get rid of these stupid things it is a simple one line regular expression.

:1,$ s/^M$//g

Note: Make sure you create the ^M using CTRL+V and CTRL+M otherwise it won’t work.

Autocompletion
Sep 12th, 2006 by pixel

Vi(m) EditorDescription:
Autocomplete will complete any word, in any open document you are currently editing

Mode: Insert

Commands:
Ctrl+N – Next Suggestion
Ctrl+P – Previous Suggestion

Usage:

  1. Open an existing text document in vim and enter insert mode.
  2. Type any character (for example ‘s‘) and press Ctrl+N or Ctrl+P. Vim will provide you with the next or previous word that it knows that matches that character.