title: Vim - Commands to visually select a regex match?
body: <p>Can't figure out how to automatically select a regex match in visual mode.</p>
  
  <p>For example, manually, I could search for a word</p>
  
  <pre><code>/word
  </code></pre>
  
  <p>It lands the cursor on the first character of the match "word".<br>
  Then I press <code>v</code> to enter Visual mode, and press <code>llll</code> to select the whole "word".</p>
  
  <p>Now I want to do this by a macro, and I don't know the length of the match ahead of time.</p>
  
  <p>I expected that Vim would automatically define some built-in marks at the beginning and end of the current match, so that I could ` to them. But I couldn't find any information on that.</p>
  
  <p>What I want is to reassign <code>Ctrl+n</code> to a macro to take me to the next match and select it in visual mode, i.e. not just highlight the match. (To parallel how <code>n</code> takes you to the next match.)</p>
  
  <p>If you're wondering why, its because I want to create folds based on regex matches (like <code>Ctrl+n</code>, <code>zf</code>), but I'm sure it will come in handy in other cases too.</p>