- Timestamp:
- 05/29/08 02:59:37 (6 months ago)
- Files:
-
- 1 modified
-
lang/vim/misc/gosh.vim (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/vim/misc/gosh.vim
r12652 r12662 4 4 " for example: let mapleader="," 5 5 command! Gosh :call <SID>Gosh() 6 command! GoshPartial :call <SID>GoshPartial() 6 7 7 8 nmap <leader>go :Gosh<cr> 9 nmap <leader>gp :GoshPartial<cr> 8 10 9 11 func! s:Gosh() 10 let cmd = join(getline(1, line("$")), "\n") 11 exe 'bo sp [gosh]' 12 call eval("append(0, split(system('echo \"'.cmd.'\" | gosh'), '\n'))") 12 call s:GoshReal(join(getline(1, line("$")), "\n")) 13 endfunc 14 15 func! s:GoshReal(cmd) 16 exe 'bo 5sp [gosh]' 17 call eval("append(0, split(system('echo \"'.a:cmd.'\" | gosh'), '\n'))") 13 18 14 19 setlocal nomodifiable … … 21 26 setlocal nowrap 22 27 noremap <buffer> <silent> q :close<cr> 28 noremap <buffer> <silent> <Enter> :close<cr> 23 29 endfunc 30 31 func! s:GoshPartial() 32 normal "ay% 33 call s:GoshReal('(print '.getreg('a').')') 34 endfunc
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)