Git Product home page Git Product logo

vimproc.vim's Introduction

vimproc

GitHub Build Status GitHub Release

vimproc is a great asynchronous execution library for Vim. It is a fork of proc.vim by Yukihiro Nakadaira. I added some features and fixed some bugs and I'm maintaining it now. Instead of an external shell (example: 'shell'), vimproc uses an external DLL file.

Supported platforms:

  • Windows 32/64bit (Compiled by MinGW or Visual Studio)
  • macOS (10.5 or later)
  • Linux
  • Cygwin
  • Solaris
  • BSD (but cannot check)
  • Android (experimental)

Not supported platforms:

  • Other UNIX platforms

Install

Manual Install

  • Clone this repo
  • Build vimproc's native extensions (see Building for details)
  • Copy autoload/*, lib/* and plugin/* files to your 'runtimepath' directory (see :help runtimepath).

dein.vim

If you use dein.vim, you can update and build vimproc automatically. This is the recommended package manager.

call dein#add('Shougo/vimproc.vim', {'build' : 'make'})

Vim-Plug

If you use vim-plug, you can update and build vimproc automatically.

Plug 'Shougo/vimproc.vim', {'do' : 'make'}

Vundle

If you use Vundle, add the following to your .vimrc.

Plugin 'Shougo/vimproc.vim'

Then compile the plugin manually where it was installed.

i.e. on Linux & Mac

$ cd ~/.vim/bundle/vimproc.vim && make

See building

NeoBundle

If you use neobundle.vim, you can update and build vimproc automatically.

NeoBundle 'Shougo/vimproc.vim', {
\ 'build' : {
\     'windows' : 'tools\\update-dll-mingw',
\     'cygwin' : 'make -f make_cygwin.mak',
\     'mac' : 'make',
\     'linux' : 'make',
\     'unix' : 'gmake',
\    },
\ }

Pathogen

vimproc uses a pathogen compatible structure, so it can be managed with pathogen, however you must remember to compile after cloning the repo.

git clone https://github.com/Shougo/vimproc.vim.git ~/.vim/bundle/vimproc.vim
cd ~/.vim/bundle/vimproc.vim
make

Building

Note: You must use GNU make to build vimproc.

You can install the dll using |VimProcInstall|. If you are having any trouble or want to build manually then read on.

Linux

$ make

macOS

Note: Users of macOS 10.15 (Catalina) cannot directly use this library with the system-provided vi. (SIP prevents binaries in the write-only /usr/bin directory from calling dlopen on unsigned libraries like vimproc_mac.so.) The simplest solution is to build or install another version of vi in a non-SIP protected location. For example, using homebrew, brew install vim (or nvim) will install an unrestricted executable in /usr/local/bin. (Don't forget to set up aliases or $PATH so that you don't accidentally invoke the system vi.)

$ make

Note: If you want to build for multiple architectures, you can use ARCHS and CC variables.

Build for i386 and x86-64:

$ make ARCHS='i386 x86_64'

FreeBSD

$ gmake

If you want to use BSD make, use the platform specific makefile:

$ make -f make_bsd.mak

Solaris

$ gmake

Note: If you want to use Sun Compiler, you can use SUNCC variable.

$ gmake SUNCC=cc

Windows

Note: In Windows, using MinGW is recommended. Note: If you have not "gcc" binary, you must change $CC value.

Windows using MinGW (32bit Vim):

$ mingw32-make -f make_mingw32.mak

Windows using MinGW (If you want to use MinGW compiler in Cygwin):

$ mingw32-make -f make_mingw32.mak CC=mingw32-gcc

Windows using MinGW (64bit Vim):

$ mingw32-make -f make_mingw64.mak

Windows using Visual Studio (32bit/64bit Vim):

$ nmake -f make_msvc.mak

You should run this from VS command prompt. The architecture will be automatically detected, but you can also specify the architecture explicitly. E.g.:

32bit: nmake -f make_msvc.mak CPU=i386
64bit: nmake -f make_msvc.mak CPU=AMD64

Cygwin:

$ make

Note: The vimproc_cygwin.dll compiled in Cygwin won't work with Windows Vim.

Windows Binaries

vimproc.vim's People

Contributors

akiradeveloper avatar amaisaeta avatar anekos avatar aycabta avatar bohrshaw avatar coacher avatar crazymaster avatar csexton avatar eiiches avatar frasertweedale avatar ichizok avatar jiangjianshan avatar k-takata avatar koron avatar mattn avatar miettal avatar rbtnn avatar rhysd avatar shougo avatar sulami avatar sydney-o9 avatar syngan avatar tarrasch avatar thinca avatar todashuta avatar tseeker avatar tsuyoshicho avatar tyru avatar ujihisa avatar wonderful-panda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vimproc.vim's Issues

set wildignore+=*.exe していると vimproc#util#expand() で *.exe のパスを展開しなくなる

Vim にも neocomplcache も仕様通り(?)の動きをしているので厳密には不具合ではないかもしれませんが、

:e の補完対象から実行ファイルを省く目的で、set wildignore+=*.exeを設定していると、vimproc#util#expand()に対し、*.exe を渡すとパスの展開をしなくなり、空文字列''が返るようになります。

その結果、VimProcBang lsはOKでVimProcBang ls.exe でエラー出力されたり、vimshellのlsでエラー出力されたり、neocomplcacheの autocmd BufWirtePost に設定してある s:check_buffer() がエラーになったりします。

expand()の第2引数に非ゼロの値を指定すれば wildignore を無視して展開してくれるようになるので、修正して頂けませんか?

diff --git a/autoload/vimproc/util.vim b/autoload/vimproc/util.vim
index 2ca2575..53607cd 100644
--- a/autoload/vimproc/util.vim
+++ b/autoload/vimproc/util.vim
@@ -58,7 +58,7 @@ function! vimproc#util#stderrencoding()"{{{
         \ g:stderrencoding : vimproc#util#termencoding()
 endfunction"}}}
 function! vimproc#util#expand(path)"{{{
-  return expand(escape(a:path, vimproc#util#is_windows() ? '*?"={}' : '*?"]'))
+  return expand(escape(a:path, vimproc#util#is_windows() ? '*?"={}' : '*?"]'), 1)
 endfunction"}}}
 function! vimproc#util#is_windows()"{{{
   return s:is_windows

Get following error message.

function neocomplete#handler#_do_auto_complete..neocomplete#complete#_set_results_pos..neocomplete#helper#call_hook..211..217_check_source..217_make_cache_current_bl
ock..217_make_cache_current_buffer..217_make_cache..neocomplete#cache#async_load_from_file..239_async_load..vimproc#system_bg..vimproc#pgroup_open..223_pgr
oup_open, line 2
Vim(let):E121: Undefined variable: statement

Windows環境でパイプが動作しません

以前は動作していたはずなんですが、最新版で確認したところ、次の単純なコマンドが動作していなくなっていました。
ちなみに、Linuxでは動作することを確認済み。

% ls | cat
!!!"C:/Program Files (x86)/Git/bin/cat.exe": -: Bad file number!!!
!!!"C:/Program Files (x86)/Git/bin/cat.exe": -: Bad file number!!!
!!!!!!!!!vimshell: exit 1 "ls|cat"!!!

Windows 7 64bit環境の32bit GVim上で確認。

Bad file numberについては、Webを参照したところ、
http://docs.oracle.com/cd/E19455-01/806-2720/msgs-91/index.html

ファイル記述子がオープンファイル以外を参照しているか、または書き込み (または読み取り) 専用に開かれたファイルに対して read(2) - または write(2) - 要求が実行されました。
ということらしいです。

catに渡されているファイル記述子(パイプ)がおかしいのだと思いますが、ソースコードを読んでいてもどこがおかしいのかわかりません。原因がつかめないため、こうしてIssuesに登録することにしました。Windowsのプロセス管理に詳しい人(特にmattnさん)にコードをチェックして欲しいのですが……。C言語側のソースコード(autoload/proc_w32.c)が悪いのはほぼ間違い無いです。

ちなみに、vimshellからプログラムの出力が読めるし、入出力のリダイレクションも動作することは確認済みです。

Compile in Windows

I can't compile with VC 2005:
-Fdautoload\ -Foautoload\ autoload\proc_w32.c
'-Fdautoload' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: '-Fdautoload' : return code '0x1'
Stop.

But I can compile in Cygwin.

Thanks

新しい正規表現エンジンだと、vimprocが動かない

Vim 9.3.970以降で追加される新しい正規表現エンジンを使用すると、vimprocの挙動がおかしいという報告がいくつか上がっています。

Shougo/unite.vim#223

ただし、上記のIssueは私の環境で再現していません。

私の環境では、vim-versionsを用いてコミットするときに固まるという現象が発生しました。
:set re=1とすると発生せず。
-> vimproc関係ありませんでした
-> 7.3.1005で修正済み

Vim 7.3.1004で確認。

readdirでのファイルパスのフィルタの不具合

https://github.com/Shougo/vimproc.vim/blob/master/autoload/vimproc.vim#L809

この行の置換により,例えば

/home/yuuki/tmp/t/test.pl

のようなパスが

/home/yuuki/tmp/test.pl

に変換されてしまいます.
問題が起こるのはディレクトリ名が1文字のものがパスに含まれている場合です.

この行の処理の意図が理解できておらず,どのように直せばよいかわからなかったので,とりあえず報告だけしておきます.

よろしくお願い致します.

Windows7 で、「set encoding=sjis」とすると、 g:vimproc_dll_path のセパレータが '?' になる。

現象

Windows7 64bit で、「set encoding=sjis」とすると、 g:vimproc_dll_path のセパレータが '?' になり、
VimShell などの実行に失敗します。
パスを sjis 変換してバックスラッシュが '?' になっている感じでしょうか?

  • .vimrc or .gvimrc に書くと化ける
  • 起動後、「:set encoding=sjis」としても化けない
  • 最後のセパレータだけ化けていない

以下、 echo g:vimproc_dll_path の実行結果

C:?Users?mikoto?.vim?bundle?vimproc?autoload/vimproc_win64.dll

確認環境

Windows7 64bit, vim, gvim で確認。
2012/08/29 1:40 に 「Unite neobundle/update」 実行。

wrong ELF class: ELFCLASS32 on Arch Linux

My system environment is:

Arch Linux (latest)
Vim version 
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Dec  8 2012 16:47:21)
Included patches: 1-754
Compiled by ArchLinux
Big version with GTK2 GUI.  Features included (+) or not (-):
function <SNR>280_vp_dlopen..<SNR>280_libcall, line 4                                                     
Vim(let):dlerror = "/home/chris/Git/dotfiles/.vim/bundle/vimproc/autoload/vimproc_unix.so: wrong ELF class
: ELFCLASS32"                                                                                             
Error occured in source's initialize()!                                                                   
Source name is buffer_complete 

-------------------------------------------------
Error detected while processing function <SNR>285_check_buffer..<SNR>285_initialize_include..neocomplcache
#cache#async_load_from_tags..vimproc#system_bg..vimproc#popen3..<SNR>280_plineopen..<SNR>280_vp_pipe_open.
.<SNR>280_libcall:                                                                                        
line    4:                                                                                                
dlerror = "/home/chris/Git/dotfiles/.vim/bundle/vimproc/autoload/vimproc_unix.so: wrong ELF class: ELFCLAS
S32"                                                                                                      
E364: Library call failed for "vp_pipe_open()"                                                            
Error detected while processing function <SNR>285_check_buffer..<SNR>285_initialize_include..neocomplcache
#cache#async_load_from_tags..vimproc#system_bg..vimproc#popen3..<SNR>280_plineopen..<SNR>280_vp_pipe_open:

line    9:                                                                                                
E688: More targets than List items                                                                        
line   13:                                                                                                
E121: Undefined variable: fdlist                                                                          
E116: Invalid arguments for function len(fdlist)                                                          
E15: Invalid expression: a:npipe != len(fdlist)                                                           
line   19:                                                                                                
E121: Undefined variable: pid                                                                             
E15: Invalid expression: [pid] + fdlist                                                                   
Error detected while processing function <SNR>285_check_buffer..<SNR>285_initialize_include..neocomplcache
#cache#async_load_from_tags..vimproc#system_bg..vimproc#popen3..<SNR>280_plineopen:                       
line   74:                                                                                                
E714: List required                                                                                       
line   79:                                                                                                
E121: Undefined variable: pid                                                                             
E116: Invalid arguments for function add                                                                  
line   80:                                                                                                
E121: Undefined variable: fd_stdin                                                                        
E116: Invalid arguments for function s:fdopen(fd_stdin, 'vp_pipe_close', 'vp_pipe_read', 'vp_pipe_write') 
E15: Invalid expression: s:fdopen(fd_stdin, 'vp_pipe_close', 'vp_pipe_read', 'vp_pipe_write') 

E116: Invalid arguments for function add                                                                  
line   97:                                                                                                
E684: list index out of range: -1                                                                         
E15: Invalid expression: stdout_list[-1].fd                                                               
line  103:                                                                                                
E684: list index out of range: -1                                                                         
E15: Invalid expression: pid_list[-1]                                                                     
Error detected while processing function <SNR>285_check_buffer..<SNR>285_initialize_include..neocomplcache
#cache#async_load_from_tags..vimproc#system_bg..<SNR>280_close_all..<SNR>280_close..<SNR>280_vp_pipes_fron
t_close:                                                                                                  
line    1:                                                                                                
E684: list index out of range: 0                                                                          
Error detected while processing function <SNR>285_check_buffer..<SNR>285_initialize_include..neocomplcache
#cache#async_load_from_tags..vimproc#system_bg..<SNR>280_close_all..<SNR>280_close..<SNR>280_vp_pipes_back
_close:                                                                                                   
line    1:                                                                                                
E684: list index out of range: 0                                                                          
Error detected while processing function <SNR>285_check_buffer..<SNR>285_initialize_include..neocomplcache
#cache#async_load_from_tags..vimproc#system_bg:                                                           
line   11:                                                                                                
E716: Key not present in Dictionary: pid                                                                  
E15: Invalid expression: subproc.pid                                                                      
Error detected while processing function <SNR>285_check_buffer..<SNR>285_initialize_include..neocomplcache
#cache#async_load_from_tags..<SNR>278_async_load..vimproc#system_bg..vimproc#popen3..<SNR>280_plineopen..<
SNR>280_vp_pipe_open..<SNR>280_libcall:                                                                   
line    4:                                                                                                
dlerror = "/home/chris/Git/dotfiles/.vim/bundle/vimproc/autoload/vimproc_unix.so: wrong ELF class: ELFCLAS
S32"                                                                                                      
E364: Library call failed for "vp_pipe_open()"                                                            
Error detected while processing function <SNR>285_check_buffer..<SNR>285_initialize_include..neocomplcache
#cache#async_load_from_tags..<SNR>278_async_load..vimproc#system_bg..vimproc#popen3..<SNR>280_plineopen..<
SNR>280_vp_pipe_open:                         

mingw makefile doesn't make a useable file.

I use a 64-bit vim on win64. The mingw makefile does not procedure a usable binary file. I got Library call failed for "vp_pipe_open()" runtime error when I try to do manual complete in neocomplcache. The provided precompiled file work smoothly.

Not work in MSYS/MinTTY/Vim.

Not work in MSYS/MinTTY/Vim.

I use "make -f make_mingw32.mak" in cmd. I set "is_windows=1" and "is_cygwin=0"

Then I try use exemple:

  • "Socket open test." - working
  • "Pipe open test." - not working, return:
    Error detected while processing function vimproc#popen2..27_plineopen..27_convert_args..vimpro
    c#get_command_name:
    line 15:
    E605: Exception not caught: vimproc#get_command_name: File "ls" is not found.
    Error detected while processing function vimproc#popen2..27_plineopen:
    line 52:
    E170: Missing :endfor
  • "Socket open test" - not working, return:
    Error detected while processing function vimproc#fopen..27_vp_file_open..27_libcall:
    line 16:
    E605: Exception not caught: vimproc: vp_file_open: ['open() error: No such file or directory']

Sorry for my English.

Please re-compile it.

Ubuntu12.04でvim(7.3.429)を使っています。
vimprocをアップデートしたところ、"Please re-compile it."というエラーが表示されるようになってしまいました。
一度vimprocを再インストールして"make -f gcc_unix.mak"しなおしてみましたが、エラーは解消されませんでした。
また、vimshellは正常に動作するので、単にエラーメッセージだけ表示されてしまっているかんじです。

問題箇所は以下の部分です。

vimproc/autoload/vimproc.vim
1398:  call s:print_error('Please re-compile it.')

vp_readdir()で"/"を入力するとリストの内容が"//**/name"になる

vimfilerで使用しているのですが、vp_readdir()に"/"を入力するとパスの先頭が"//"となるリストになります。

ローカルではパッチで、dp取得後にdirnameの末尾に"/"が付いていたら'\0'詰めするようにしています。

お時間ありましたら、設計に合わせた修正をお願い出来ますでしょうか?

VimProcのバグか、仕様側のバグか分からない

alpaca_tags(developmentブランチ)にて、vimprocを使っています。
その中でエラーが出ることがあるのですが、どうやらvimprocの分かりにくいバグのような気がします。
vimprocの内部構造が複雑なので、何かアタリをつけて調べたいです。アドバイスをお願いします。

発生状況

  1. alpaca_tagsでは、保存の度にvimprocを通して非同期にtagsを自動生成している。
  2. 生成の度に、vimprocで生成したオブジェクトを監視するaugroupautocmdを生成する。そして、CursorHoldのタイミングでジョブが完了したか確認している。
  3. Vimを起動してかなりの時間が経ったときに、vimprocが使えなくなり最下部に表示するエラーが出る。(vimprocを使ったtagsの生成を、かなりの回数を行うことが発生原因だと思われる)

バグの原因の予想

  • vimproc内で、ジョブの生成が一定数を超えるとうまく挙動しない?
  • vimprocでファイルを指定した場合のジョブが、ファイルを解放していない?
  • Vim内で、augroupの生成・削除を繰り返しているが、それがメモリに悪い影響がある?

