diff --git a/plugin/dumpx.vim b/plugin/dumpx.vim index c8cb321..ce0a58f 100644 --- a/plugin/dumpx.vim +++ b/plugin/dumpx.vim @@ -21,10 +21,6 @@ if !exists('g:dumpxCFLAGS') let g:dumpxCFLAGS = '' endif -if !exists('g:dumpxYCM') - let g:dumpxYCM='default' -endif - "mode 0 == only assembly "mode 1 == mix C and assembly and jump "mode 2 == only assembly current line of source @@ -32,10 +28,6 @@ if !exists('g:dumpxMode') let g:dumpxMode = 1 endif -function! DumpXAutoFlags() - let g:dumpxCFLAGS = system('~/.vim/bundle/dumpx/plugin/autoycm.pl ' . g:dumpxYCM) -endfunction - "create new window and puts mix C code and assembly, go to current line function! DumpX(where) let l:cbl=line('.') @@ -50,7 +42,7 @@ function! DumpX(where) let l:filter = " | awk '/[ \t]*" . l:cbl . ":[a-zA-Z0-9_\/]*/{flag=1;next}/[ \t]*" . l:ncbl . ":[a-zA-Z0-9_\/]*/{flag=0}flag'" endif - let @a = system( g:dumpxCC . ' -g ' . g:dumpxCFLAGS . ' -Wa,' . l:asmode . ' -c ' . expand('%:p') . ' -o /tmp/vim.dumpx.' . expand('%') . l:filter) + let l:asm = system( g:dumpxCC . ' -g ' . g:dumpxCFLAGS . ' -Wa,' . l:asmode . ' -c ' . expand('%:p') . l:filter) if a:where ==# "down" below new @@ -62,14 +54,12 @@ function! DumpX(where) new endif setlocal buftype=nofile bufhidden=hide noswapfile - normal! G - execute "put a" + execute "put =l:asm" + 1d setf dumpx - "call cursor(1,1) - - if g:dumpxMode == 1 + if g:dumpxMode == 2 execute '?[ \t]*' . l:cbl . ':[a-zA-Z0-9_\/]*' . expand('%') . '/' normal! zt endif @@ -84,7 +74,4 @@ command DumpXRight :call DumpX('right') command DXR :call DumpX('right') command DumpXLeft :call DumpX('left') command DXL :call DumpX('left') -command DXAF :call DumpXAutoFlags() - - - +command DX :call DumpX('')