vim-quickrun icon indicating copy to clipboard operation
vim-quickrun copied to clipboard

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

Open callmekohei opened this issue 7 years ago • 6 comments

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

  • quickrun version(SHA1):
4b493fa
Mon May 7 14:11:38 2018 +0900
Merge pull request #173 from rhysd/typescript/ts-node  (HEAD -> master, origin/master, origin/HEAD)
  • OS:
ProductName:	Mac OS X
ProductVersion:	10.13.4
BuildVersion:	17E202
  • neovim/Vim :version output:
$ vim --version
VIM - Vi IMproved 8.1 (2018 May 17, compiled May 25 2018 01:25:35)
macOS version
Included patches: 1-22
Compiled by Homebrew

$ 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!)

" 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

callmekohei avatar May 28 '18 04:05 callmekohei

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

thinca avatar May 28 '18 05:05 thinca

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

callmekohei avatar May 28 '18 05:05 callmekohei

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 avatar May 28 '18 06:05 callmekohei

@raa0121 @thinca

日本語でいきませう!

callmekohei avatar May 29 '18 04:05 callmekohei

  • OS: ArchLinux (x86_64)
  • Vim: 8.0.329
  • FSharp: 4.1

<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 )

raa0121 avatar May 29 '18 04:05 raa0121

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

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

foo

大体は表示が出ない

bar

callmekohei avatar May 29 '18 05:05 callmekohei