Skip to content

Commit

Permalink
Update Vim9Script integration
Browse files Browse the repository at this point in the history
Haven't needed those | line continuations for a long time.
  • Loading branch information
arp242 committed Nov 25, 2023
1 parent 83af492 commit f1e26cc
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions uni.vim
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
" https://github.com/arp242/uni

command! -range UnicodeName
\ let s:save = @a
\| if <count> is# -1
Expand All @@ -15,9 +17,12 @@ command! -range UnicodeName

" Vim9Script version:
" command -range UnicodeName {
" | var save = @a
" | if <count> == -1 | @a = strcharpart(strpart(getline('.'), col('.') - 1), 0, 1)
" | else | exe 'normal! gv"ay' | endif
" | echo system('uni -c i', @a)[: -2]
" | @a = save
" | }
" var save = @a
" if <count> == -1
" @a = strcharpart(strpart(getline('.'), col('.') - 1), 0, 1)
" else
" exe 'normal! gv"ay'
" endif
" echo system('uni -q i', @a)[: -2]
" @a = save
" }

0 comments on commit f1e26cc

Please sign in to comment.