vimrc: Add conque_term
[cmccabe-etc] / .vim / plugin / conque_term.vim
1 " FILE:     plugin/conque_term.vim {{{
2 " AUTHOR:   Nico Raffo <nicoraffo@gmail.com>
3 " MODIFIED: 2010-02-02
4 " VERSION:  1.0, 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 " Enable color {{{
41 if !exists('g:ConqueTerm_Color')
42     let g:ConqueTerm_Color = 1
43 endif " }}}
44
45 " TERM environment setting {{{
46 if !exists('g:ConqueTerm_TERM')
47     let g:ConqueTerm_TERM =  'vt100'
48 endif " }}}
49
50 " Syntax for your buffer {{{
51 if !exists('g:ConqueTerm_Syntax')
52     let g:ConqueTerm_Syntax = 'conque_term'
53 endif " }}}
54
55 " Read when unfocused {{{
56 if !exists('g:ConqueTerm_ReadUnfocused')
57     let g:ConqueTerm_ReadUnfocused = 1
58 endif " }}}
59
60 " Use this regular expression to highlight prompt {{{
61 if !exists('g:ConqueTerm_PromptRegex')
62     let g:ConqueTerm_PromptRegex = '^\w\+@[0-9A-Za-z_.-]\+:[0-9A-Za-z_./\~,:-]\+\$'
63 endif " }}}
64
65 " **********************************************************************************************************
66 " **** Startup *********************************************************************************************
67 " **********************************************************************************************************
68
69 " Startup {{{
70 setlocal encoding=utf-8
71
72 let g:ConqueTerm_Loaded = 1
73 let g:ConqueTerm_Idx = 1
74
75 command! -nargs=+ -complete=shellcmd ConqueTerm call conque_term#open(<q-args>)
76 command! -nargs=+ -complete=shellcmd ConqueTermSplit call conque_term#open(<q-args>, ['split'])
77 command! -nargs=+ -complete=shellcmd ConqueTermVSplit call conque_term#open(<q-args>, ['vsplit'])
78
79 " }}}
80