2
2
" FILE: vimshell.vim
3
3
" AUTHOR: Janakiraman .S <[email protected] >(Original)
4
4
" Shougo Matsushita <[email protected] >(Modified)
5
- " Last Modified: 14 Sep 2009
5
+ " Last Modified: 22 Sep 2009
6
6
" License: MIT license {{{
7
7
" Permission is hereby granted, free of charge, to any person obtaining
8
8
" a copy of this software and associated documentation files (the
23
23
" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24
24
" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
25
" }}}
26
- " Version: 5.34 , for Vim 7.0
26
+ " Version: 5.35 , for Vim 7.0
27
27
" =============================================================================
28
28
29
29
if exists (' g:loaded_vimshell' ) || v: version < 700
30
30
finish
31
31
endif
32
32
33
+ let s: save_cpo = &cpo
34
+ set cpo &vim
35
+
33
36
" Plugin keymapping"{{{
34
37
nnoremap <silent> <Plug> (vimshell_split_switch) :<C-u> call vimshell#switch_shell(1)<CR>
35
38
nnoremap <silent> <Plug> (vimshell_split_create) :<C-u> call vimshell#create_shell(1)<CR>
@@ -40,6 +43,7 @@ nnoremap <silent> <Plug>(vimshell_previous_prompt) :<C-u>call vimshell#previous
40
43
nnoremap <silent> <Plug> (vimshell_next_prompt) :<C-u> call vimshell#next_prompt()<CR>
41
44
nnoremap <silent> <Plug> (vimshell_delete_previous_output) :<C-u> call vimshell#delete_previous_output()<CR>
42
45
nnoremap <silent> <Plug> (vimshell_paste_prompt) :<C-u> call vimshell#paste_prompt()<CR>
46
+ nnoremap <silent> <Plug> (vimshell_move_end_argument) 0:<C-u> call search('\\\@<!\s\zs[^[:space:]]*$', '', line('.'))<CR>
43
47
44
48
inoremap <silent> <Plug> (vimshell_push_current_line) <ESC> :<C-u> call vimshell#push_current_line()<CR>
45
49
inoremap <silent> <Plug> (vimshell_insert_last_word) <ESC> :<C-u> call vimshell#insert_last_word()<CR>
@@ -119,6 +123,9 @@ command! -nargs=0 VimShell call vimshell#switch_shell(0)
119
123
command ! -nargs =+ -complete =shellcmd VimShellExecute call vimshell#internal#bg#vimshell_bg (split (<q-args> ))
120
124
command ! -nargs =+ -complete =shellcmd VimShellInteractive call vimshell#internal#iexe#vimshell_iexe (split (<q-args> ))
121
125
126
+ let &cpo = s: save_cpo
127
+ unlet s: save_cpo
128
+
122
129
let g: loaded_vimshell = 1
123
130
124
131
" vim: foldmethod = marker
0 commit comments