お手数ですが、よろしくお願いします。

Error detected while processing function alpaca_tags#create_tags#update..alpaca_tags#util#system..vim
proc#popen2..<SNR>146_plineopen..<SNR>146_convert_args..vimproc#get_command_name:
line   15:
E605: Exception not caught: vimproc#get_command_name: File "/Users/alpaca/.bundle/alpaca_tags_develop
ment/bin/create_tags_into_git" is not found.
Error detected while processing function alpaca_tags#create_tags#update..alpaca_tags#util#system..vim
proc#popen2..<SNR>146_plineopen:
line   52:
E170: Missing :endfor
Error detected while processing function alpaca_tags#create_tags#update..alpaca_tags#util#system:
line   10:
E171: Missing :endif

screen shot 2013-08-28 at 10 58 03 pm

※もちろん、表示されているファイルは存在します。

Have make detect platform and build appropriately

I started working on this functionality, but wanted to ask before I sent a pull. We could have the Makefile detect the platform and build appropriately. Or is there a reason to keep these in separate files?

Seems like it would be ideal to just run make in the root of the directory for each platform.

Some tests failed.

I Use Vim 7.3 for Windows (official distribution) on Windows XP SP3.
vimproc_win32.dll is built by mingw32-make 3.82.90.

>mingw32-make --version
GNU Make 3.82.90
Built for i686-pc-mingw32
Copyright (C) 1988-2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

>mingw32-make -f make_mingw32.mak

