DumpStr.vim : dump vimscript string to clearly see multi-byte chars, bytes, and codes of both
script karma |
Rating 7/4,
Downloaded by 1110 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Yakov Lerner |
|
script type |
utility |
|
description |
When debugging vimscript, you sometimes need to clearly see what's inside the string value: which unprintable characters it contains ? Does it contain any multibyte chars ? In which positions ?
For buffer characters, you can use 'ga' to see them clearly. To see characters of strings (variables, registers etc), you can use DumpStr.vim.
Usage:
- :source DumpStr.vim
- :call TestDumpStr() " test/demo
- :call DumpStr(string_variable)
- :call DumpStr(@Register)
When string has multi-byte characters, DumpStr prints in following format:
String length: M bytes, N chars
(string has multibyte characters) ( encoding=ENC )
Char dump: decimalCode(char) ...
Bytes: "..."
Byte dump: decimalCode(byte) ....
When string has no multi-byte characters, DumpStr dumps in this format:
String length: M bytes (no multibyte characters) ( encoding=ENC )
Bytes: "..."
Byte dump: decimalCode(byte) ....
|
|
install details |
|
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 142.132.191.50
|