« Vim » : différence entre les versions

De Mathux
Aucun résumé des modifications
 
Aucun résumé des modifications
Ligne 21 : Ligne 21 :
"ay / "ap
"ay / "ap
</code>
</code>
== 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
* Delete all trailing whitespace (at the end of each line) with
  :%s/\s\+$//
  :%s/\s\+$//

Version du 12 mars 2021 à 10:58

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\+$//