I tested vimproc using minimum rc file ( https://gist.github.com/AmaiSaeta/5229154 ).

> vim -u ~/test.vimrc

vesting log is...

Sources: vesting:.:test-functions (3/3), vesting:.:test-lexer (9/9), vesting:.:test-parser (10/10), vesting:.:test-popen (2/2), vesting:.:test-socket (6/6), vesting:.:test-fopen (7/7), vesting:.:test-system (2/2)
[vesting] ./vest/test-functions.vim: OK = 2, Fail = 0, Error = 0
[vesting] ./vest/test-lexer.vim: OK = 8, Fail = 0, Error = 0
[vesting] ./vest/test-parser.vim: OK = 8, Fail = 0, Error = 1
[vesting] ./vest/test-popen.vim: OK = 0, Fail = 0, Error = 1
[vesting] ./vest/test-socket.vim: OK = 2, Fail = 3, Error = 0
[vesting] ./vest/test-fopen.vim: OK = 6, Fail = 0, Error = 0
[vesting] ./vest/test-system.vim: OK = 0, Fail = 0, Error = 1
> 
- vesting   [Vest]  ./vest/test-functions.vim                                  
- vesting   [OK]    .                                                          
- vesting   [OK]    .                                                          
- vesting   [Vest]  ./vest/test-lexer.vim                                      
- vesting   [OK]    .                                                          
- vesting   [OK]    .                                                          
- vesting   [OK]    .                                                          
- vesting   [OK]    .                                                          
- vesting   [OK]    .                                                          
- vesting   [OK]    .                                                          
- vesting   [OK]    .                                                          
- vesting   [OK]    .                                                          
- vesting   [Vest]  ./vest/test-parser.vim                                     
- vesting   [OK]    .                                                          
- vesting   [OK]    .                                                          
- vesting   [OK]    .                                                          
- vesting   [OK]    .                                                          
- vesting   [OK]    .                                                          
- vesting   [OK]    .                                                          
- vesting   [OK]    .                                                          
- vesting   [OK]    .                                                          
- vesting + [Error] C:\Documents and Settings\AmaiSaeta\vimbundles\vimproc\ves~ 
- vesting |   t\test-parser.vim:0: function vimproc#parser#split_args..<SNR>5~ 
- vesting |   1_parse_double_quote..<SNR>51_parse_back_quote..vimproc#system.~ 
- vesting |   .<SNR>46_system..vimproc#pgroup_open..<SNR>46_pgroup_open..vimp~ 
- vesting |   roc#plineopen3..<SNR>46_plineopen..<SNR>46_convert_args..vimpro~ 
- vesting   [Vest]  ./vest/test-popen.vim                                      
- vesting + [Error] C:\Documents and Settings\AmaiSaeta\vimbundles\vimproc\ves~ 
- vesting |   t\test-popen.vim:0: function vimproc#popen2..<SNR>46_plineopen.~ 
- vesting |   .<SNR>46_convert_args..vimproc#get_command_name, 行 15 : vimpro~ 
- vesting |   c#get_command_name: File "ls" is not found.                      
- vesting   [Vest]  ./vest/test-socket.vim                                     
- vesting + [Fail]  C:\Documents and Settings\AmaiSaeta\vimbundles\vimproc\ves~ 
- vesting |   t\test-socket.vim:0: It checks host exists : vimproc#host_exist~ 
- vesting |   s('www.yahoo.com') == 1                                          
- vesting + [Fail]  C:\Documents and Settings\AmaiSaeta\vimbundles\vimproc\ves~ 
- vesting |   t\test-socket.vim:0: It checks host exists : vimproc#host_exist~ 
- vesting |   s('https://www.yahoo.com') == 1                                  
- vesting + [Fail]  C:\Documents and Settings\AmaiSaeta\vimbundles\vimproc\ves~ 
- vesting |   t\test-socket.vim:0: It checks host exists : vimproc#host_exist~ 
- vesting |   s('https://www.yahoo.com/hoge/piyo') == 1                        
- vesting   [OK]    .                                                          
- vesting   [OK]    .                                                          
- vesting   [Vest]  ./vest/test-fopen.vim                                      
- vesting   [OK]    .                                                          
- vesting   [OK]    .                                                          
- vesting   [OK]    .                                                          
- vesting   [OK]    .                                                          
- vesting   [OK]    .                                                          
- vesting   [OK]    .                                                          
- vesting   [Vest]  ./vest/test-system.vim                                     
- vesting + [Error] C:\Documents and Settings\AmaiSaeta\vimbundles\vimproc\ves~ 
- vesting |   t\test-system.vim:0: function vimproc#system..<SNR>46_system..v~ 
- vesting |   improc#pgroup_open..<SNR>46_pgroup_open..vimproc#plineopen3..<S~ 
- vesting |   NR>46_plineopen..<SNR>46_convert_args..vimproc#get_command_name~ 
- vesting |   , 行 15 : vimproc#get_command_name: File "ls" is not found.      

( It seems that the display of a row number has gone wrong. )

Improvement proposal

現在の vimproc の仕様で気になっている点のうち、私のほうで修正・変更可能なものを挙げます。

Redirection

現在、以下の形式のリダイレクションができません。

  • 2>&1 : stderr が vim と同じ端末に出力される (stdout の出力先と違う)
  • 1>&2 : 効果なし (リダイレクトとして扱われない)
  • <&-, [12]>&- (ストリームを閉じる) : 効果なし
  • 2>&1 >file : コマンドが実行されない (or すぐ終了する) ?
  • 3>&1 1>&2 2>&3 (stdout と stderr を交換) : 効果なし

また、/dev/null が pseudo_device 扱いで、リダイレクト時のIO処理を呼び出し側で行うようになっていますが、これはなぜでしょうか?
(Windows 環境の問題?)

Pipeline

POSIX仕様ではパイプライン A | B | C の各プロセスA, B, Cは同じプロセスグループに属しますが、現在の vimproc では各々が異なるプロセスグループになります。
これはこのままでよいでしょうか?

Pty

is_pty==1 の場合には forkpty() で新規セッションと制御端末を与えていますが、
セッションは作らず openpty() で新規端末を割り当てるだけでよいのでは?
(openpty() して fork()、制御端末は vim と同じ)
また、npipe==3 のときに stderr に openpty() で端末を割り当てていますが、
大抵の場合はパイプでも十分なように思います。
(1>&2 した場合に stdout を buffering されたくないならば、端末が必要ですが...)

what about running make automatically?

Reason is this issue request:
MarcWeber/vim-addon-manager-known-repositories#62

For vim-addon-async it works great: if the target executable does not exist yet ask the user whether "gcc" should be run for him. If he says [y], then it gets compiled automatically and everything works.

I'd prefer the plugin being that smart rather than making vim-addon-manager run make on behalf of the user (or tell him that he should do so.) Tools like neobundle would benefit, too.

How do you think about it?

Execute daemon, shell process

Is this possible, I tried an example such as this but it is not working:

let sub = vimproc#system_bg('sh')
call sub.stdin.write('echo hi')
let res = ''
let end = localtime() + 2
while !sub.stdout.eof && end > localtime()
    let res .= sub.stdout.read()
endwhile
let [cond, status] = sub.waitpid()
echo res
echo cond
echo status

scp://形式のファイルオープン時の挙動について

scp://形式のファイルを開こうとすると、以下のようにエラーが発生し、ファイルが開けませんでした。
(リモートホストはubuntuとし、ssh公開鍵認証設定済みです)

vim scp://ubuntu/.bashrc
Error detected while processing function <SNR>126_is_linux..unite#util#system..<SNR>26_system..vimproc#system..<SNR>127_system..vimproc#pgroup_open..<SNR>12
7_pgroup_open..vimproc#plineopen3..<SNR>127_plineopen..<SNR>127_convert_args..vimproc#get_command_name:
line   99:
E605: Exception not caught: vimproc#get_command_name: File "scp://ubuntu/script/locate" is not executable.

私のvimrcにはunite-locateが入っており、直接はその部分がトリガーとなってエラーになったように見えました。
(因みにリモートホスト側にはlocateコマンドも.bashrcも存在してます)

試しに、unite-locateをbundle配下から取り除いて(NeoBundleを使わせていただいてます)
同様に開いてみると、正しく参照出来るようになりました。
しかし、書き込みをしようとinsertモードに入ったタイミングで、

Error detected while processing function <SNR>230_check_source..<SNR>230_word_caching..neocomplcache#cache#async_load_from_file..<SNR>244_async_load..vimpro
c#system_bg..vimproc#popen3..<SNR>226_plineopen..<SNR>226_convert_args..vimproc#get_command_name:
line   99:
E605: Exception not caught: vimproc#get_command_name: File "scp://ubuntu/script/vim" is not executable.

のエラーが発生しました。
今度はunite-locateをbundle配下に戻し、vimprocを取り除いて同様のオペをすると正しく読み書き出来るようになりました。

上記事象から、vimprocに原因があるように思えるのですが、scp://形式のファイルはサポート対象外でしょうか?
現状だと開けなくなってしまうので、エラー時にはフォールバックするなどしていただけると非常に助かると思います。
よろしくお願いします。

Vimproc hangs other plugins

Hello, Shougo, first, I want to thank you for these awesome plugins you made!

Recently I found my neocomplete always hangs when doing include caching.
When I remove vimproc(only have neocomplete turned on, others are all off), the problem disappeared, I firstly thought it's neocomplete's issue until I found this report Shougo/neobundle.vim#131

I've installed both vimproc and neocomplete properly, the code compiled successfully.
So I guess that vimproc hangs for some reason, but I checked the the process cpu usage, vim was always taking 100% cpu when hanging. So I guess there's something wrong in the vimscript code.

The problem has never happened before until I recently updated all my plugins(including vimproc).

Here's some info:
vim version:

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 17 2013 23:09:56)
MacOS X (unix) version
Included patches: 1-52
Compiled by ofan@self
Huge version without GUI.  Features included (+) or not (-):
+acl             +farsi           +mouse_netterm   +syntax
+arabic          +file_in_path    +mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
-balloon_eval    +float           +mouse_urxvt     -tag_any_white
-browse          +folding         +mouse_xterm     +tcl
++builtin_terms  -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         +gettext         -mzscheme        +textobjects
-clientserver    -hangul_input    +netbeans_intg   +title
+clipboard       +iconv           +path_extra      -toolbar
+cmdline_compl   +insert_expand   +perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    +keymap          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       +python          +viminfo
+cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con      +lua             +rightleft       +windows
+diff            +menu            +ruby            +writebackup
+digraphs        +mksession       +scrollbind      -X11
-dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     -xim
+emacs_tags      -mouseshape      -sniff           -xsmp
+eval            +mouse_dec       +startuptime     -xterm_clipboard
+ex_extra        -mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop    -xpm
   system vimrc file: "/opt/local/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/opt/local/share/vim"
Compilation: ccache /usr/bin/clang -c -I. -Iproto -DHAVE_CONFIG_H   -I/opt/local/include -DMACOS_X_UNIX -no-cpp-precomp  -pipe -Os -arch x86_64     -I/opt/local/include  -D_REENTRANT=1  -D_THREAD_SAFE=1  -D_DARWIN_C_SOURCE=1  
Linking: ccache /usr/bin/clang   -L. -L/opt/local/lib -Wl,-headerpad_max_install_names   -L/usr/local/lib -L/opt/local/lib  -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -L/usr/local/lib -o vim        -lncurses -liconv -lintl -framework Cocoa  -L/opt/local/lib -llua -L/opt/local/lib -Wl,-headerpad_max_install_names  -fstack-protector  -L/opt/local/lib/perl5/5.12.4/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc -L/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config -framework CoreFoundation -lpython2.7  -L/opt/local/lib -ltcl8.6 -lz -framework CoreFoundation -lruby.1.9.1 -lobjc -L/opt/local/lib   

Vimproc.so incompatible with MacVim

It seems that makefile change in revision 5d79315 makes compiled vimproc.so incompatible with Macvim. According to mvim --version MacVim is compiled with 32-bit (-arch i386).

I tested with MacVim snapshot 64 and the Apple-built stock vim on Mac OS X 10.7.3.

I tested reverting the change and rebuilding, and the resulting library seems to work ok in both versions.

can't make in linux

make -f make_unix.mak
make[1]: Entering directory /home/dm/.vim/bundle/vimproc' gcc -W -O2 -Wall -Wno-unused -std=gnu99 -pedantic -shared -fPIC -o autoload/vimproc_unix.so autoload/proc.c -lutil autoload/proc.c: In function 'vp_dlversion': autoload/proc.c:162:20: warning: unused parameter 'args' [-Wunused-parameter] vp_dlversion(char *args) ^ make[1]: Leaving directory/home/dm/.vim/bundle/vimproc'

gcc version is 4.8.1

vimproc#system() でパイプが使えない

あー、5/17の版から vimproc#system() でパイプが使えなくなってるんだな~。元々ドキュメントにも使えるとも使えないとも書いてないから、Issue登録しづらい。

— sgurさん (@sgur) 2013年5月21日
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

@sgur それはないはずです。私の環境では動作しています。テストスクリプト、環境、詳しい状況を整理してIssues登録してもらえますか。

— Shougo(暗黒美夢王)さん (@ShougoMatsu) 2013年5月22日
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

の件です。

a9543d7 以降で発生しています。

環境

kaoriya 版 7.3.969 (x64)
独自ビルド(MSVC2012) hg trunk (x64)

再現手順

echo vimproc#system('ls | grep a')

※ Win 上の msys の ls と grep を使っています。

エラー内容

function vimproc#system..<SNR>95_system..<SNR>95_read_pgroup..<SNR>95_vp_waitpid..<SNR>95_close_all..<SNR>95_close..<SNR>95_vp_pipes_close..<SNR>95_close..<SNR>95_vp_pipe_close..<SNR>95_libcall, 行 16

cmd.exe決め打ちになっている

現状cmd.exe決め打ちになっている為、$PATH上に別のcmd.exeが存在したり、
Win3.1/95/98/MEで動作できません
(まぁ、そんな環境手持ちに有りませんが…)

なので$COMSPECを使用してみた
DeaR/vimproc.vim@7aff54c73e093f28b27cd280f09b2183c67ba047

しかし'shell'の初期値や
http://perldoc.jp/docs/perl/5.16.1/perlrun.pod

デフォルトは WindowsNT では cmd.exe /x/d/c、Windows95 では command.com /c です。

COMSPEC の値はユーザーによってかなり様々で、移植性の問題を引き起こすので、 Perl はこの目的に COMSPEC は使わないことに注意してください。

といった表記を見かけてしまったのでhas('win16') || has('win95')で分岐
DeaR/vimproc.vim@19cad4245cbe62a3768d0063d467493444bf610d

と2パターン弄ってみました
どうするのが良いですかね?

snprintf()が提供されていないためVisualStudio2010でビルドできない

Visual C++ では snprintf() 関数が提供されていないため、ビルドエラーになります。

proc_w32.c に ↓ を追加してビルドできることは確認しました。

#ifdef _MSC_VER
# define snprintf _snprintf
#endif

関数の挙動を考えると _snprintf_s を使用した方がよいかもしれませんが、引数が snprintf と異なるため
単純な置きかえはできません。

w3m -halfdumpでエラー

こんにちはyuratomoです。
次のようにw3m -halfdump を実行するとエラーがでてしまいます。

:call vimproc#system('w3m -halfdump http://www.yahoo.co.jp/')

ちなみに、http://www.google.co.jp は大丈夫でした。
対応可能でしょうか?

[環境]
os: Windows XP Home
vimproc: Last Modified: 07 Mar 2012.
w3m: mingw版

[エラー内容]
function vimproc#system..63_system..63_read_pgroup..63_read_pipes..63_read..63_hd2str..63_libcall の処理中にエラーが検出されました:
行 11:
E605: 例外が捕捉されませんでした: proc: vp_decode: ['/img_alt>園睚園瞞園眦園皹園盪 ^M^@<img_alt src="http://k.yimg.jp/images/clear.gif" title=""></img_alt> <img_alt src="http://k.yimg.jp/images/clear.gif" title=""></img_alt> <img_alt src="http://k.yimg.jp/images/clear.gif" title=""></img_alt> <img_alt src="http://k.yimg.jp/images/clear.gif" title=""></img_alt>^M^@<img_alt src="http://k.yimg.jp/images/clear.gif" title=""></img_alt> <img_alt src="http://k.yimg.jp/images/clear.gif" title=""></img_alt> ^M^@ <img_alt src="http://k.yimg.jp/images/top/sp/cgrade/icon_point.gif" title="堰、ゥ堰??堰ァ??a?園矍園皃園碯園睚園癇堰??奄附">堰、ゥ堰??堰ァ??a?園矍園皃園碯園睚園癇堰??奄附</img_alt><a href="r
function vimproc#system..63_system..63_read_pgroup の処理中にエラーが検出されました:
行 7:
E171: :endif がありません
function vimproc#system..63_system の処理中にエラーが検出されました:
行 49:
E171: :endif がありません

vimproc#get_last_errmsg() is broken

4cf58e0 で vimproc#get_last_errmsg() が機能しなくなっています.
処理を追えてませんが,とりあえず1012行目を

  if self.proc.current_proc.stdout.eof && self.proc.current_proc.stderr.eof

に戻すと大丈夫でした.

Cause errors after opening vimwiki file

I installed vimproc in Win7 64bit machine by Neobundle.vim and refer to :
"Windows 64bit でvimprocをコンパイルする | karakaram-blog" http://www.karakaram.com/vim/vimproc64/
And, I'm using neocomplcache, unite.vim, and "vimwiki". ( https://github.com/vim-scripts/vimwiki )

After opening vimwiki file (ex. :e hoge.viki), I open some file (ex. fuge.rb ), cause error:

function 82_check_source..82_word_caching..neocomplcache#cache#async_load_from_file..94_async_load..vimproc#get_command_name の処理中にエラーが検出されました:
行 15:E605: 例外が捕捉されませんでした: vimproc#get_command_name: File "gvim.exe" is not found.
function 82_check_source..82_word_caching..neocomplcache#cache#async_load_from_file..94_async_load の処理中にエラーが検出されました:
行 6:
E171: :endif がありません
function 82_check_source..82_word_caching の処理中にエラーが検出されました:
行 13:
E171: :endif がありません
function 82_check_source の処理中にエラーが検出されました:
行 12:
E171: :endif がありません

And after opening vimwiki file (ex. :e hoge.viki), I open some file (ex. fuge.rb ) with unite.vim, cause error:

function 82_check_source..82_word_caching..neocomplcache#cache#async_load_from_file..94_async_load..vimproc#get_command_name, 行 15
vimproc#get_command_name: File "gvim.exe" is not found.
Error occured in executing action!
Action name is open

These errors don't cause while no installing vimproc.

Populate buffer with command output asynchronously

Not sure the right place to ask a simple question. If there is a better place I will be happy to close this and ask there.

I am trying to execute a command and have the output populate a new buffer. I can do this synchronously with the following function, however I would like to have this work asynchronously. Populating the buffer while the command runs.

command! -complete=shellcmd -nargs=+ VimProcBackground call s:run_vimproc_background(<q-args>)
function! s:run_vimproc_background(cmdline)
  let sub = vimproc#popen2(a:cmdline)
  let res = ''
  while !sub.stdout.eof
    let res .= sub.stdout.read()
  endwhile
  let [cond, status] = sub.waitpid()
  botright new
  setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile nowrap
  call append(0, split(res, '\r\n\|\r\|\n') + [string([cond, status])])
endfunction

How would I do that but have the command run in the background so I don't block the user?

I looked at the source for Unite, and I notice you are passing around a context, but I don't fully understand what is going on. Any guidance would be great.

Thanks!

孫プロセスを削除できるようにする

Shougo/neobundle.vim#175

ここにもあるように、現在のvimprocは孫プロセスを削除できません。
neobundleのアップデートプロセスが孫プロセスを起動するのでゾンビプロセスとなり、問題となっています。
最近のコミットで対応を頑張ってみたものの、ちゃんと削除できていないようです。

これを一人でやるのは大変なので、詳しい人に手伝ってもらいたいと考えています。

確認方法:

  1. Vimを起動
  2. :so vimproc.vim/tools/leak_check2.vim
  3. [python] <defunct> と表示されなければ成功、表示されると失敗(ゾンビプロセスが残っている)

もしくは、vimproc, unite.vimがインストールされている状態で:Unite neobundle/update -log を実行する。gitプロセスがゾンビになっていれば孫プロセスが削除されていない。

Can't compile in cygwin

7bbe961 において追加された Ignore tty 処理で使われている TIOCNOTTY が Cygwin には無いためコンパイルエラーとなります。

同じようなことで修正されてるソースがあったので以下の様にしてみました。
これで以下の環境で動作しています。

  • Windows8.1 CYGWIN_NT-6.2 1.7.25(0.270/5/3) x86_64
--- a/autoload/proc.c
+++ b/autoload/proc.c
@@ -486,6 +486,9 @@ vp_pipe_open(char *args)
         }

         {
+#ifdef __CYGWIN__
+            setsid();
+#else
             /* Ignore tty. */
             char name[L_ctermid];
             if (ctermid(name)[0] != '\0') {
@@ -495,6 +498,7 @@ vp_pipe_open(char *args)
                     close(tfd);
                 }
             }
