소스 검색

Add spelling mapping, fix vimrc stand alone error

<leader>z now takes the first spelling suggestion, which is usually the
best. Discovered that I had misplaced the `highlight` when pushing the
vimrc alone to a server.
Weiyi Lou 10 년 전
부모
커밋
b0d86bd2c1
3개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 0 1
      vim/settings/colorscheme-statusline.vim
  2. 2 0
      vim/settings/pandoc.vim
  3. 1 0
      vim/vimrc

+ 0 - 1
vim/settings/colorscheme-statusline.vim

@@ -57,7 +57,6 @@ endfunction
 " General colour scheme overrides.
 autocmd ColorScheme * call CustomHighlights()
 function! CustomHighlights()
-  highlight ExtraWhitespace ctermbg=red guibg=red
   " Mute spellcheck highlighting.
   " Highlights must be cleared first, or `link` will fail.
   highlight clear SpellBad   | highlight SpellBad cterm=underline

+ 2 - 0
vim/settings/pandoc.vim

@@ -11,3 +11,5 @@ let g:pandoc#syntax#conceal#use = 0
 " Write `docx` versions of `pandoc` files on save.
 let g:pandoc#command#autoexec_on_writes = 1
 let g:pandoc#command#autoexec_command = 'Pandoc docx --smart'
+
+map <leader>z 1z=

+ 1 - 0
vim/vimrc

@@ -79,6 +79,7 @@ set smarttab       " Backspace tabs where appropriate even if spaces
 if has('autocmd')
 
   " Highlight trailing whitespace
+  highlight ExtraWhitespace ctermbg=red guibg=red
   autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
   autocmd InsertLeave * match ExtraWhitespace /\s\+$/