shougo / vinarise.vim Goto Github PK
View Code? Open in Web Editor NEWUltimate hex editing system with Vim
License: Other
Ultimate hex editing system with Vim
License: Other
root@kaliProvisional:~# uname -a
Linux kaliProvisional 4.9.0-kali3-amd64 #1 SMP Debian 4.9.18-1kali1 (2017-04-04) x86_64 GNU/Linux
function <SNR>49_bitmapview_open の処理中にエラーが検出されました:
行 20:
E116: 関数の無効な引数です: vinarise#view#print_error
続けるにはENTERを押すかコマンドを入力してください
上記のエラーはvim hoge.jpg→:Vinarise→Bと操作すると表示されました。
バッファ関係?
ビットマップを表示させるにはバッファ読み込み等の操作が必要なのでしょうか?
root@kaliProvisional:~# cat .vimrc
"NeoBundle Scripts-----------------------------
if &compatible
set nocompatible " Be iMproved
endif
" Required:
set runtimepath+=/root/.vim/bundle/neobundle.vim/
" Required:
call neobundle#begin(expand('/root/.vim/bundle'))
" Let NeoBundle manage NeoBundle
" Required:
NeoBundleFetch 'Shougo/neobundle.vim'
" Add or remove your Bundles here:
NeoBundle 'Shougo/neosnippet.vim'
NeoBundle 'Shougo/neosnippet-snippets'
NeoBundle 'tpope/vim-fugitive'
NeoBundle 'ctrlpvim/ctrlp.vim'
NeoBundle 'flazz/vim-colorschemes'
NeoBundle 'Shougo/vinarise.vim'
" You can specify revision/branch/tag.
NeoBundle 'Shougo/vimshell', { 'rev' : '3787e5' }
" Required:
call neobundle#end()
" Required:
filetype plugin indent on
" If there are uninstalled bundles found on startup,
" this will conveniently prompt you to install them.
NeoBundleCheck
"End NeoBundle Scripts-------------------------
root@kaliProvisional:~#
Thanks for this really wonderful plugin! I don't even know this before. Uploading it to vim.org make more people know it.
Reproducable ways:
E
mapping. Example, "utf-8".It is multibyte convertion error in get_chars()
in vinarise.py. But I cannot fix it...
Note: I think it is if_python3 only problem
標題のとおり :VinariseDump が動作せずに「E177: 未知の関数です: vinarise#dump#open」 というエラメッセージが表示されます。
https://github.com/Shougo/vinarise.vim/blob/master/plugin/vinarise.vim#L127
現状、vinarise#dump#open()が存在しないのでエラーになります。
私的意見として、lines[0] =~ '\%(^.ELF\|!<arch>\|^MZ\)'
の場合でもcall s:call_vinarise({'overwrite' : 1}, path)
を呼ぶようなオプションかなにかが在るといいと思います。
cd /tmp/test
echo test > test.txt
vim test.txt [everything just okay]
echo whatever > Prelude
vim test.txt [error messages, and vim cannot normally use anymore]
"test.txt" 1L, 5C
Error detected while processing /private/tmp/test/prelude:
line 1:
E492: Not an editor command: whatever
Error detected while processing function vital#of..vital#_cef2359#new..<SNR>139_load:
line 20:
E171: Missing :endif
Press ENTER or type command to continue"
主要文字コードでこれだけ未対応のため。
ただし実装は大変。
Hi, after last update, this error is shown when opening some files (I have let g:vinarise_enable_auto_detect = 1):
Error detected while processing function 25_browse_check:
line 21:
E691: Can only compare List with List
E15: Invalid expression: head =~# '[\x00-\x08\x10-\x1a\x1c-\x1f]{2,}' || (g:vinarise_detect_large_file_size > 0 && getfsize(path
) > g:vinarise_detect_large_file_size)
ファイルのエンコーディングを自動で判別してくれると嬉しいです。
vimfilerから開かれた場合どうするのか分かりませんが、ファイルを開いている状態で:Vinariseされた場合、&fencを見ればいいのではないでしょうか。
Pressing B
in a vinarise
buffer throws the following errors.
Error detected while processing function <SNR>149_bitmapview_open..<SNR>149_print_lines:
line 9:
E716: Key not present in Dictionary: width
E15: Invalid expression: address / b:bitmapview.width
line 18:
E716: Key not present in Dictionary: width
E15: Invalid expression: b:bitmapview.vinarise.filesize / b:bitmapview.width
line 20:
E121: Undefined variable: max_lines
E15: Invalid expression: max_lines > line_address + a:lines
line 23:
E121: Undefined variable: max_lines
E15: Invalid expression: max_lines - line_address < winheight(0) && line('$') < winheight(0) && line_address != max_lines
line 28:
E121: Undefined variable: line_address
E15: Invalid expression: line_address < 0
line 31:
E121: Undefined variable: line_address
E116: Invalid arguments for function range(line_address, max_lines)
E15: Invalid expression: range(line_address, max_lines)
line 35:
E121: Undefined variable: line_numbers
E15: Invalid expression: line_numbers
Error detected while processing function <SNR>149_bitmapview_open..<SNR>149_set_cursor_address:
line 1:
E716: Key not present in Dictionary: width) * b:bitmapview.width
E15: Invalid expression: (a:address / b:bitmapview.width) * b:bitmapview.width
line 2:
E121: Undefined variable: line_address
E116: Invalid arguments for function printf('%08x: .\{%d}', line_address, a:address - line_address + 1), 'cew')
E116: Invalid arguments for function searchpos( printf('%08x: .\{%d}', line_address, a:address - line_address + 1), 'cew')
E15: Invalid expression: searchpos( printf('%08x: .\{%d}', line_address, a:address - line_address + 1), 'cew')
line 4:
E121: Undefined variable: lnum
E116: Invalid arguments for function cursor
Press ENTER or type command to continue
The hexript repository does not exist anymore:
https://github.com/rbtnn/hexript.vim
I didn't find any fork on github. I think the (vinarise )plugin should be updated.
Cannot undo using u
in a vinarise buffer.
編集中に Gで行末に飛んだ時、
このように行番号がターミナルの大きさの行数表示のままで止まります。
環境は OSX 10.9.2 macvim 7.4.161
if has('vim_starting')
set nocompatible " Be iMproved
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
call neobundle#rc(expand('~/.vim/bundle/'))
" Let NeoBundle manage NeoBundle
NeoBundleFetch 'Shougo/neobundle.vim'
NeoBundle 'Shougo/vinarise'
filetype plugin indent on " Required!
NeoBundleCheck
set number
で起こりました。
When I do :Gstatus
Vinarise opens it as a binary file, filetype remains gitcommit
though.
I've got g:vinarise_enable_auto_detect
to 1
.
この機能はとても重要だが、Vimが64bit整数に完全に対応しないと実装は無理である。
今はまだ保留にしておく必要がある。
I do not install unite. It seems that vinarise uses some of its function so I got runtime error.
We cannot use binary files with vinarise.
Example file:
https://www.dropbox.com/s/xcbamnx8wmpllsw/main.pdf
I confirmed the issue with the latest version of vinarise, vimfiler, unite.
To reproduce:
Open vimfiler.
Press B ((vimfiler_edit_binary_file)) on the pdf file.
Vim gets stuck
Windows 7 64bit, 64bit vim, installed vinarise with plug.vim.
Has python 2 & 3 installed, added these lines to vimrc
let $PYTHONHOME='D:\Python27'
let $PYTHON_HOME='D:\Python27'
let $PYTHONPATH='D:\Python27\Lib'
When execute :Vinarise, vim will crash saying "... has stopped working" .
The log:
continuing in function <SNR>14_call_vinarise[3]..vinarise#init#start
line 13:
line 14: if empty(context.bytes)
line 15: if filename == ''
line 16: let filename = bufname('%')
line 17: if &l:buftype =~ 'nofile'
line 18: call vinarise#view#print_error( '[vinarise] Nofile buffer is detected. This operation is invalid.')
line 20: return
line 21: elseif &l:modified
line 22: call vinarise#view#print_error( '[vinarise] Modified buffer is detected! This operation is invalid.')
line 24: return
line 25: endif
line 26: endif
line 27:
line 28: if !filereadable(filename)
line 29: call vinarise#view#print_error( '[vinarise] File "'.filename.'" is not found.')
line 31: return
line 32: endif
line 33:
line 34: let filesize = getfsize(filename)
line 35: if filesize == 0
line 36: call vinarise#view#print_error( '[vinarise] File "'.filename.'" is empty. '. 'vinarise cannot open empty file.')
line 39: return
line 40: endif
line 41: else
line 42: let filesize = len(context.bytes)
line 43: endif
line 44:
line 45: if context.encoding !~? vinarise#multibyte#get_supported_encoding_pattern()
calling function <SNR>14_call_vinarise[3]..vinarise#init#start[45]..vinarise#multibyte#get_supported_encoding_pattern()
line 1: " Ascii only.
line 2: return '^\%('.join(vinarise#multibyte#get_supported_encoding_list(), '\|').'\)$'
calling function <SNR>14_call_vinarise[3]..vinarise#init#start[45]..vinarise#multibyte#get_supported_encoding_pattern[2]..vinarise#multibyte#get_supported_encoding_list()
line 1: " Ascii only.
line 2: return (v:version < 703) ? ['latin1'] : ['latin1', 'utf-8', 'cp932', 'euc-jp', 'utf-16le', 'utf-16be', 'ucs-2le', 'ucs-2be']
function <SNR>14_call_vinarise[3]..vinarise#init#start[45]..vinarise#multibyte#get_supported_encoding_pattern[2]..vinarise#multibyte#get_supported_encoding_list returning ['latin1', 'utf-8', 'cp932', 'euc-jp'...16le', 'utf-16be', 'ucs-2le', 'ucs-2be']
continuing in function <SNR>14_call_vinarise[3]..vinarise#init#start[45]..vinarise#multibyte#get_supported_encoding_pattern
function <SNR>14_call_vinarise[3]..vinarise#init#start[45]..vinarise#multibyte#get_supported_encoding_pattern returning '^\%(latin1\|utf-8\|cp932\|euc-jp\|utf-16le\|utf-16be\|ucs-2le\|ucs-2be\)$'
continuing in function <SNR>14_call_vinarise[3]..vinarise#init#start
line 47: call vinarise#view#print_error( '[vinarise] encoding type: "'.context.encoding.'" is not supported.')
line 49: return
line 50: endif
line 51:
line 52: if !s:loaded_vinarise
line 53: execute s:pyfile s:plugin_path.'/vinarise.py'
line 53: py3file P:\\Vim_test\\vimfiles\\bundle\\vinarise.vim\\autoload\\vinarise/vinarise.py
If I execute py3file vimfiles\bundle\vinarise.vim\autoload\vinarise\vinarise.py, it will crash as well.
But when I use vinarise in mingw64, it works perfectly fine.
What seems to be the problem? Thanks!
I've added let g:vinarise_enable_auto_detect = 1
to my .vimrc
. Then I tried opening file with and without .bin
extension and with passing and not passing -b
flag to Vim.
I every case Vinarise has never opened automatically.
Although g:vinarise_detect_large_file_size
works properly.
P.S. Is there a possibility to add a variable to change the number of bytes displayed in one line?
The path to the file is ~/irclogs/ims/&bitlbee.log
, the other log files are opened as text, correctly.
Currently, when reload a binary file, the cursor will be put at the start of the file; could the cursor position be kept when reload file?
This plugin is very useful, thanks for your work!
Hi
After Hide vinarise buffer , how can i return that Vinarise buffer ?
I read help document carefully, but can find anything help.
I guess I need to
: Vinarise
to reopen binary in Vinarise hex mod after press ??
有名バイナリエディタの Stirlling がよく使われている理由の一つ。
ただし、実装は難しい。
vimfilerのように別ウインドウのvinariseを操作できる必要がある。
色のハイライトも大変だ。
If you search string by g/
mapping, errors are occurred.
Related issue: #18
Note: I think it is if_python3 only problem
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.