Vim

De Mathux

Configuration

My configuration files are hosted here. A simplified version (more re-usable) is here

Copy

  • Copy into the clipboard

"*y

  • Past from the clipboard

"*p

  • Copy/Past into/from the register "a"

"ay / "ap

Other

  • Substitute every occurrence of '0' with incremental values:
:let @a=0 | %s/0/\=(@a+setreg('a',@a +1))/g
  • Delete all trailing whitespace (at the end of each line) with
:%s/\s\+$//