Replae <s> with spell and nohl - 01-11-20

When is the last time you used the <s> key in vim? May not know what it even does?

The vim help pages lists it as substitute:

4.2 Substitute						*:substitute*
							*:s* *:su*
:[range]s[ubstitute]/{pattern}/{string}/[flags] [count]

In real use I find this visual selection putting or using <c> along with movement keys much better for substituting text. This leave the s key in normal mode open to be remapped! Here are two mappings I have so far:

  • turn off highlighting with a quick <s><s>
nnoremap ss :noh<CR>
  • turn on spell check in a given language
nnoremap <leader>se :setlocal spell spelllang=en<CR>
nnoremap <leader>sd :setlocal spell spelllang=de<CR>
\- [ vim ]