+#endif
         }

         argv = malloc(sizeof(char *) * (argc+1));

Not able to run `make`

I am trying to install your vimshell. It tells me to install vimproc.

E216: No such group or event: filetypedetect *
Error occured while loading vimproc.
Please install vimproc Ver.6.0 or above.

Now I have the following in .vimrc.

NeoBundle 'Shougo/vimproc', {
      \ 'build' : {
      \     'mac' : 'make -f make_mac.mak',
      \    },
      \ }

Then I tried to build it according to your instruction.

~  make
make: *** No targets specified and no makefile found.  Stop.

Now I am not sure how to build it. Any suggestions? Thanks in advance.

Long closing time on VimLeave

I have traced a delay (~5 seconds) in closing gvim on Windows when I run any command using vimproc#cmd#system(). I have traced it to the s:close() command in cmd.vim that is tied to the VimLeave autocommand. I haven't recompiled the vimproc dll in a month or so, would this be the root cause, or is this behavior expected?

vimproc#filepath#which() cannot find a command if it isn't readable.

unite-locate plugin doesn't work on my environment (Gentoo Linux) because
vimproc#filepath#which() checks if a command file is readable or not and
Gentoo's /usr/bin/locate is unreadable.

I don't know why vimproc#filepath#which() needs to confirm the readability.
Is it really necessary?

Error occured by DLL compiled with MSVC 10.0 (64bit)

vimprocをMSVC10.0 (VS2010) で 64bit向けにビルドすると、ビルド自体は成功しますが、使用時にエラーが出ます。

:VimProcBang echo を実行したときのエラーメッセージ

function <SNR>32_bang..vimproc#pgroup_open..<SNR>100_pgroup_open..vimproc#plineopen3..<SNR>100_plineopen..<SNR>100_vp_pipe_open..<SNR>100_libcall の処理中にエラーが検出されました:
行    4:
E364: "vp_pipe_open"() のライブラリ呼出に失敗しました
function <SNR>32_bang..vimproc#pgroup_open..<SNR>100_pgroup_open..vimproc#plineopen3..<SNR>100_plineopen..<SNR>100_vp_pipe_open の処理中にエラーが検出されました:
行    6:
E688: ターゲットがリスト型内の要素よりも多いです
行   13:
E121: 未定義の変数です: fdlist
E116: 関数の無効な引数です: len(fdlist)
E15: 無効な式です: a:npipe != len(fdlist)
行   19:
E121: 未定義の変数です: pid
E15: 無効な式です: [pid] + fdlist
function <SNR>32_bang..vimproc#pgroup_open..<SNR>100_pgroup_open..vimproc#plineopen3..<SNR>100_plineopen の処理中にエラーが検出されました:
行   74:
E714: リスト型が必要です
行   79:
(以下略)

以下のエラーが出ました

vimfiler + vimshellを使用中に以下のエラーが出ました。
エラーの内容にvimprocとありましたのでこちらに報告します。

function <SNR>216_check_all_output..<SNR>216_check_output..<SNR>107_vp_set_winsize..vimproc#kill の処理中にエラーが検出されました:
行    8:
E688: ターゲットがリスト型内の要素よりも多いです
function <SNR>216_check_all_output..<SNR>216_check_output..<SNR>107_vp_set_winsize の処理中にエラーが検出されました:
行   23:
E170: :endfor がありません
function <SNR>216_check_all_output..<SNR>216_check_output の処理中にエラーが検出されました:
行   77:
E171: :endif がありません
function <SNR>216_check_all_output の処理中にエラーが検出されました:
行   12:
E171: :endif がありません

vimfiler, vimshell, vimproc最新版です。

VIM - Vi IMproved 7.3 (2010 Aug 15, compiled May 9 2012 22:42:34)
MacOS X (unix) 版
適用済パッチ: 1-515

よろしくお願い申し上げます。

実行結果のエコーが縦に表示される

VimProcで外部コマンドが実行されるとき、そのコマンドのエコーが縦一列に表示されます。

:VimProcBang ls -al

とすると、

l
s

-
a
ltotal 1168
drwxr-xr-x+   148 sunvisor  staff    5032 10 27 11:44 .
drwxr-xr-x      6 root      admin .....

のようになります。

これは、VimShellで実行したときにもなり、

のような表示になります。
最初の実行の時にはステータス画面は、すぐに消えるのですが2度目からは消えません。

また、NeoBundleにおいても、このように実行されたコマンド名が縦にエコーされます。

.vimrcをほとんどからにしてから実行しても症状がとまりませんでした。

当方の環境は、

OS: OS X 10.8.2
Vim: MacVim 7.3(KaoriYa 20120823)

です。コマンドライン版の 7.3 でも同様の事象が発生します。

JSX を vimproc#system で実行した場合に結果が返ってこない

実行に失敗する .jsx ファイルを vimproc#system で実行を行うと値が返ってきません。

[main.jsx]

class _Main{
    static function main(args : string[]) : void {
        log "hello, world"    // ; 抜け
    }
}

[コマンド]

echo vimproc#system("jsx --run main.jsx")

上記のコマンドを実行しても何も出力がされません。
上記と同じコードで system を使用した場合では下記のような値が返ってきます。

[main.jsx:4] expected keyword: ;
    }
    ^

また、実行に成功するコードでは正しい値(上記の場合では "hello, world")が返ってきます。

[Vim]

VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Apr 21 2012 09:09:24)
MS-Windows 32 ビット GUI 版
適用済パッチ: 1-502
Modified by [email protected]
Compiled by [email protected]
Big 版 with GUI.  機能の一覧 有効(+)/無効(-)
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent +clientserver 
+clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +conceal +cryptv +cscope 
+cursorbind +cursorshape +dialog_con_gui +diff +digraphs -dnd -ebcdic +emacs_tags +eval 
+ex_extra +extra_search +farsi +file_in_path +find_in_path +float +folding -footer 
+gettext/dyn +guess_encode -hangul_input +iconv/dyn +insert_expand +jumplist +keymap 
+kaoriya +langmap +libcall +linebreak +lispindent +listcmds +localmap +lua/dyn +menu 
+migemo/dyn +mksession +modify_fname +mouse +mouseshape +multi_byte_ime/dyn +multi_lang 
-mzscheme +netbeans_intg -ole +path_extra +perl/dyn +persistent_undo -postscript +printer 
-profile +python/dyn +python3/dyn +quickfix +reltime +rightleft +ruby/dyn +scrollbind 
+signs +smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary 
+tag_old_static -tag_any_white -tcl -tgetent -termresponse +textobjects +title +toolbar 
+user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore 
+wildmenu +windows +writebackup -xfontset -xim -xterm_save -xpm_w32 
      システム vimrc: "$VIM\vimrc"
        ユーザ vimrc: "$HOME\_vimrc"
     第2ユーザ vimrc: "$VIM\_vimrc"
         ユーザ exrc: "$HOME\_exrc"
      第2ユーザ exrc: "$VIM\_exrc"
     システム gvimrc: "$VIM\gvimrc"
       ユーザ gvimrc: "$HOME\_gvimrc"
    第2ユーザ gvimrc: "$VIM\_gvimrc"
    システムメニュー: "$VIMRUNTIME\menu.vim"
コンパイル: cl -c /W3 /nologo  -I. -Iproto -DHAVE_PATHDEF -DWIN32   -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG     /DMODIFIED_BY=\"[email protected]\" /DDYNAMIC_MSVCRT_DLL=\"msvcr100.dll\" /DGETTEXT_DLL=\"intl.dll\" /D_BIND_TO_CURRENT_VCLIBS_VERSION=1 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 /Fo.\Obj\GULYHR-x86/ /Ox /GL -DNDEBUG /MD -DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_GUI_W32 -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DDYNAMIC_MIGEMO -DFEAT_LUA -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua5.1.dll\" -DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python32.dll\" -DFEAT_PERL -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL=\"perl514.dll\" -DFEAT_RUBY -DDYNAMIC_RUBY -DDYNAMIC_RUBY_VER=192 -DDYNAMIC_RUBY_DLL=\"msvcrt-ruby191.dll\" -DFEAT_BIG /Fd.\Obj\GULYHR-x86/ /Zi
リンク: link /RELEASE /nologo /subsystem:windows /LTCG:STATUS oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib  comdlg32.lib ole32.lib uuid.lib /machine:i386 /nodefaultlib gdi32.lib version.lib   winspool.lib comctl32.lib advapi32.lib shell32.lib  /machine:i386 /nodefaultlib msvcrt.lib   user32.lib   /nodefaultlib:lua5.1.lib   /nodefaultlib:python27.lib /nodefaultlib:python32.lib    WSock32.lib  /PDB:gvim.pdb -debug

Can't compile under Win 7 with MinGW

When I run either of the MinGW makefiles, I get this output:

C:\Users\Noah.vim\bundle\vimproc>make -f make_mingw32.mak
gcc -O2 -Wall -shared -m32 -o autoload/vimproc_win32.dll autoload/proc_w32.c -lw
sock32
process_begin: CreateProcess((null), gcc -O2 -Wall -shared -m32 -o autoload/vimp
roc_win32.dll autoload/proc_w32.c -lwsock32, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [autoload/vimproc_win32.dll] Error 2

I've never compiled anything before, so I don't know if I've done something wrong. Have I? What's my next step?

autoload/vimproc.vimロード時にredrawされる

Vim起動からの操作

echo vimproc#version()

結果
画面がredrawされ, vimproc#version() の結果が見えない.
「VIM - Vi IMproved」の文字も消える.

期待する挙動
redrawされずにロードでき, vimprocのバージョンも表示される.

再現vimrc

set nocompatible
filetype off
execute 'set runtimepath+='.expand('~/.vim/bundle/neobundle.vim')
call neobundle#rc(expand('~/.vim/bundle'))
NeoBundleFetch 'Shougo/neobundle.vim'
NeoBundle 'Shougo/vimproc'
syntax enable
set laststatus=2
filetype plugin indent on

Vimのバージョン 7.4.131 端末です

gcc warnings

I get these warnings under gcc 4.7.2 but vimproc still compiles & works fine. 😅

$ make
make -f make_unix.mak
make[1]: Entering directory '/home/cadror/.vim/bundle/vimproc'
gcc -W -O2 -Wall -Wno-unused -std=gnu99 -pedantic -shared -fPIC -o autoload/vimproc_unix.so autoload/proc.c -lutil
autoload/proc.c: In function ‘vp_dlversion’:
autoload/proc.c:162:20: warning: unused parameter ‘args’ [-Wunused-parameter]
 vp_dlversion(char *args)
                    ^
In file included from /usr/include/fcntl.h:38:0,
                 from autoload/proc.c:27:
autoload/proc.c: At top level:
/home/utils/gcc-4.8.1/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/include-fixed/sys/stat.h:379:16: warning: inline function ‘mknod’ declared but never defined [enabled by default]
 __inline__ int mknod (__const char *__path, __mode_t __mode, __dev_t __dev)
                ^
/home/utils/gcc-4.8.1/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/include-fixed/sys/stat.h:379:16: warning: inline function ‘mknod’ declared but never defined [enabled by default]
make[1]: Leaving directory '/home/cadror/.vim/bundle/vimproc'

Windows環境のvimproc#system()でGUIコマンドを起動できない

http://lingr.com/room/vim/archives/2013/04/25#message-14983284

system だと GUI が起動し、出力結果を取得できるんですが、vimproc だとそもそも GUI が起動しないのでどうしたものかなーと。
いや、そうでもなかった。

echo vimproc#system("cmd /c window.exe")
で動作した。

http://lingr.com/room/vim/archives/2013/04/25#message-14983639

なんとなくわかりました。明日時間があったらvimproc見てみますが、cmdで行けるならその方向で。

前々から問題は認識していましたが、原因と(対処できるなら)対処方法について調べてみたいと思っています。何か情報がありましたらよろしくおねがいします。

ワイルドカード使用時、シンボリックリンクが解決できていない

前提

/home/user/a は /home/user/test へのシンボリックリンクだとします。

/home
 /user
  /test
   1.txt
   2.txt
  /a => /home/user/test

問題

bash では ls /home/user/a/* を実行すると

1.txt 2.txt

と表示されますが、vimshell の場合はエラーとなってしまいます。

望ましい挙動

bash と同様に、ワイルドカード展開時にもシンボリックリンクを解決してほしいです。

よろしくお願いします。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.