Skip to content

Instantly share code, notes, and snippets.

@hoffstein
Created July 18, 2011 15:40
Show Gist options
  • Select an option

  • Save hoffstein/1089896 to your computer and use it in GitHub Desktop.

Select an option

Save hoffstein/1089896 to your computer and use it in GitHub Desktop.
Vim keep only the first word in each line
:s/\(\s*\w\+\).*/\1
@jottr
Copy link
Copy Markdown

jottr commented Feb 20, 2023

This breaks on Umlauts.

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