--- title: "replae with spell and nohl" date: 2020-01-11T12:57:46+01:00 draft: false snippet_types: ["vim"] --- When is the last time you used the **\** 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 **\** 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 **\\** ```vim script nnoremap ss :noh ``` - turn on spell check in a given language ```vim script nnoremap se :setlocal spell spelllang=en nnoremap sd :setlocal spell spelllang=de ```