From e9168a17de6326b1571bda3b621aee7533d7a2bd Mon Sep 17 00:00:00 2001 From: Tony Duckles Date: Wed, 6 Mar 2013 22:54:59 -0600 Subject: [PATCH] .vimrc: to toggle spell-check * Add key-mappings to have toggle spell-checking. * Enable spell-checking by default in *.markdown (ft=octopress) files. * Use "en_us" dictionary for spell-checking. --- .vimrc | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.vimrc b/.vimrc index ebcface..793be57 100644 --- a/.vimrc +++ b/.vimrc @@ -165,20 +165,24 @@ endif let mapleader = "," +" to turn off highlighting and clear any message already displayed. +nnoremap :nohlsearch:echo + " to pastetoggle, to turn-off autoindent when pasting from system clipboard nnoremap :set invpaste paste? set pastetoggle= -" press to turn off highlighting and clear any message already displayed. -nnoremap :nohlsearch:echo - -" NERDTreee +" to toggle NERDTreee let NERDTreeShowHidden=1 " show dotfiles by default noremap :NERDTreeToggle -" Gundo +" to toggle Gundo nnoremap :GundoToggle +" to toggle spell-check +nnoremap :setlocal spell! spelllang=en_us spell? +inoremap :setlocal spell! spelllang=en_us spell? + " Command-T noremap o :CommandT noremap O :CommandTFlush @@ -279,13 +283,13 @@ endif au Filetype sh,bash set ts=4 sts=4 sw=4 expandtab let g:is_bash = 1 " git commit message -au Filetype gitcommit set tw=68 spell +au Filetype gitcommit set tw=68 spell spelllang=en_us " html variants au Filetype html,xml,xsl,rhtml source $HOME/.vim/scripts/closetag.vim " don't use cindent for javascript au FileType javascript setlocal nocindent " use Octopress syntax-highlighting for *.markdown files -au BufNewFile,BufRead *.markdown set filetype=octopress +au BufNewFile,BufRead *.markdown set filetype=octopress spell spelllang=en_us " in Makefiles, use real tabs not tabs expanded to spaces au FileType make setlocal noexpandtab -- 2.43.0