Created
October 16, 2022 06:30
-
-
Save maguroguma/3a36eeb34e796930b55ffb4a95a5212a to your computer and use it in GitHub Desktop.
行Visualで指定した範囲に対して `nkf -Z0` を適用(全角英数字・記号→半角に変換)を行う
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if executable('nkf') | |
function! s:nkf(has_bang, ...) abort range | |
execute 'silent' a:firstline ',' a:lastline '!nkf -Z0' | |
endfunction | |
command! -bar -bang -range=% -nargs=? Nkf <line1>,<line2>call s:nkf(<bang>0, <f-args>) | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment