Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion plugin/split-term.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

let s:force_vertical = exists('g:split_term_vertical') ? 1 : 0
let s:map_keys = exists('g:disable_key_mappings') ? 0 : 1

" utilities around neovim's :term

Expand Down Expand Up @@ -55,7 +56,9 @@ fun! s:openTerm(args, count, vertical)
call s:openBuffer(a:count, direction)
exe 'terminal' a:args
exe 'startinsert'
call s:defineMaps()
if s:map_keys
call s:defineMaps()
endif
endf

command! -count -nargs=* Term call s:openTerm(<q-args>, <count>, 0)
Expand Down
5 changes: 4 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,12 @@ REPL.
- `set splitright` will put the new window right of the current one when using `:VTerm`
- `set splitbelow` will put the new window below the current one when using `:Term`

- `g:disable_key_mappings` - disable key mappings of the plugin

## Mappings

The plugin remaps specifically a few keys for a better terminal buffer experience.
The plugin remaps specifically a few keys for a better terminal buffer experience. This
behaviour can be disabled using `g:disable_key_mappings`.

- `<Esc>` - Switch to normal mode (instead of `<C-\><C-n>`)
- Bind Alt+hjkl, Ctrl+arrows to navigate through windows (eg. switching to buffer/windows left, right etc.)
Expand Down