Skip to content
Browse files

- Improved set variables.

  • Loading branch information...
1 parent 0506b8b commit 6cd5d19f3acdcb9d9451b8547e06c3da58fc508f @Shougo Shougo committed Jul 20, 2011
View
2 autoload/vimshell.vim
@@ -1,7 +1,7 @@
"=============================================================================
" FILE: vimshell.vim
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
-" Last Modified: 06 Jul 2011.
+" Last Modified: 20 Jul 2011.
" License: MIT license {{{
" Permission is hereby granted, free of charge, to any person obtaining
" a copy of this software and associated documentation files (the
View
8 autoload/vimshell/commands/bg.vim
@@ -1,7 +1,7 @@
"=============================================================================
" FILE: bg.vim
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
-" Last Modified: 01 Jul 2011.
+" Last Modified: 20 Jul 2011.
" License: MIT license {{{
" Permission is hereby granted, free of charge, to any person obtaining
" a copy of this software and associated documentation files (the
@@ -61,9 +61,9 @@ function! s:command.execute(commands, context)"{{{
" Set environment variables.
let l:environments_save = vimshell#set_variables({
- \ '$TERM' : g:vimshell_environment_term,
- \ '$TERMCAP' : 'COLUMNS=' . winwidth(0),
- \ '$VIMSHELL' : 1,
+ \ '$TERM' : g:vimshell_environment_term,
+ \ '$TERMCAP' : 'COLUMNS=' . winwidth(0)-5,
+ \ '$VIMSHELL' : 1,
\ '$COLUMNS' : winwidth(0)-5,
\ '$LINES' : winheight(0),
\ '$VIMSHELL_TERM' : 'background',
View
8 autoload/vimshell/commands/exe.vim
@@ -1,7 +1,7 @@
"=============================================================================
" FILE: exe.vim
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
-" Last Modified: 01 Jul 2011.
+" Last Modified: 20 Jul 2011.
" License: MIT license {{{
" Permission is hereby granted, free of charge, to any person obtaining
" a copy of this software and associated documentation files (the
@@ -107,9 +107,9 @@ function! s:init_process(commands, context, options)"{{{
" Set environment variables.
let l:environments_save = vimshell#set_variables({
- \ '$TERM' : g:vimshell_environment_term,
- \ '$TERMCAP' : 'COLUMNS=' . winwidth(0),
- \ '$VIMSHELL' : 1,
+ \ '$TERM' : g:vimshell_environment_term,
+ \ '$TERMCAP' : 'COLUMNS=' . winwidth(0)-5,
+ \ '$VIMSHELL' : 1,
\ '$COLUMNS' : winwidth(0)-5,
\ '$LINES' : winheight(0),
\ '$VIMSHELL_TERM' : 'execute',
View
16 autoload/vimshell/commands/iexe.vim
@@ -1,7 +1,7 @@
"=============================================================================
" FILE: iexe.vim
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
-" Last Modified: 16 Jun 2011.
+" Last Modified: 20 Jul 2011.
" License: MIT license {{{
" Permission is hereby granted, free of charge, to any person obtaining
" a copy of this software and associated documentation files (the
@@ -111,11 +111,15 @@ function! s:command.execute(commands, context)"{{{
\})
endif
+ let l:save_winnr = winnr()
+
+ call s:init_bg(l:args, a:context)
+
" Set environment variables.
let l:environments_save = vimshell#set_variables({
- \ '$TERM' : g:vimshell_environment_term,
- \ '$TERMCAP' : 'COLUMNS=' . winwidth(0),
- \ '$VIMSHELL' : 1,
+ \ '$TERM' : g:vimshell_environment_term,
+ \ '$TERMCAP' : 'COLUMNS=' . winwidth(0)-5,
+ \ '$VIMSHELL' : 1,
\ '$COLUMNS' : winwidth(0)-5,
\ '$LINES' : winheight(0),
\ '$VIMSHELL_TERM' : 'interactive',
@@ -134,10 +138,6 @@ function! s:command.execute(commands, context)"{{{
call vimshell#restore_variables(l:home_save)
endif
- let l:save_winnr = winnr()
-
- call s:init_bg(l:args, a:context)
-
" Set variables.
let b:interactive = {
\ 'type' : 'interactive',
View
13 autoload/vimshell/commands/texe.vim
@@ -1,7 +1,7 @@
"=============================================================================
" FILE: texe.vim
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
-" Last Modified: 01 Jun 2011.
+" Last Modified: 20 Jul 2011.
" License: MIT license {{{
" Permission is hereby granted, free of charge, to any person obtaining
" a copy of this software and associated documentation files (the
@@ -93,11 +93,14 @@ function! s:command.execute(commands, context)"{{{
\})
endif
+ let l:save_winnr = winnr()
+ call s:init_bg(l:args, a:context)
+
" Set environment variables.
let l:environments_save = vimshell#set_variables({
- \ '$TERM' : g:vimshell_environment_term,
- \ '$TERMCAP' : 'COLUMNS=' . winwidth(0),
- \ '$VIMSHELL' : 1,
+ \ '$TERM' : g:vimshell_environment_term,
+ \ '$TERMCAP' : 'COLUMNS=' . winwidth(0)-5,
+ \ '$VIMSHELL' : 1,
\ '$COLUMNS' : winwidth(0)-5,
\ '$LINES' : winheight(0),
\ '$VIMSHELL_TERM' : 'terminal',
@@ -116,8 +119,6 @@ function! s:command.execute(commands, context)"{{{
call vimshell#restore_variables(l:home_save)
endif
- let l:save_winnr = winnr()
- call s:init_bg(l:args, a:context)
" Set variables.
let b:interactive = {
View
8 autoload/vimshell/int_mappings.vim
@@ -32,7 +32,7 @@ function! vimshell#int_mappings#define_default_mappings()"{{{
inoremap <buffer><expr> <Plug>(vimshell_int_delete_backward_line) <SID>delete_backward_line()
inoremap <buffer><expr> <Plug>(vimshell_int_delete_backward_word) vimshell#interactive#get_cur_text() == '' ? '' : "\<C-w>"
inoremap <buffer><silent> <Plug>(vimshell_int_execute_line) <C-g>u<ESC>:<C-u>call vimshell#execute_current_line(1)<CR>
- inoremap <buffer><silent> <Plug>(vimshell_int_interrupt) <C-o>:<C-u>call vimshell#interactive#hang_up(bufname('%'))<CR>
+ inoremap <buffer><silent> <Plug>(vimshell_int_hangup) <C-o>:<C-u>call vimshell#interactive#hang_up(bufname('%'))<CR>
inoremap <buffer><expr> <Plug>(vimshell_int_delete_backward_char) <SID>delete_backward_char(0)
inoremap <buffer><expr> <Plug>(vimshell_int_another_delete_backward_char) <SID>delete_backward_char(1)
inoremap <buffer><expr> <Plug>(vimshell_int_history_complete) vimshell#complete#interactive_history_complete#complete()
@@ -45,7 +45,7 @@ function! vimshell#int_mappings#define_default_mappings()"{{{
nnoremap <buffer><silent> <Plug>(vimshell_int_next_prompt) :<C-u>call <SID>next_prompt()<CR>
nnoremap <buffer><silent> <Plug>(vimshell_int_execute_line) :<C-u>call vimshell#execute_current_line(0)<CR>
nnoremap <buffer><silent> <Plug>(vimshell_int_paste_prompt) :<C-u>call <SID>paste_prompt()<CR>
- nnoremap <buffer><silent> <Plug>(vimshell_int_interrupt) :<C-u>call vimshell#interactive#hang_up(bufname('%'))<CR>
+ nnoremap <buffer><silent> <Plug>(vimshell_int_interrupt) :<C-u>call vimshell#interactive#send_char("\<C-c>")<CR>
nnoremap <buffer><silent> <Plug>(vimshell_int_exit) :<C-u>call vimshell#interactive#quit_buffer()<CR>
nnoremap <buffer><silent> <Plug>(vimshell_int_restart_command) :<C-u>call <SID>restart_command()<CR>
nnoremap <buffer><expr> <Plug>(vimshell_int_change_line) vimshell#interactive#get_prompt() == '' ? 'ddO' : printf('0%dlc$', vimshell#util#strchars(vimshell#interactive#get_prompt()))
@@ -67,7 +67,7 @@ function! vimshell#int_mappings#define_default_mappings()"{{{
nmap <buffer> <CR> <Plug>(vimshell_int_execute_line)
nmap <buffer> <C-y> <Plug>(vimshell_int_paste_prompt)
nmap <buffer> <C-z> <Plug>(vimshell_int_restart_command)
- nmap <buffer> <C-c> <Plug>(vimshell_int_interrupt)
+ nmap <buffer> <C-c> <Plug>(vimshell_int_hangup)
nmap <buffer> q <Plug>(vimshell_int_exit)
nmap <buffer> cc <Plug>(vimshell_int_change_line)
nmap <buffer> dd <Plug>(vimshell_int_delete_line)
@@ -281,6 +281,8 @@ function! s:append_end()"{{{
call s:insert_enter()
startinsert!
endfunction"}}}
+function! s:send_intrrupt()"{{{
+endfunction"}}}
function! s:clear()"{{{
set modifiable
View
1 doc/vimshell.txt
@@ -219,6 +219,7 @@ CHANGELOG *vimshell-changelog*
2011-07-20
- Fixed complete error in interactive buffer.
+- Improved set variables.
2011-07-13
- Fixed clear bug.

0 comments on commit 6cd5d19

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