Skip to content

Commit

Permalink
Cleaned up
Browse files Browse the repository at this point in the history
  • Loading branch information
ubaldot committed Nov 9, 2024
1 parent 80ee271 commit 55ba95a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions lib/ftcommands_mappings.vim
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ import autoload "../lib/repl.vim"
# ------------
# TODO: make imap and tmap to work.
export def FtCommandsMappings()
noremap <Plug>ReplicaConsoleToggle
noremap <buffer> <Plug>ReplicaConsoleToggle
\ <ScriptCmd>repl.ConsoleToggle()<cr>
tnoremap <Plug>ReplicaConsoleToggle
tnoremap <buffer> <Plug>ReplicaConsoleToggle
\ <ScriptCmd>repl.ConsoleToggle()<cr>
noremap <Plug>ReplicaSendLines
noremap <buffer> <Plug>ReplicaSendLines
\ <ScriptCmd>repl.SendLines(line('.'), line('.'))<cr>
noremap <Plug>ReplicaSendFile
noremap <buffer> <Plug>ReplicaSendFile
\ <ScriptCmd>repl.SendFile()<cr>
noremap <Plug>ReplicaSendCell
noremap <buffer> <Plug>ReplicaSendCell
\ <ScriptCmd>repl.SendCell()<cr>
if g:replica_use_default_mapping == true
Expand All @@ -29,18 +29,18 @@ export def FtCommandsMappings()
endif

if !hasmapto('<Plug>ReplicaSendLines') || empty(mapcheck("<F9>", "nx"))
nnoremap <silent> <F9> <Plug>ReplicaSendLines
nnoremap <buffer> <silent> <F9> <Plug>ReplicaSendLines
# imap <silent> <F9> <Plug>ReplicaSendLines<cr>
xnoremap <silent> <F9> :ReplicaSendLines<cr>j
xnoremap <buffer> <silent> <F9> :ReplicaSendLines<cr>j
endif

if !hasmapto('<Plug>ReplicaSendFile') || empty(mapcheck("<F5>", "n"))
nnoremap <silent> <F5> <Plug>ReplicaSendFile
nnoremap <buffer> <silent> <F5> <Plug>ReplicaSendFile
# imap <silent> <F5> <Plug>ReplicaSendFile<cr>
endif

if !hasmapto('<Plug>ReplicaSendCell') || empty(mapcheck("<c-enter>", "n"))
nnoremap <silent> <c-enter> <Plug>ReplicaSendCell
nnoremap <buffer> <silent> <c-enter> <Plug>ReplicaSendCell
# imap <silent> <c-enter> <Plug>ReplicaSendCell<cr>j
endif
endif
Expand Down
2 changes: 1 addition & 1 deletion test/test_replica.vim
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def g:Test_replica_basic()
WaitForAssert(() => assert_equal(2, winnr('$')))
# TODO: Check how to remove the sleep
# It must be very generous otherwise the CI tests won't pass.
sleep 4
sleep 6
redraw!

var bufnr = term_list()[0]
Expand Down

0 comments on commit 55ba95a

Please sign in to comment.