Add commands and some of the replacements

Still need to get my hands on a character map of the dash replacements
This commit is contained in:
Josh Sherman 2018-12-28 23:35:33 -06:00
parent b646776e33
commit f3742c74e8
No known key found for this signature in database
GPG key ID: 55B058A80530EF22

31
plugin/dumbchars.vim Normal file
View file

@ -0,0 +1,31 @@
" 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()