Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can always use Find and Replace. Highlight the text you want and hit <kbd>Ctrl</kbd>-<kbd>H</kbd> (or <kbd>Command</kbd>-<kbd>H</kbd> on Mac) to open the Find and Replace box. Click the right-hand button on the top row to choose <code>In Selection</code>, and maybe the bottom right-hand button for <code>Highlight matches</code> if you want. Type a space in the <code>Find What:</code> box, an underscore in the <code>Replace With:</code> box, and hit <kbd>Ctrl</kbd>-<kbd>Alt</kbd>-<kbd>Enter</kbd> to Replace All (or <kbd>Ctrl</kbd>-<kbd>Shift</kbd>-<kbd>H</kbd> to Replace one at a time).</p> <hr> <p>To use a snippet, do the following. Select <code>Tools -&gt; New Snippet...</code> and put the following in it:</p> <pre class="lang-xml prettyprint-override"><code>&lt;snippet&gt; &lt;content&gt;&lt;![CDATA[${SELECTION/\s/_/g}]]&gt;&lt;/content&gt; &lt;/snippet&gt; </code></pre> <p>Save it as <code>Packages/User/replace_space_with_underscore.sublime-snippet</code>. Then, open <code>Preferences -&gt; Key Bindings - User</code> and put in the following:</p> <pre class="lang-json prettyprint-override"><code>[ { "keys": ["ctrl+shift+-"], "command": "insert_snippet", "args": { "name": "Packages/User/replace_space_with_underscore.sublime-snippet" } } ] </code></pre> <p>(If you already have custom key bindings, just put in <code>{ "keys": ["ctrl+shift+-"], "command": "insert_snippet", "args": { "name": "Packages/User/replace_space_with_underscore.sublime-snippet" } }</code> at the end, and remember to put a <code>,</code> after the one just above it.)</p> <p>Save both files, and now you can highlight whatever text you want, hit <kbd>Ctrl</kbd>-<kbd>Shift</kbd>-<kbd>-</kbd>, and replace the whitespace with underscores. If you just want spaces (no tabs or newlines), replace the "<code>\s</code>" with "<code>\</code>" (backslash space). This regex will replace multiple spaces with the same number of underscores. It gets a bit more complicated if you only want exactly one space, or exactly one underscore, but it's doable.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload