我正在调查一个主要使用UTF-8编码的文件,其中有很多长行。但是,该文件并非完全是文本文件,其中还包含一些无用信息。为了找到我的兴趣点,我正在使用hd
和grep
工具。
因此,当我知道自己对0000301a感兴趣时,我想快速在Vim中打开文件并跳转到那个位置。
例如(这实际上是一个很小的文件,这里的位置是0000001c):
me@here:~$ hd file | grep -C 10 \ 00\
00000000 6c 69 6e 65 31 0a 6c 69 6e 65 32 0a 6c 69 6e 65 |line1.line2.line|
00000010 33 0a 6c 69 6e 65 34 0a 6c 69 6e 65 00 35 0a 6c |3.line4.line.5.l|
00000020 69 6e 65 36 0a 6c 69 6e 65 37 0a 6c 69 6e 65 38 |ine6.line7.line8|
00000030 0a 6c 69 6e 65 39 0a 6c 69 6e 65 31 30 0a |.line9.line10.|
0000003e
me@here:~$
Vim中有没有技巧可以跳转到字节位置?或尽可能接近它?
:goto 1234
? - Kyle G.