On Wed, Jul 2, 2014 at 2:29 PM, john Culleton <[email protected]> wrote: > Most of the functions under the tools menu have > key combinations as an alternative. Spellcheck is > an apparent exception. How do I set up a key > combination to turn spellcheck on? (And why wasn't > this done as a standard feature?) >
John I cannot speak as to why or why not that isn't a standard feature. But I can tell you how I do it: You could use Tim Pope's unimpared.vim plugin which provides a spell on,off,toggle mapping. (https://github.com/tpope/vim-unimpaired) The commands are: [os, ]os, and cos for set spell, set nospell, set spell! respectively. Or you could do something like I do: "toggle spell check noremap <Leader>ss :setlocal spell!<CR> which toggles the spell checking locally, i.e. for the current buffer. I borrowed this from someones .vimrc online somewhere some time ago. Some times, in source code, it wasn't obvious to me whether the toggling had turned spell on or off, so I augmented the above mapping to make it more verbose as follows: "toggle spell check verbose noremap <Leader>ss :setlocal spell! <Bar> echo &spell?'spell is on':'spell is off'<CR> Now I know if I've turned the spell checking on or off. Hope that helps. Cheers, Ethan Alan > -- > John Culleton > Wexford Press > Free list of books for self-publishers: > http://wexfordpress.net/shortlist.html > PDF e-book: "Create Book Covers with Scribus" > available at > http://www.booklocker.com/books/4055.html > > -- > -- > You received this message from the "vim_use" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_use" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
