Skip to content
Browse files

Improve default mappings

  • Loading branch information...
1 parent 5fdb988 commit a33572dcd189396eef765eb80f7425697d81f0fa @Shougo committed Feb 17, 2014
Showing with 16 additions and 2 deletions.
  1. +9 −1 autoload/vimshell/mappings.vim
  2. +7 −1 doc/vimshell.txt
View
10 autoload/vimshell/mappings.vim
@@ -1,7 +1,7 @@
"=============================================================================
" FILE: mappings.vim
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
-" Last Modified: 20 Jan 2014.
+" Last Modified: 17 Feb 2014.
" License: MIT license {{{
" Permission is hereby granted, free of charge, to any person obtaining
" a copy of this software and associated documentation files (the
@@ -171,6 +171,14 @@ function! vimshell#mappings#define_default_mappings() "{{{
" History completion.
imap <buffer> <C-l> <Plug>(vimshell_history_unite)
+ inoremap <buffer><expr> <C-p> pumvisible() ? "\<C-p>" :
+ \ neocomplete#start_manual_complete('vimshell/history')."\<C-p>\<C-p>"
+ inoremap <buffer><expr> <C-n> pumvisible() ? "\<C-n>" :
+ \ neocomplete#start_manual_complete('vimshell/history')."\<C-p>\<C-n>"
+ inoremap <buffer><expr> <Up> pumvisible() ? "\<C-p>" :
+ \ neocomplete#start_manual_complete('vimshell/history')."\<C-p>"
+ inoremap <buffer><expr> <Down> pumvisible() ? "\<C-n>" :
+ \ neocomplete#start_manual_complete('vimshell/history')."\<C-p>\<C-n>"
" Command completion.
imap <buffer> <TAB> <Plug>(vimshell_command_complete)
View
8 doc/vimshell.txt
@@ -666,6 +666,7 @@ Insert mode key mappings.
Execute vimshell history by neocomplete interface.
Note: To use it, you must install |neocomplete| plugin.
+ *vimshell_default_key_mappings*
Normal mode default key mappings.
{lhs} {rhs}
-------- -----------------------------
@@ -688,17 +689,21 @@ a <Plug>(vimshell_append_enter)
<C-l> <Plug>(vimshell_clear)
<C-z> <Plug>(vimshell_execute_by_background)
+ *v_vimshell_default_key_mappings*
Visual mode default key mappings.
{lhs} {rhs}
-------- -----------------------------
<C-p> <Plug>(vimshell_select_previous_prompt)
<C-n> <Plug>(vimshell_select_next_prompt)
+ *i_vimshell_default_key_mappings*
Insert mode default key mappings.
{lhs} {rhs}
-------- -----------------------------
<CR> <Plug>(vimshell_enter)
<C-l> <Plug>(vimshell_history_unite)
+<C-p>/<Up> <Plug>(vimshell_history_neocomplete)
+<C-n>/<Down> <Plug>(vimshell_history_neocomplete)
<TAB> <Plug>(vimshell_command_complete)
<C-a> <Plug>(vimshell_move_head)
<C-u> <Plug>(vimshell_delete_backward_line)
@@ -807,7 +812,7 @@ Insert mode key mappings.
Execute vimshell history by unite interface.
Note: To use it, you must install |unite.vim| plugin.
-
+ *vimshell_int_default_key_mappings*
Normal mode default key mappings.
{lhs} {rhs}
-------- -----------------------------
@@ -826,6 +831,7 @@ i <Plug>(vimshell_int_insert_enter)
a <Plug>(vimshell_int_append_enter)
<C-l> <Plug>(vimshell_int_clear)
+ *i_vimshell_int_default_key_mappings*
Insert mode default key mappings.
{lhs} {rhs}
-------- -----------------------------

0 comments on commit a33572d

Please sign in to comment.
Something went wrong with that request. Please try again.