]> git.r.bdr.sh - rbdr/dotfiles/blob - vim/tmp/conque/plugin/conque_term.vim
07f96e0893f57f11d5afec7dce6c417821cbe350
[rbdr/dotfiles] / vim / tmp / conque / plugin / conque_term.vim
1 " FILE: plugin/conque_term.vim {{{
2 " AUTHOR: Nico Raffo <nicoraffo@gmail.com>
3 " MODIFIED: 2010-05-27
4 " VERSION: 1.1, for Vim 7.0
5 " LICENSE:
6 " Conque - pty interaction in Vim
7 " Copyright (C) 2009-2010 Nico Raffo
8 "
9 " MIT License
10 "
11 " Permission is hereby granted, free of charge, to any person obtaining a copy
12 " of this software and associated documentation files (the "Software"), to deal
13 " in the Software without restriction, including without limitation the rights
14 " to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15 " copies of the Software, and to permit persons to whom the Software is
16 " furnished to do so, subject to the following conditions:
17 "
18 " The above copyright notice and this permission notice shall be included in
19 " all copies or substantial portions of the Software.
20 "
21 " THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 " IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 " FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 " AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 " LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26 " OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27 " THE SOFTWARE.
28 " }}}
29
30 " See docs/conque_term.txt for help or type :help conque_term
31
32 if exists('g:ConqueTerm_Loaded') || v:version < 700
33 finish
34 endif
35
36 " **********************************************************************************************************
37 " **** CONFIG **********************************************************************************************
38 " **********************************************************************************************************
39
40 " Choose key mapping to leave insert mode {{{
41 " If you choose something other than '<Esc>', then <Esc> will be sent to terminal
42 " Using a different key will usually fix Alt/Meta key issues
43 if !exists('g:ConqueTerm_EscKey')
44 let g:ConqueTerm_EscKey = '<Esc>'
45 endif " }}}
46
47 " Enable color. {{{
48 " If your apps use a lot of color it will slow down the shell.
49 if !exists('g:ConqueTerm_Color')
50 let g:ConqueTerm_Color = 1
51 endif " }}}
52
53 " TERM environment setting {{{
54 if !exists('g:ConqueTerm_TERM')
55 let g:ConqueTerm_TERM = 'vt100'
56 endif " }}}
57
58 " Syntax for your buffer {{{
59 if !exists('g:ConqueTerm_Syntax')
60 let g:ConqueTerm_Syntax = 'conque_term'
61 endif " }}}
62
63 " Keep on updating the shell window after you've switched to another buffer {{{
64 if !exists('g:ConqueTerm_ReadUnfocused')
65 let g:ConqueTerm_ReadUnfocused = 0
66 endif " }}}
67
68 " Use this regular expression to highlight prompt {{{
69 if !exists('g:ConqueTerm_PromptRegex')
70 let g:ConqueTerm_PromptRegex = '^\w\+@[0-9A-Za-z_.-]\+:[0-9A-Za-z_./\~,:-]\+\$'
71 endif " }}}
72
73 " Allow user to use <C-w> keys to switch window in insert mode. {{{
74 if !exists('g:ConqueTerm_CWInsert')
75 let g:ConqueTerm_CWInsert = 0
76 endif " }}}
77
78 " **********************************************************************************************************
79 " **** Startup *********************************************************************************************
80 " **********************************************************************************************************
81
82 " Startup {{{
83
84 let g:ConqueTerm_Loaded = 1
85 let g:ConqueTerm_Idx = 1
86
87 command! -nargs=+ -complete=shellcmd ConqueTerm call conque_term#open(<q-args>)
88 command! -nargs=+ -complete=shellcmd ConqueTermSplit call conque_term#open(<q-args>, ['belowright split'])
89 command! -nargs=+ -complete=shellcmd ConqueTermVSplit call conque_term#open(<q-args>, ['belowright vsplit'])
90 command! -nargs=+ -complete=shellcmd ConqueTermTab call conque_term#open(<q-args>, ['tabnew'])
91
92 " }}}
93