docvim-0.3.1.2: tests/fixtures/integration/terminus/golden/ast.golden
Project
[ Project
[ Unit
[ FunctionDeclaration
{ functionBang = True
, functionName = "s:escape"
, functionArguments = ArgumentList [ Argument "string" ]
, functionAttributes = [ "abort" ]
, functionBody =
[ GenericStatement
"return substitute(a:string, \"\\<Esc>\", \"\\<Esc>\\<Esc>\", 'g')"
]
}
, FunctionDeclaration
{ functionBang = True
, functionName = "terminus#private#wrap"
, functionArguments = ArgumentList [ Argument "string" ]
, functionAttributes = [ "abort" ]
, functionBody =
[ GenericStatement "if strlen(a:string) == 0"
, GenericStatement "return ''"
, GenericStatement "end"
, LetStatement
{ letLexpr = "l:tmux_begin" , letValue = "\"\\<Esc>Ptmux;\"" }
, LetStatement
{ letLexpr = "l:tmux_end" , letValue = "\"\\<Esc>\\\\\"" }
, GenericStatement
"return l:tmux_begin . s:escape(a:string) . l:tmux_end"
]
}
, FunctionDeclaration
{ functionBang = True
, functionName = "terminus#private#focus_lost"
, functionArguments = ArgumentList []
, functionAttributes = [ "abort" ]
, functionBody =
[ LetStatement
{ letLexpr = "l:cmdline" , letValue = "getcmdline()" }
, LetStatement { letLexpr = "l:cmdpos" , letValue = "getcmdpos()" }
, GenericStatement "silent doautocmd FocusLost %"
, GenericStatement "call setcmdpos(l:cmdpos)"
, GenericStatement "return l:cmdline"
]
}
, FunctionDeclaration
{ functionBang = True
, functionName = "terminus#private#focus_gained"
, functionArguments = ArgumentList []
, functionAttributes = [ "abort" ]
, functionBody =
[ LetStatement
{ letLexpr = "l:cmdline" , letValue = "getcmdline()" }
, LetStatement { letLexpr = "l:cmdpos" , letValue = "getcmdpos()" }
, GenericStatement "silent! doautocmd FocusGained %"
, GenericStatement "call setcmdpos(l:cmdpos)"
, GenericStatement "return l:cmdline"
]
}
, FunctionDeclaration
{ functionBang = True
, functionName = "terminus#private#paste"
, functionArguments = ArgumentList [ Argument "ret" ]
, functionAttributes = [ "abort" ]
, functionBody =
[ GenericStatement "set paste" , GenericStatement "return a:ret" ]
}
]
, Unit
[ GenericStatement
"if exists('g:TerminusLoaded') || &compatible || v:version < 700"
, GenericStatement "finish"
, GenericStatement "endif"
, LetStatement { letLexpr = "g:TerminusLoaded" , letValue = "1" }
, LetStatement
{ letLexpr = "s:cpoptions" , letValue = "&cpoptions" }
, GenericStatement "set cpoptions&vim"
, GenericStatement
"set autoread \" if not changed in Vim, automatically pick up changes after \"git checkout\" etc"
, GenericStatement
"if &ttimeoutlen == -1 && &timeoutlen > 50 || &ttimeoutlen > 50"
, GenericStatement
"set ttimeoutlen=50 \" speed up O etc in the Terminal"
, GenericStatement "endif"
, LetStatement
{ letLexpr = "s:iterm" , letValue = "exists('$ITERM_PROFILE') ||" }
, GenericStatement
"\\ exists('$ITERM_SESSION_ID') || exists('$KONSOLE_DBUS_SESSION') || exists('$KONSOLE_PROFILE_NAME') || exists('g:TerminusAssumeITerm') || filereadable(expand('~/.vim/.assume-iterm'))"
, LetStatement
{ letLexpr = "s:screenish"
, letValue = "&term =~# 'screen\\|tmux'"
}
, LetStatement
{ letLexpr = "s:tmux" , letValue = "exists('$TMUX')" }
, LetStatement
{ letLexpr = "s:xterm" , letValue = "&term =~# 'xterm'" }
, LetStatement
{ letLexpr = "s:shape"
, letValue = "get(g:, 'TerminusCursorShape', 1)"
}
, GenericStatement "if s:shape"
, LetStatement
{ letLexpr = "s:insert_shape"
, letValue = "+get(g:, 'TerminusInsertCursorShape', 1)"
}
, LetStatement
{ letLexpr = "s:replace_shape"
, letValue = "+get(g:, 'TerminusReplaceCursorShape', 2)"
}
, LetStatement
{ letLexpr = "s:normal_shape"
, letValue = "+get(g:, 'TerminusNormalCursorShape', 0)"
}
, GenericStatement "if s:iterm"
, LetStatement
{ letLexpr = "s:start_insert"
, letValue =
"\"\\<Esc>]50;CursorShape=\" . s:insert_shape . \"\\x7\""
}
, LetStatement
{ letLexpr = "s:start_replace"
, letValue =
"\"\\<Esc>]50;CursorShape=\" . s:replace_shape . \"\\x7\""
}
, LetStatement
{ letLexpr = "s:end_insert"
, letValue =
"\"\\<Esc>]50;CursorShape=\" . s:normal_shape . \"\\x7\""
}
, GenericStatement "else"
, LetStatement
{ letLexpr = "s:cursor_shape_to_vte_shape"
, letValue = "{1: 6, 2: 4, 0: 2}"
}
, LetStatement
{ letLexpr = "s:insert_shape"
, letValue = "s:cursor_shape_to_vte_shape[s:insert_shape]"
}
, LetStatement
{ letLexpr = "s:replace_shape"
, letValue = "s:cursor_shape_to_vte_shape[s:replace_shape]"
}
, LetStatement
{ letLexpr = "s:normal_shape"
, letValue = "s:cursor_shape_to_vte_shape[s:normal_shape]"
}
, LetStatement
{ letLexpr = "s:start_insert"
, letValue = "\"\\<Esc>[\" . s:insert_shape . ' q'"
}
, LetStatement
{ letLexpr = "s:start_replace"
, letValue = "\"\\<Esc>[\" . s:replace_shape . ' q'"
}
, LetStatement
{ letLexpr = "s:end_insert"
, letValue = "\"\\<Esc>[\" . s:normal_shape . ' q'"
}
, GenericStatement "endif"
, GenericStatement "if s:tmux"
, LetStatement
{ letLexpr = "s:start_insert"
, letValue = "terminus#private#wrap(s:start_insert)"
}
, LetStatement
{ letLexpr = "s:start_replace"
, letValue = "terminus#private#wrap(s:start_replace)"
}
, LetStatement
{ letLexpr = "s:end_insert"
, letValue = "terminus#private#wrap(s:end_insert)"
}
, GenericStatement "endif"
, LetStatement { letLexpr = "&t_SI" , letValue = "s:start_insert" }
, GenericStatement
"if v:version > 704 || v:version == 704 && has('patch687')"
, LetStatement
{ letLexpr = "&t_SR" , letValue = "s:start_replace" }
, GenericStatement "end"
, LetStatement { letLexpr = "&t_EI" , letValue = "s:end_insert" }
, GenericStatement "endif"
, LetStatement
{ letLexpr = "s:mouse" , letValue = "get(g:, 'TerminusMouse', 1)" }
, GenericStatement "if s:mouse"
, GenericStatement "if has('mouse')"
, GenericStatement "set mouse=a"
, GenericStatement "if s:screenish || s:xterm"
, GenericStatement "if !has('nvim')"
, GenericStatement "if has('mouse_sgr')"
, GenericStatement "set ttymouse=sgr"
, GenericStatement "else"
, GenericStatement "set ttymouse=xterm2"
, GenericStatement "endif"
, GenericStatement "endif"
, GenericStatement "endif"
, GenericStatement "endif"
, GenericStatement "endif"
, LetStatement
{ letLexpr = "s:focus"
, letValue = "get(g:, 'TerminusFocusReporting', 1)"
}
, GenericStatement "if s:focus"
, GenericStatement "if has('autocmd')"
, GenericStatement "augroup Terminus"
, GenericStatement "autocmd!"
, GenericStatement "autocmd FocusGained * checktime"
, GenericStatement "augroup END"
, GenericStatement "endif"
, LetStatement
{ letLexpr = "&t_ti." , letValue = "\"\\e[?1004h\"" }
, LetStatement
{ letLexpr = "&t_te" , letValue = "\"\\e[?1004l\" . &t_te" }
, GenericStatement "execute \"set <f20>=\\<Esc>[O\""
, GenericStatement "execute \"set <f21>=\\<Esc>[I\""
, GenericStatement
"cnoremap <silent> <f20> <c-\\>eterminus#private#focus_lost()<cr>"
, GenericStatement
"cnoremap <silent> <f21> <c-\\>eterminus#private#focus_gained()<cr>"
, GenericStatement
"if v:version > 703 || v:version == 703 && has('patch438')"
, GenericStatement
"inoremap <silent> <f20> <c-o>:silent doautocmd <nomodeline> FocusLost %<cr>"
, GenericStatement
"inoremap <silent> <f21> <c-o>:silent doautocmd <nomodeline> FocusGained %<cr>"
, GenericStatement
"nnoremap <silent> <f20> :silent doautocmd <nomodeline> FocusLost %<cr>"
, GenericStatement
"nnoremap <silent> <f21> :silent doautocmd <nomodeline> FocusGained %<cr>"
, GenericStatement
"onoremap <silent> <f20> <Esc>:silent doautocmd <nomodeline> FocusLost %<cr>"
, GenericStatement
"onoremap <silent> <f21> <Esc>:silent doautocmd <nomodeline> FocusGained %<cr>"
, GenericStatement
"vnoremap <silent> <f20> <Esc>:silent doautocmd <nomodeline> FocusLost %<cr>gv"
, GenericStatement
"vnoremap <silent> <f21> <Esc>:silent doautocmd <nomodeline> FocusGained %<cr>gv"
, GenericStatement "else"
, GenericStatement
"inoremap <silent> <f20> <c-o>:silent doautocmd FocusLost %<cr>"
, GenericStatement
"inoremap <silent> <f21> <c-o>:silent doautocmd FocusGained %<cr>"
, GenericStatement
"nnoremap <silent> <f20> :silent doautocmd FocusLost %<cr>"
, GenericStatement
"nnoremap <silent> <f21> :silent doautocmd FocusGained %<cr>"
, GenericStatement
"onoremap <silent> <f20> <Esc>:silent doautocmd FocusLost %<cr>"
, GenericStatement
"onoremap <silent> <f21> <Esc>:silent doautocmd FocusGained %<cr>"
, GenericStatement
"vnoremap <silent> <f20> <Esc>:silent doautocmd FocusLost %<cr>gv"
, GenericStatement
"vnoremap <silent> <f21> <Esc>:silent doautocmd FocusGained %<cr>gv"
, GenericStatement "endif"
, GenericStatement "endif"
, LetStatement
{ letLexpr = "s:paste"
, letValue = "get(g:, 'TerminusBracketedPaste', 1)"
}
, GenericStatement "if s:paste"
, GenericStatement "if s:screenish || s:xterm"
, LetStatement
{ letLexpr = "&t_ti." , letValue = "\"\\e[?2004h\"" }
, LetStatement
{ letLexpr = "&t_te" , letValue = "\"\\e[?2004l\" . &t_te" }
, GenericStatement "set pastetoggle=<Esc>[201~"
, GenericStatement
"inoremap <expr> <Esc>[200~ terminus#private#paste('')"
, GenericStatement
"nnoremap <expr> <Esc>[200~ terminus#private#paste('i')"
, GenericStatement
"vnoremap <expr> <Esc>[200~ terminus#private#paste('c')"
, GenericStatement "cnoremap <Esc>[200~ <nop>"
, GenericStatement "cnoremap <Esc>[201~ <nop>"
, GenericStatement "endif"
, GenericStatement "endif"
, LetStatement
{ letLexpr = "&cpoptions" , letValue = "s:cpoptions" }
, UnletStatement { unletBang = False , unletBody = "s:cpoptions" }
]
]
]