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:
parent
b646776e33
commit
f3742c74e8
1 changed files with 31 additions and 0 deletions
31
plugin/dumbchars.vim
Normal file
31
plugin/dumbchars.vim
Normal 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()
|
Loading…
Add table
Add a link
Reference in a new issue