thinca / vim-quickrun

Run commands quickly.
zlib License
768 stars 101 forks source link

quick-run can not execute well at vim's launch. #175

Open callmekohei opened 6 years ago

callmekohei commented 6 years ago

Problems summary

quick-run can not execute well at vim's launch.

foo

Expected

quick-run can execute well at vim's launch.

bar

Environment Information

$ nvim --version NVIM v0.3.0-1139-g35cc15e15 Build type: Release LuaJIT 2.0.5


## Provide a minimal init.vim/vimrc with less than 50 lines (Required!)

```vim
" file name is minimal.vimrc

" set path
set runtimepath+=~/.cache/dein/repos/github.com/Shougo/vimproc.vim
set runtimepath+=~/.cache/dein/repos/github.com/thinca/vim-quickrun

 " turn on plugins
set nocompatible
filetype plugin indent on
syntax enable

let s:foo = {
    \  'command'                         : 'fsharpi --readline-'
    \ ,'runner'                          : 'concurrent_process'
    \ ,'runner/concurrent_process/load'  : '#load "%S";;'
    \ ,'runner/concurrent_process/prompt': '> '
\}

autocmd BufReadPost  *.fsx  call quickrun#run( s:foo )

The reproduce ways from neovim/Vim starting (Required!)

launch F# file

// file name is foo.fsx

let foo () =
    printfn "hello"
let bar () =
    printfn "world"
let (=) _ _ = 5
foo ()
bar ()
$ vim -N -u minimal.vimrc foo.fsx

Work around

Use Neovim

thinca commented 6 years ago

I don't have F# environment so could you try other major language?

callmekohei commented 6 years ago

Thank you for your rapid reply. So I'll try another major langage. 😄

callmekohei commented 6 years ago

C# script ( csx )

I try it with csharp script ( csx ). A same thing happened. But quickrun just work after insert mode.

minimal.vimrc

" set path
set runtimepath+=~/.cache/dein/repos/github.com/Shougo/vimproc.vim
set runtimepath+=~/.cache/dein/repos/github.com/thinca/vim-quickrun

 " turn on plugins
set nocompatible
filetype plugin indent on
syntax enable

let s:foo = {
    \  'command'                         : 'csi'
    \ ,'runner'                          : 'concurrent_process'
    \ ,'runner/concurrent_process/load'  : '#load "%S";;'
    \ ,'runner/concurrent_process/prompt': '> '
\}

autocmd BufReadPost  *.csx  call quickrun#run( s:foo )

foo.csx

#r "/usr/local/Cellar/mono/5.4.1.6/lib/mono/4.7-api/Facades/System.Runtime.dll"
using System;
Console.WriteLine("Hello");

launch

$ vim -N -u minimal.vimrc foo.csx

like this foo

work around

use Neovim

bar

callmekohei commented 6 years ago

@raa0121 @thinca

日本語でいきませう!

raa0121 commented 6 years ago

<C-w>l でバッファを移動したら、スクショのように、ちゃんと表示されました。 バッファを移動するまでは :-) の表示のままでした image

set runtimepath+=~/.bundle/vimproc.vim
set runtimepath+=~/.bundle/vim-quickrun

set nocompatible
filetype plugin indent on
syntax enable

let s:foo = {
    \  'command'                         : 'fsharpi --readline-'
    \ ,'runner'                          : 'concurrent_process'
    \ ,'runner/concurrent_process/load'  : '#load "%S";;'
    \ ,'runner/concurrent_process/prompt': '> '
\}

autocmd BufReadPost  *.fsx  call quickrun#run( s:foo )
callmekohei commented 6 years ago

@raa0121 さんが検証された <C-w>l コマンドをこちらの環境で動作させると10回に一度は表示されました!

10回に1回ほど表示が出る

foo

大体は表示が出ない

bar