2 Problems I found in Windows platform - exVim 8.04

19 views
Skip to first unread message

Yong Wu

unread,
Jul 9, 2010, 3:06:32 AM7/9/10
to exVim

1. Can't make tag file in update, there is an addtional "." placed at
the the beginning of file name in step:
echo ^|- generate _filenamelist_vimfiles
sed "s,\(.*\),.\1,g" ".\%vimfiles_path%\filenamelist_cwd" >> ".\
%vimfiles_path%\_filenamelist_vimfiles"

For example, the file in filenamelist_cwd is "D:\Projects\AAA
\A.h", then in _filenamelist_vimfiles it becomes
".D:\Projects\AAA\A.h"

I suspect the problem is the sed pattern has a fault "." before
"\1".

2. Can't jump to the picked file in the results of GSF, GSFW.
The problem is that function s:exGS_Goto() in exGlobalSearch.vim
only handle the pattern:
file_name : line_num : information

Need handle the pattern in the results of GSF, GSFW:
file_name.

I have changed the code locally, and now it works fine for me.

function s:exGS_Goto() " <<<
let line = getline('.')
" initial file name
let file_name = line

" get file name
let idx = stridx(line, ":")
let bNeedSplit = idx > 0

if bNeedSplit
let file_name = strpart(line, 0, idx) " escape(strpart(line, 0,
idx), ' ')
endif

if findfile(file_name) == ''
call exUtility#WarningMsg( file_name . ' not found' )
return 0
endif

" start jump
call exUtility#GotoEditBuffer()

" if we don't start a new stack, we pop the old jump, so that the
new one
" will only take the old stack position while we are selecting our
result.
let keepjumps_cmd = ''
if !s:exGS_need_push_search_result
let keepjumps_cmd = 'keepjumps'
endif

"
if bufnr('%') != bufnr(file_name)
exe keepjumps_cmd . ' silent e ' . file_name
endif

if bNeedSplit
let line = strpart(line, idx+1)
" get line number
let idx = stridx(line, ":")
let line_num = eval(strpart(line, 0, idx))

exec keepjumps_cmd . ' call cursor(line_num, 1)'

" jump to the pattern if the code have been modified
let pattern = strpart(line, idx+2)
let pattern = '\V' . substitute( pattern, '\', '\\\', "g" )
if search(pattern, 'cw') == 0
call exUtility#WarningMsg('search pattern not found: ' .
pattern)
endif
endif

" push tag to jump stack if needed, otherwise set last jump stack
let stack_info = {}
let stack_info.pattern = getline(".")
let stack_info.file_name = bufname('%')
let cur_pos = getpos(".")
let stack_info.cursor_pos = [cur_pos[1],cur_pos[2]] " lnum, col
let stack_info.jump_method = ''
let stack_info.keyword = ''
let stack_info.taglist = []
let stack_info.tagidx = -1
if s:exGS_need_push_search_result
let s:exGS_need_push_search_result = 0
call g:exJS_PushJumpStack (stack_info)
else
call g:exJS_SetLastJumpStack (stack_info)
endif

" go back if needed
let title = '__exGS_' . s:exGS_short_title . 'Window__'
call exUtility#OperateWindow ( title, g:exGS_close_when_selected,
g:exGS_backto_editbuf, 1 )

return 1
endfunction " >>>


Anyway, it is a very good tool set. I really like it!

Wu Jie

unread,
Jul 9, 2010, 9:14:22 PM7/9/10
to exVim
Hi,

Thank you for your bug report and fixed codes, I merge it to the
dev branch in github, and will be available in next version.
About the first problem, I can't reproduce it in my local machine.
From what I see in your error report, it looks like you use absolute
path for something in exvim instead of using relate path. I guess that
is the problem. Can you give me more detail information, like the
project you create, and the settings you specific in .vimentry file.

Thanks and looking for your reply.

Wu Jie.

Yong Wu

unread,
Jul 12, 2010, 1:33:49 AM7/12/10
to exVim
I am glad the issue #2 will be fixed formally in next verison. :-)

The issue #1 is a false alarm. You provided the key point ---- the
absolute path is used. I used ****Cygwin version sed**** with gVim
(not Cygwin version), which can't proper handle the backslash in
windows directory. Change to GnuWin32 version then everything is ok.

Wu Jie

unread,
Jul 16, 2010, 11:07:05 PM7/16/10
to exVim
OK, so do you insist of using Cygwin Version Sed ? I may not going to
check the problem if the alternate way (GnuWin32 sed) is acceptable
for you :)

I don't have too much experience in using cygwin, so let me know if it
is a "must be" woking environment for you.

I need some hint for solving the problem: ( where can I get the cygwin
version sed ??? and why it use absolute path ??? )
Reply all
Reply to author
Forward
0 new messages