From a80b043da6b7b4a074e4d2fbc49b4d723bdfa6df Mon Sep 17 00:00:00 2001 From: Kevin Date: Thu, 27 Mar 2014 00:56:54 -0400 Subject: [PATCH] Spelling mistakes, mistakes that exist in another locale and incorrect case are now all different colors, and those along with a few other colours have been tweaked to better matches the theme, and the non-colour term theme should more closely match too. The F1-F3+F12 toggles now work in all three editor modes, and F4 has been added to toggle spellcheck, which also works in all three modes (depending on the filetype, sometimes it will start on and others off). You can now place your cursor on an misspelled word in normal mode and hit \\ (backslash twice) to create a drop down menu with suggestions. --- vim/colors/darkcloud.vim | 12 ++++++------ vim/config/keyboard.vim | 25 +++++++++++++++++++++---- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/vim/colors/darkcloud.vim b/vim/colors/darkcloud.vim index b680263..d64903a 100644 --- a/vim/colors/darkcloud.vim +++ b/vim/colors/darkcloud.vim @@ -280,7 +280,7 @@ call s:X("MatchParen","000000","87d7ff","bold",s:termBlack,"Blue") call s:X("CursorColumn","","303030","","",s:termBlack) call s:X("CursorLine","","303030","","",s:termBlack) call s:X("CursorLineNr","87d7ff","","bold","Blue",s:termBlack) -call s:X("LineNr","ffaf00","","","Red",s:termBlack) +call s:X("LineNr","ffaf00","","","Yellow",s:termBlack) call s:X("TabLine","","000000","","",s:termBlack) call s:X("TabLineFill","","000000","","",s:termBlack) @@ -290,7 +290,7 @@ call s:X("Visual","","000000","standout","",s:termBlack) call s:X("Cursor","000000","87d7ff","underline",s:termBlack,"Blue") call s:X("Comment","626262","","","Grey","") -call s:X("Todo","5f0000","808080","","Red",s:termBlack) +call s:X("Todo","ffaf00","808080","","Red",s:termBlack) call s:X("StatusLine","000000","d75f5f","bold",s:termBlack,"Red") call s:X("StatusLineNC","ffffff","626262","","White","Grey") @@ -319,7 +319,7 @@ call s:X("NonText","ffff00","","","Yellow","") call s:X("SpecialKey","000000","","",s:termBlack,"") call s:X("Search","ffffff","d75f5f","bold","White","Red") call s:X("IncSearch","87d7ff","626262","standout","Blue","Grey") -call s:X("Directory","ffff00","","","Yellow","") +call s:X("Directory","ffaf00","","","Yellow","") call s:X("Question","d75f5f","","","Red","") call s:X("ExtraWhitespace","262626","","standout",s:termBlack,"") call s:X("ErrorMsg","d75f5f","000000","standout","Red",s:termBlack) @@ -327,9 +327,9 @@ hi! link Error ErrorMsg hi! link MoreMsg Special "spell checking -call s:X("SpellBad","ff0000","","undercurl","Red","") -call s:X("SpellCap","ffd787","","undercurl","","") -call s:X("SpellLocal","ffd787","","undercurl","","") +call s:X("SpellBad","d75f5f","","undercurl","","Red") +call s:X("SpellCap","87d7ff","","undercurl","","Blue") +call s:X("SpellLocal","ffd787","","undercurl","","Yellow") "call s:X("SpellRare","","","","","") "diff diff --git a/vim/config/keyboard.vim b/vim/config/keyboard.vim index 232586f..6a999d3 100644 --- a/vim/config/keyboard.vim +++ b/vim/config/keyboard.vim @@ -18,14 +18,16 @@ " | (A) -> go to the next open tab " | (A) -> go to the previous open tab " | (V) -> indent a block in visual mode -" | (V) -> unindent a block in visual mod +" | (V) -> unindent a block in visual mode +" \\ | (N) -> show spelling suggestions popup for selection " ` | (N) -> toggle the nerdtree sidebar " ~ | (N) -> toggle the tagbar sidebar " p | (V) -> paste and replace the selection " | (N) -> paste and replace the current word " | (A) -> toggle line numbers -" | (N) -> toggle line wrapping +" | (A) -> toggle line wrapping " | (A) -> toggle row/column highlighting +" | (A) -> toggle spellcheck " | (A) -> toggle collapsed/folded rows " | (N) -> format document and return to current line " | (N) -> remove whitespace @@ -78,6 +80,9 @@ vnoremap >gv vnoremap + "move to the next and previous tabs nnoremap ':tabnew' nnoremap ':tabnext' @@ -88,24 +93,36 @@ nnoremap "_diwP "unmap F1 from help then map it to toggle the display of line numbers - nmap nnoremap ':set number!' + inoremap ':set number!a' + vnoremap ':set number!v' "toggle line wrapping (and bottom bar if using the gui) if !has("gui_running") nnoremap ':set wrap!' + inoremap ':set wrap!' + vnoremap ':set wrap!' else nnoremap ':set wrap! go'.'-+'[&wrap]."=b\r" + inoremap ':set wrap! go'.'-+'[&wrap]."=b\ra" + vnoremap ':set wrap! go'.'-+'[&wrap]."=b\rv" endif "toggle the cursor line and column nnoremap ':set cursorline! cursorcolumn!' + inoremap ':set cursorline! cursorcolumn!a' + vnoremap ':set cursorline! cursorcolumn!v' + + "toggle spellcheck + nnoremap ':set spell!' + inoremap ':set spell!a' + vnoremap ':set spell!a' "toggle folded code at foldpoints inoremap za nnoremap za onoremap za - vnoremap zf + vnoremap zav "format the document nnoremap mzgg=G`z