Why Nostr? What is Njump?
2024-09-01 12:16:30

mos_8502 :verified: on Nostr: Here's a fun one for Vim. Put this in your ~/.vimrc:<code> noremap &lt;C-L&gt; ...

Here's a fun one for Vim.

Put this in your ~/.vimrc:<code> noremap &lt;C-L&gt; 1,$fold -s&lt;CR&gt;<br></code>

What does this do? noremap binds a key. &lt;C-L&gt; means "hold control and press L". Everything after that is the command that will be run after you press Control+L. In this case, the "1,$" selects everything from the first line to the end of the file, the "!" signifies a shell command to pipe the selection through (replacing the selection with the output of the command), the command "fold -s" line-wraps the file at 80 columns on space boundaries, and "" simulates pressing the enter key.
Author Public Key
npub1qnufz4pycufk27kkeev5g0fgm0w0tqexsly674s2uwy0tynk5ymsk5hzwk