]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
vimrc: Disable spell mappings if there's no spell support.
authorSimon Ruderich <simon@ruderich.org>
Thu, 15 Nov 2012 20:22:22 +0000 (21:22 +0100)
committerSimon Ruderich <simon@ruderich.org>
Thu, 15 Nov 2012 20:22:22 +0000 (21:22 +0100)
vimrc

diff --git a/vimrc b/vimrc
index 3f94aefb7f20fe2677880a59f7b2eeb17540567b..825aa4e33faab82ce710552c3e5b48cb1384ec51 100644 (file)
--- a/vimrc
+++ b/vimrc
@@ -542,6 +542,11 @@ if exists('+spell')
     nnoremap <silent> <Leader>sn :set nospell<CR>
     nnoremap <silent> <Leader>se :set spell spelllang=en_us<CR>
     nnoremap <silent> <Leader>sd :set spell spelllang=de_de<CR>
+" If no spell support is available, these mappings do nothing.
+else
+    nmap <Leader>sn <Nop>
+    nmap <Leader>se <Nop>
+    nmap <Leader>sd <Nop>
 endif
 
 " Add semicolon to the end of the line. Thanks to