Skip to content

Commit

Permalink
Remove <buffer> in history keybindings + doc. Doc for vertical split
Browse files Browse the repository at this point in the history
<buffer> made the key bindings not work for some users
  • Loading branch information
mascip committed Aug 2, 2014
1 parent be48511 commit 0abb40a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
20 changes: 13 additions & 7 deletions README.markdown
Expand Up @@ -39,18 +39,22 @@ To access the other repl, use `:Repl` or `:ReplHere`. The former opens a new
split window containing a repl in the namespace `user`. The latter opens the
repl in the namespace of the current file.

If you don't reconfigure the plugs below, these are the default controls for
the repl:
To open this repl in a vertical split (rather than horizontal), you can set this option in your .vimrc:

let g:redl_use_vsplit = 1

The default controls for the repl are:

- `ctrl-e` in insert mode evaluates the current line, regardless of cursor position.
- `return` in insert mode at the end of the line evaluates the line, otherwise inserts a newline.
- `ctrl-up` goes up in the history
- `ctrl-down` goes down in the history
- `ctrl-up` in insert mode goes up in the history
- `ctrl-down` in insert mode goes down in the history

If some of these key bindings don't work on your machine, you can try to redefine them in your .vimrc. For example:

To use the breakpoint feature, check out dgrnbrg/redl (short version: `redl.core/break`
and `redl.core/continue`.
imap <silent> <C-S-K> <Plug>clj_repl_uphist.

The plugs for the repl:
To change key bindings, the plugs for the repl are:

<Plug>clj_repl_enter.
<Plug>clj_repl_eval.
Expand All @@ -59,6 +63,8 @@ The plugs for the repl:
<Plug>clj_repl_uphist.
<Plug>clj_repl_downhist.

To use the breakpoint feature, check out [dgrnbrg/redl](https://github.com/dgrnbrg/redl)
(short version: `(redl.core/break)`, and then `(redl.core/continue)` in the debug sub-repl).

### Omnicomplete

Expand Down
5 changes: 3 additions & 2 deletions plugin/redl/repl.vim
Expand Up @@ -105,10 +105,11 @@ function! redl#repl#create(namespace)
nmap <buffer> <silent> I <Plug>clj_repl_Ins.
endif
if !hasmapto("<Plug>clj_repl_uphist.", "i")
imap <buffer> <silent> <C-Up> <Plug>clj_repl_uphist.
imap <silent> <C-Up> <Plug>clj_repl_uphist.
endif
if !hasmapto("<Plug>clj_repl_downhist.", "i")
imap <buffer> <silent> <C-Down> <Plug>clj_repl_downhist.
imap <silent> <C-Down> <Plug>clj_repl_downhist.
" Note: <buffer> made the history command not work for some users
endif

call redl#repl#show_prompt()
Expand Down

0 comments on commit 0abb40a

Please sign in to comment.