Skip to content

Instantly share code, notes, and snippets.

@bolandrm
Last active January 4, 2016 06:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bolandrm/8581004 to your computer and use it in GitHub Desktop.
Save bolandrm/8581004 to your computer and use it in GitHub Desktop.
Convert "This is a Description" => this_is_description
" <Leader>u will convert "I am following User1, User2, and User3" => i_am_following_user1_user2_and_user3
nnoremap <Leader>u Vi" :<C-w>%s/\%V,*\s/_/g<CR> :normal ds" guaW<CR>
@bolandrm
Copy link
Author

issues:

  1. doesn't work w/ apostrophes
  2. i think it leaves " " selected as a search. Could append a command to clear the current search.

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