From 571026298865a5ac961b4bdb2fe9618812dd1993 Mon Sep 17 00:00:00 2001 From: s-zeng Date: Sat, 9 Sep 2017 22:02:14 -0400 Subject: [PATCH 01/11] Defaults to python 3.6 and added racket support --- README.md | 1 + plugin/repl.vim | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d0ff65f..db31d6b 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ Run `:Repl` without saving the code on a file. * JavaScript * Clojure * Idris +* Racket ## Installation diff --git a/plugin/repl.vim b/plugin/repl.vim index b671bf2..190871f 100644 --- a/plugin/repl.vim +++ b/plugin/repl.vim @@ -18,7 +18,7 @@ let g:repl#default_filetype_repl = { \ 'opt' : '--simple-prompt -r' \ }, \ 'python' : { -\ 'repl' : 'python', +\ 'repl' : 'python3.6', \ 'opt' : '-i' \ }, \ 'erlang' : { @@ -36,6 +36,10 @@ let g:repl#default_filetype_repl = { \ 'idris' : { \ 'repl' : 'idris', \ 'opt' : '' +\ }, +\ 'racket' : { +\ 'repl' : 'racket', +\ 'opt' : '' \ } \} From 15494c17e402d9d74231a2a62d4aad912a33808c Mon Sep 17 00:00:00 2001 From: s-zeng Date: Sat, 9 Sep 2017 22:07:55 -0400 Subject: [PATCH 02/11] Fixed racket support --- plugin/repl.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/repl.vim b/plugin/repl.vim index 190871f..cce07b6 100644 --- a/plugin/repl.vim +++ b/plugin/repl.vim @@ -37,7 +37,7 @@ let g:repl#default_filetype_repl = { \ 'repl' : 'idris', \ 'opt' : '' \ }, -\ 'racket' : { +\ 'scheme' : { \ 'repl' : 'racket', \ 'opt' : '' \ } From 1000a637d84c15ed1487afe325b78b85a1911f51 Mon Sep 17 00:00:00 2001 From: s-zeng Date: Sat, 9 Sep 2017 22:47:55 -0400 Subject: [PATCH 03/11] Fixed racket support for real --- autoload/repl.vim | 2 ++ autoload/repl/scheme.vim | 21 +++++++++++++++++++++ plugin/repl.vim | 2 +- 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 autoload/repl/scheme.vim diff --git a/autoload/repl.vim b/autoload/repl.vim index 7e19b2c..cf41152 100644 --- a/autoload/repl.vim +++ b/autoload/repl.vim @@ -24,6 +24,8 @@ function! repl#run_repl() abort call repl#clojure#open_repl() elseif &filetype ==# 'idris' call repl#idris#open_repl() + elseif &filetype ==# 'scheme' + call repl#scheme#open_repl() else call repl#echo_error("Sorry, repl.vim didn't support this filetype") endif diff --git a/autoload/repl/scheme.vim b/autoload/repl/scheme.vim new file mode 100644 index 0000000..7f753f4 --- /dev/null +++ b/autoload/repl/scheme.vim @@ -0,0 +1,21 @@ +scriptencoding utf-8 + +function! repl#clojure#open_repl() abort + if &modified + let l:module_file = tempname() . '.rkt' + call writefile(getline(1, expand('$')), l:module_file) + else + let l:module_file = expand('%:p') + endif + + let l:repl = repl#get_filetype_repl('scheme') + let l:exec_name = split(l:repl['repl'], ' ')[0] + if !executable(l:exec_name) + call repl#echo_error(printf("You don't have repl: '%s'", l:exec_name)) + return + endif + let l:args = printf('%s -f %s %s', l:repl['repl'], l:module_file, l:repl['opt']) + let l:vimshell_interactive = ':VimShellInteractive' . printf("--split='%s'", g:repl_split_command) + execute l:vimshell_interactive l:args +endfunction + diff --git a/plugin/repl.vim b/plugin/repl.vim index cce07b6..334404c 100644 --- a/plugin/repl.vim +++ b/plugin/repl.vim @@ -39,7 +39,7 @@ let g:repl#default_filetype_repl = { \ }, \ 'scheme' : { \ 'repl' : 'racket', -\ 'opt' : '' +\ 'opt' : '-i' \ } \} From 76f087c151baa1392a84785056dc108588081fa6 Mon Sep 17 00:00:00 2001 From: s-zeng Date: Sat, 9 Sep 2017 22:57:52 -0400 Subject: [PATCH 04/11] Fixed stupid typo --- autoload/repl/python.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/repl/python.vim b/autoload/repl/python.vim index 1228e60..ad5fcf8 100644 --- a/autoload/repl/python.vim +++ b/autoload/repl/python.vim @@ -1,6 +1,6 @@ scriptencoding utf-8 -function! repl#python#open_repl() abort +function! repl#scheme#open_repl() abort " Setting up the file for the current file if &modified " Create new file temporary From 33ce6a44e92a5f81c53dd8e8543108384814a7e6 Mon Sep 17 00:00:00 2001 From: s-zeng Date: Sat, 9 Sep 2017 23:00:12 -0400 Subject: [PATCH 05/11] Fixed the typo correctly --- autoload/repl/python.vim | 2 +- autoload/repl/scheme.vim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/repl/python.vim b/autoload/repl/python.vim index ad5fcf8..1228e60 100644 --- a/autoload/repl/python.vim +++ b/autoload/repl/python.vim @@ -1,6 +1,6 @@ scriptencoding utf-8 -function! repl#scheme#open_repl() abort +function! repl#python#open_repl() abort " Setting up the file for the current file if &modified " Create new file temporary diff --git a/autoload/repl/scheme.vim b/autoload/repl/scheme.vim index 7f753f4..b6d4de6 100644 --- a/autoload/repl/scheme.vim +++ b/autoload/repl/scheme.vim @@ -1,6 +1,6 @@ scriptencoding utf-8 -function! repl#clojure#open_repl() abort +function! repl#scheme#open_repl() abort if &modified let l:module_file = tempname() . '.rkt' call writefile(getline(1, expand('$')), l:module_file) From 2df9d43738ad71350abddb4ac58e8c65a54ec797 Mon Sep 17 00:00:00 2001 From: s-zeng Date: Tue, 12 Sep 2017 09:23:49 -0400 Subject: [PATCH 06/11] Set default repl size to 10 --- autoload/repl/clojure.vim | 2 ++ autoload/repl/erlang.vim | 3 ++- autoload/repl/haskell.vim | 2 ++ autoload/repl/idris.vim | 2 ++ autoload/repl/javascript.vim | 2 ++ autoload/repl/python.vim | 2 ++ autoload/repl/ruby.vim | 2 ++ autoload/repl/scheme.vim | 2 ++ 8 files changed, 16 insertions(+), 1 deletion(-) diff --git a/autoload/repl/clojure.vim b/autoload/repl/clojure.vim index 18b7ef9..93cd172 100644 --- a/autoload/repl/clojure.vim +++ b/autoload/repl/clojure.vim @@ -19,5 +19,7 @@ function! repl#clojure#open_repl() abort let l:args = printf('%s %s', l:repl['repl'], l:repl['opt']) let l:vimshell_interactive = ':VimShellInteractive' . printf("--split='%s'", g:repl_split_command) execute l:vimshell_interactive l:args + let l:resize = ':resize 10' + execute l:resize call vimshell#interactive#send(printf('(load-file "%s")', l:module_file)) endfunction diff --git a/autoload/repl/erlang.vim b/autoload/repl/erlang.vim index 8a1d35f..81d1aac 100644 --- a/autoload/repl/erlang.vim +++ b/autoload/repl/erlang.vim @@ -49,6 +49,7 @@ function! repl#erlang#open_repl() abort let l:vimshell_interactive = ':VimShellInteractive' . printf("--split='%s'", g:repl_split_command) execute l:vimshell_interactive l:args - call vimshell#interactive#send(printf('c(%s).', fnamemodify(l:module_file, ':t:r'))) + let l:resize = ':resize 10' + execute l:resize call vimshell#interactive#send(printf('c(%s).', fnamemodify(l:module_file, ':t:r'))) execute 'cd' l:pwd endfunction diff --git a/autoload/repl/haskell.vim b/autoload/repl/haskell.vim index 67e7317..cfde15c 100644 --- a/autoload/repl/haskell.vim +++ b/autoload/repl/haskell.vim @@ -19,4 +19,6 @@ function! repl#haskell#open_repl() abort let l:args = printf('%s %s %s', l:repl['repl'], l:repl['opt'], l:module_file) let l:vimshell_interactive = ':VimShellInteractive' . printf("--split='%s'", g:repl_split_command) execute l:vimshell_interactive l:args + let l:resize = ':resize 10' + execute l:resize endfunction diff --git a/autoload/repl/idris.vim b/autoload/repl/idris.vim index 29ceb5f..2605475 100644 --- a/autoload/repl/idris.vim +++ b/autoload/repl/idris.vim @@ -19,4 +19,6 @@ function! repl#idris#open_repl() abort let l:args = printf('%s %s %s', l:repl['repl'], l:repl['opt'], l:module_file) let l:vimshell_interactive = ':VimShellInteractive' . printf("--split='%s'", g:repl_split_command) execute l:vimshell_interactive l:args + let l:resize = ':resize 10' + execute l:resize endfunction diff --git a/autoload/repl/javascript.vim b/autoload/repl/javascript.vim index 5c3e52a..5b6b327 100644 --- a/autoload/repl/javascript.vim +++ b/autoload/repl/javascript.vim @@ -20,5 +20,7 @@ function! repl#javascript#open_repl() abort let l:args = printf('%s %s', l:repl['repl'], l:repl['opt']) let l:vimshell_interactive = ':VimShellInteractive' . printf("--split='%s'", g:repl_split_command) execute l:vimshell_interactive l:args + let l:resize = ':resize 10' + execute l:resize call vimshell#interactive#send('.load ' . l:module_file) endfunction diff --git a/autoload/repl/python.vim b/autoload/repl/python.vim index 1228e60..be7af41 100644 --- a/autoload/repl/python.vim +++ b/autoload/repl/python.vim @@ -19,4 +19,6 @@ function! repl#python#open_repl() abort let l:args = printf('%s %s %s', l:repl['repl'], l:repl['opt'], l:module_file) let l:vimshell_interactive = ':VimShellInteractive' . printf("--split='%s'", g:repl_split_command) execute l:vimshell_interactive l:args + let l:test = ':resize 10' + execute l:test endfunction diff --git a/autoload/repl/ruby.vim b/autoload/repl/ruby.vim index d5bc6e4..545d550 100644 --- a/autoload/repl/ruby.vim +++ b/autoload/repl/ruby.vim @@ -18,4 +18,6 @@ function! repl#ruby#open_repl() abort let l:args = printf('%s %s %s', l:repl['repl'], l:repl['opt'], l:module_file) let l:vimshell_interactive = ':VimShellInteractive' . printf("--split='%s'", g:repl_split_command) execute l:vimshell_interactive l:args + let l:resize = ':resize 10' + execute l:resize endfunction diff --git a/autoload/repl/scheme.vim b/autoload/repl/scheme.vim index b6d4de6..989d443 100644 --- a/autoload/repl/scheme.vim +++ b/autoload/repl/scheme.vim @@ -17,5 +17,7 @@ function! repl#scheme#open_repl() abort let l:args = printf('%s -f %s %s', l:repl['repl'], l:module_file, l:repl['opt']) let l:vimshell_interactive = ':VimShellInteractive' . printf("--split='%s'", g:repl_split_command) execute l:vimshell_interactive l:args + let l:resize = ':resize 10' + execute l:resize endfunction From 9b88e5b9e777a41d720a7743e3a605499aed47e8 Mon Sep 17 00:00:00 2001 From: s-zeng Date: Tue, 12 Sep 2017 14:05:03 -0400 Subject: [PATCH 07/11] QOL features --- autoload/repl/clojure.vim | 4 ++++ autoload/repl/erlang.vim | 7 ++++++- autoload/repl/haskell.vim | 4 ++++ autoload/repl/idris.vim | 4 ++++ autoload/repl/javascript.vim | 4 ++++ autoload/repl/python.vim | 8 ++++++-- autoload/repl/ruby.vim | 4 ++++ autoload/repl/scheme.vim | 4 ++++ 8 files changed, 36 insertions(+), 3 deletions(-) diff --git a/autoload/repl/clojure.vim b/autoload/repl/clojure.vim index 93cd172..74d3b0b 100644 --- a/autoload/repl/clojure.vim +++ b/autoload/repl/clojure.vim @@ -21,5 +21,9 @@ function! repl#clojure#open_repl() abort execute l:vimshell_interactive l:args let l:resize = ':resize 10' execute l:resize + let l:nonum = ':set nonumber' + execute l:nonum + let l:swp = ':wincmd r' + execute l:swp call vimshell#interactive#send(printf('(load-file "%s")', l:module_file)) endfunction diff --git a/autoload/repl/erlang.vim b/autoload/repl/erlang.vim index 81d1aac..6fd4acc 100644 --- a/autoload/repl/erlang.vim +++ b/autoload/repl/erlang.vim @@ -50,6 +50,11 @@ function! repl#erlang#open_repl() abort execute l:vimshell_interactive l:args let l:resize = ':resize 10' - execute l:resize call vimshell#interactive#send(printf('c(%s).', fnamemodify(l:module_file, ':t:r'))) + let l:nonum = ':set nonumber' + execute l:nonum + let l:swp = ':wincmd r' + execute l:swp + execute l:resize + call vimshell#interactive#send(printf('c(%s).', fnamemodify(l:module_file, ':t:r'))) execute 'cd' l:pwd endfunction diff --git a/autoload/repl/haskell.vim b/autoload/repl/haskell.vim index cfde15c..46eef7f 100644 --- a/autoload/repl/haskell.vim +++ b/autoload/repl/haskell.vim @@ -21,4 +21,8 @@ function! repl#haskell#open_repl() abort execute l:vimshell_interactive l:args let l:resize = ':resize 10' execute l:resize + let l:nonum = ':set nonumber' + execute l:nonum + let l:swp = ':wincmd r' + execute l:swp endfunction diff --git a/autoload/repl/idris.vim b/autoload/repl/idris.vim index 2605475..1987b26 100644 --- a/autoload/repl/idris.vim +++ b/autoload/repl/idris.vim @@ -21,4 +21,8 @@ function! repl#idris#open_repl() abort execute l:vimshell_interactive l:args let l:resize = ':resize 10' execute l:resize + let l:nonum = ':set nonumber' + execute l:nonum + let l:swp = ':wincmd r' + execute l:swp endfunction diff --git a/autoload/repl/javascript.vim b/autoload/repl/javascript.vim index 5b6b327..d7197fe 100644 --- a/autoload/repl/javascript.vim +++ b/autoload/repl/javascript.vim @@ -22,5 +22,9 @@ function! repl#javascript#open_repl() abort execute l:vimshell_interactive l:args let l:resize = ':resize 10' execute l:resize + let l:nonum = ':set nonumber' + execute l:nonum + let l:swp = ':wincmd r' + execute l:swp call vimshell#interactive#send('.load ' . l:module_file) endfunction diff --git a/autoload/repl/python.vim b/autoload/repl/python.vim index be7af41..2ff2cad 100644 --- a/autoload/repl/python.vim +++ b/autoload/repl/python.vim @@ -19,6 +19,10 @@ function! repl#python#open_repl() abort let l:args = printf('%s %s %s', l:repl['repl'], l:repl['opt'], l:module_file) let l:vimshell_interactive = ':VimShellInteractive' . printf("--split='%s'", g:repl_split_command) execute l:vimshell_interactive l:args - let l:test = ':resize 10' - execute l:test + let l:resize = ':resize 10' + execute l:resize + let l:nonum = ':set nonumber' + execute l:nonum + let l:swp = ':wincmd r' + execute l:swp endfunction diff --git a/autoload/repl/ruby.vim b/autoload/repl/ruby.vim index 545d550..4d5dc07 100644 --- a/autoload/repl/ruby.vim +++ b/autoload/repl/ruby.vim @@ -20,4 +20,8 @@ function! repl#ruby#open_repl() abort execute l:vimshell_interactive l:args let l:resize = ':resize 10' execute l:resize + let l:nonum = ':set nonumber' + execute l:nonum + let l:swp = ':wincmd r' + execute l:swp endfunction diff --git a/autoload/repl/scheme.vim b/autoload/repl/scheme.vim index 989d443..79bc411 100644 --- a/autoload/repl/scheme.vim +++ b/autoload/repl/scheme.vim @@ -19,5 +19,9 @@ function! repl#scheme#open_repl() abort execute l:vimshell_interactive l:args let l:resize = ':resize 10' execute l:resize + let l:nonum = ':set nonumber' + execute l:nonum + let l:swp = ':wincmd r' + execute l:swp endfunction From 5fab7df0dca74174171f0d2995353e334ac424db Mon Sep 17 00:00:00 2001 From: Simon Zeng Date: Wed, 13 Sep 2017 22:20:56 -0400 Subject: [PATCH 08/11] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index db31d6b..7304da7 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Example for [neobundle.vim](https://github.com/Shougo/neobundle.vim) Please add the following line into your .vimrc - NeoBundle 'ujihisa/repl.vim' + NeoBundle 's-zeng/repl.vim' and run `:NeoBundleInstall`. From 1b037ec871cc2253ad7953ea82661e78974d3b7e Mon Sep 17 00:00:00 2001 From: s-zeng Date: Wed, 4 Oct 2017 20:43:00 -0400 Subject: [PATCH 09/11] Ready for pull request --- plugin/repl.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/repl.vim b/plugin/repl.vim index 334404c..00688dc 100644 --- a/plugin/repl.vim +++ b/plugin/repl.vim @@ -18,7 +18,7 @@ let g:repl#default_filetype_repl = { \ 'opt' : '--simple-prompt -r' \ }, \ 'python' : { -\ 'repl' : 'python3.6', +\ 'repl' : 'python', \ 'opt' : '-i' \ }, \ 'erlang' : { From 0b5bb9f3be9165e52d9fc52f1a672616cf000ffe Mon Sep 17 00:00:00 2001 From: s-zeng Date: Wed, 4 Oct 2017 20:48:22 -0400 Subject: [PATCH 10/11] Fixed extraneous changes --- autoload/repl/clojure.vim | 6 ------ autoload/repl/erlang.vim | 6 ------ autoload/repl/haskell.vim | 6 ------ autoload/repl/idris.vim | 6 ------ autoload/repl/javascript.vim | 7 +------ autoload/repl/python.vim | 6 ------ autoload/repl/ruby.vim | 6 ------ autoload/repl/scheme.vim | 6 ------ 8 files changed, 1 insertion(+), 48 deletions(-) diff --git a/autoload/repl/clojure.vim b/autoload/repl/clojure.vim index 74d3b0b..18b7ef9 100644 --- a/autoload/repl/clojure.vim +++ b/autoload/repl/clojure.vim @@ -19,11 +19,5 @@ function! repl#clojure#open_repl() abort let l:args = printf('%s %s', l:repl['repl'], l:repl['opt']) let l:vimshell_interactive = ':VimShellInteractive' . printf("--split='%s'", g:repl_split_command) execute l:vimshell_interactive l:args - let l:resize = ':resize 10' - execute l:resize - let l:nonum = ':set nonumber' - execute l:nonum - let l:swp = ':wincmd r' - execute l:swp call vimshell#interactive#send(printf('(load-file "%s")', l:module_file)) endfunction diff --git a/autoload/repl/erlang.vim b/autoload/repl/erlang.vim index 6fd4acc..8a1d35f 100644 --- a/autoload/repl/erlang.vim +++ b/autoload/repl/erlang.vim @@ -49,12 +49,6 @@ function! repl#erlang#open_repl() abort let l:vimshell_interactive = ':VimShellInteractive' . printf("--split='%s'", g:repl_split_command) execute l:vimshell_interactive l:args - let l:resize = ':resize 10' - let l:nonum = ':set nonumber' - execute l:nonum - let l:swp = ':wincmd r' - execute l:swp - execute l:resize call vimshell#interactive#send(printf('c(%s).', fnamemodify(l:module_file, ':t:r'))) execute 'cd' l:pwd endfunction diff --git a/autoload/repl/haskell.vim b/autoload/repl/haskell.vim index 46eef7f..67e7317 100644 --- a/autoload/repl/haskell.vim +++ b/autoload/repl/haskell.vim @@ -19,10 +19,4 @@ function! repl#haskell#open_repl() abort let l:args = printf('%s %s %s', l:repl['repl'], l:repl['opt'], l:module_file) let l:vimshell_interactive = ':VimShellInteractive' . printf("--split='%s'", g:repl_split_command) execute l:vimshell_interactive l:args - let l:resize = ':resize 10' - execute l:resize - let l:nonum = ':set nonumber' - execute l:nonum - let l:swp = ':wincmd r' - execute l:swp endfunction diff --git a/autoload/repl/idris.vim b/autoload/repl/idris.vim index 1987b26..29ceb5f 100644 --- a/autoload/repl/idris.vim +++ b/autoload/repl/idris.vim @@ -19,10 +19,4 @@ function! repl#idris#open_repl() abort let l:args = printf('%s %s %s', l:repl['repl'], l:repl['opt'], l:module_file) let l:vimshell_interactive = ':VimShellInteractive' . printf("--split='%s'", g:repl_split_command) execute l:vimshell_interactive l:args - let l:resize = ':resize 10' - execute l:resize - let l:nonum = ':set nonumber' - execute l:nonum - let l:swp = ':wincmd r' - execute l:swp endfunction diff --git a/autoload/repl/javascript.vim b/autoload/repl/javascript.vim index d7197fe..0ec7306 100644 --- a/autoload/repl/javascript.vim +++ b/autoload/repl/javascript.vim @@ -19,12 +19,7 @@ function! repl#javascript#open_repl() abort endif let l:args = printf('%s %s', l:repl['repl'], l:repl['opt']) let l:vimshell_interactive = ':VimShellInteractive' . printf("--split='%s'", g:repl_split_command) - execute l:vimshell_interactive l:args - let l:resize = ':resize 10' - execute l:resize - let l:nonum = ':set nonumber' - execute l:nonum - let l:swp = ':wincmd r' + l:swp = ':wincmd r' execute l:swp call vimshell#interactive#send('.load ' . l:module_file) endfunction diff --git a/autoload/repl/python.vim b/autoload/repl/python.vim index 2ff2cad..1228e60 100644 --- a/autoload/repl/python.vim +++ b/autoload/repl/python.vim @@ -19,10 +19,4 @@ function! repl#python#open_repl() abort let l:args = printf('%s %s %s', l:repl['repl'], l:repl['opt'], l:module_file) let l:vimshell_interactive = ':VimShellInteractive' . printf("--split='%s'", g:repl_split_command) execute l:vimshell_interactive l:args - let l:resize = ':resize 10' - execute l:resize - let l:nonum = ':set nonumber' - execute l:nonum - let l:swp = ':wincmd r' - execute l:swp endfunction diff --git a/autoload/repl/ruby.vim b/autoload/repl/ruby.vim index 4d5dc07..d5bc6e4 100644 --- a/autoload/repl/ruby.vim +++ b/autoload/repl/ruby.vim @@ -18,10 +18,4 @@ function! repl#ruby#open_repl() abort let l:args = printf('%s %s %s', l:repl['repl'], l:repl['opt'], l:module_file) let l:vimshell_interactive = ':VimShellInteractive' . printf("--split='%s'", g:repl_split_command) execute l:vimshell_interactive l:args - let l:resize = ':resize 10' - execute l:resize - let l:nonum = ':set nonumber' - execute l:nonum - let l:swp = ':wincmd r' - execute l:swp endfunction diff --git a/autoload/repl/scheme.vim b/autoload/repl/scheme.vim index 79bc411..b6d4de6 100644 --- a/autoload/repl/scheme.vim +++ b/autoload/repl/scheme.vim @@ -17,11 +17,5 @@ function! repl#scheme#open_repl() abort let l:args = printf('%s -f %s %s', l:repl['repl'], l:module_file, l:repl['opt']) let l:vimshell_interactive = ':VimShellInteractive' . printf("--split='%s'", g:repl_split_command) execute l:vimshell_interactive l:args - let l:resize = ':resize 10' - execute l:resize - let l:nonum = ':set nonumber' - execute l:nonum - let l:swp = ':wincmd r' - execute l:swp endfunction From 60298014d756b8e564003dbc2d8823b204a90182 Mon Sep 17 00:00:00 2001 From: s-zeng Date: Wed, 4 Oct 2017 20:49:37 -0400 Subject: [PATCH 11/11] Fixed extraneous changes 2 --- README.md | 2 +- autoload/repl/javascript.vim | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7304da7..db31d6b 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Example for [neobundle.vim](https://github.com/Shougo/neobundle.vim) Please add the following line into your .vimrc - NeoBundle 's-zeng/repl.vim' + NeoBundle 'ujihisa/repl.vim' and run `:NeoBundleInstall`. diff --git a/autoload/repl/javascript.vim b/autoload/repl/javascript.vim index 0ec7306..5c3e52a 100644 --- a/autoload/repl/javascript.vim +++ b/autoload/repl/javascript.vim @@ -19,7 +19,6 @@ function! repl#javascript#open_repl() abort endif let l:args = printf('%s %s', l:repl['repl'], l:repl['opt']) let l:vimshell_interactive = ':VimShellInteractive' . printf("--split='%s'", g:repl_split_command) - l:swp = ':wincmd r' - execute l:swp + execute l:vimshell_interactive l:args call vimshell#interactive#send('.load ' . l:module_file) endfunction