vim-dumbchars/plugin/dumbchars.vim
Josh Sherman f3742c74e8
Add commands and some of the replacements
Still need to get my hands on a character map of the dash replacements
2018-12-28 23:35:33 -06:00

31 lines
616 B
VimL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

" Smart Dashes
" En Dash => -
" Em Dash — => --
" Figure Date => -
" Hyphen-Minus - => -
" Hyphen => -
" Minus Sign => -
function! DumbChars() abort
call DumbDashes()
call DumbEllipses()
call DumbQuotes()
endfunction
function! DumbDashes() abort
endfunction
function! DumbEllipses() abort
%s/…/.../g
endfunction
function! DumbQuotes() abort
%s/\|/'/g
%s/“\|”/"/g
endfunction
command! -bar DumbChars call DumbChars()
command! -bar DumbDashes call DumbDashes()
command! -bar DumbEllipses call DumbEllipses()
command! -bar DumbQuotes call DumbQuotes()