���ѧۧݧ�ӧ�� �ާ֧ߧ֧էا֧� - ���֧էѧܧ�ڧ��ӧѧ�� - /home/ukubnwwtacc0unt/chapelbellstudios.com/uploads/cover/plugin.zip
���ѧ٧ѧ�
PK ���\dѠ�# �# justify.vimnu �[��� " Function to left and right align text. " " Written by: Preben "Peppe" Guldberg <c928400@student.dtu.dk> " Created: 980806 14:13 (or around that time anyway) " Revised: 001103 00:36 (See "Revisions" below) " function Justify( [ textwidth [, maxspaces [, indent] ] ] ) " " Justify() will left and right align a line by filling in an " appropriate amount of spaces. Extra spaces are added to existing " spaces starting from the right side of the line. As an example, the " following documentation has been justified. " " The function takes the following arguments: " textwidth argument " ------------------ " If not specified, the value of the 'textwidth' option is used. If " 'textwidth' is zero a value of 80 is used. " " Additionally the arguments 'tw' and '' are accepted. The value of " 'textwidth' will be used. These are handy, if you just want to specify " the maxspaces argument. " maxspaces argument " ------------------ " If specified, alignment will only be done, if the longest space run " after alignment is no longer than maxspaces. " " An argument of '' is accepted, should the user like to specify all " arguments. " " To aid user defined commands, negative values are accepted aswell. " Using a negative value specifies the default behaviour: any length of " space runs will be used to justify the text. " indent argument " --------------- " This argument specifies how a line should be indented. The default is " to keep the current indentation. " " Negative values: Keep current amount of leading whitespace. " Positive values: Indent all lines with leading whitespace using this " amount of whitespace. " " Note that the value 0, needs to be quoted as a string. This value " leads to a left flushed text. " " Additionally units of 'shiftwidth'/'sw' and 'tabstop'/'ts' may be " added. In this case, if the value of indent is positive, the amount of " whitespace to be added will be multiplied by the value of the " 'shiftwidth' and 'tabstop' settings. If these units are used, the " argument must be given as a string, eg. Justify('','','2sw'). " " If the values of 'sw' or 'tw' are negative, they are treated as if " they were 0, which means that the text is flushed left. There is no " check if a negative number prefix is used to change the sign of a " negative 'sw' or 'ts' value. " " As with the other arguments, '' may be used to get the default " behaviour. " Notes: " " If the line, adjusted for space runs and leading/trailing whitespace, " is wider than the used textwidth, the line will be left untouched (no " whitespace removed). This should be equivalent to the behaviour of " :left, :right and :center. " " If the resulting line is shorter than the used textwidth it is left " untouched. " " All space runs in the line are truncated before the alignment is " carried out. " " If you have set 'noexpandtab', :retab! is used to replace space runs " with whitespace using the value of 'tabstop'. This should be " conformant with :left, :right and :center. " " If joinspaces is set, an extra space is added after '.', '?' and '!'. " If 'cpooptions' include 'j', extra space is only added after '.'. " (This may on occasion conflict with maxspaces.) " Related mappings: " " Mappings that will align text using the current text width, using at " most four spaces in a space run and keeping current indentation. nmap _j :%call Justify('tw',4)<CR> vmap _j :call Justify('tw',4)<CR> " " Mappings that will remove space runs and format lines (might be useful " prior to aligning the text). nmap ,gq :%s/\s\+/ /g<CR>gq1G vmap ,gq :s/\s\+/ /g<CR>gvgq " User defined command: " " The following is an ex command that works as a shortcut to the Justify " function. Arguments to Justify() can be added after the command. com! -range -nargs=* Justify <line1>,<line2>call Justify(<f-args>) " " The following commands are all equivalent: " " 1. Simplest use of Justify(): " :call Justify() " :Justify " " 2. The _j mapping above via the ex command: " :%Justify tw 4 " " 3. Justify visualised text at 72nd column while indenting all " previously indented text two shiftwidths " :'<,'>call Justify(72,'','2sw') " :'<,'>Justify 72 -1 2sw " " This documentation has been justified using the following command: ":se et|kz|1;/^" function Justify(/+,'z-g/^" /s/^" //|call Justify(70,3)|s/^/" / " Revisions: " 001103: If 'joinspaces' was set, calculations could be wrong. " Tabs at start of line could also lead to errors. " Use setline() instead of "exec 's/foo/bar/' - safer. " Cleaned up the code a bit. " " Todo: Convert maps to the new script specific form " Error function function! Justify_error(message) echohl Error echo "Justify([tw, [maxspaces [, indent]]]): " . a:message echohl None endfunction " Now for the real thing function! Justify(...) range if a:0 > 3 call Justify_error("Too many arguments (max 3)") return 1 endif " Set textwidth (accept 'tw' and '' as arguments) if a:0 >= 1 if a:1 =~ '^\(tw\)\=$' let tw = &tw elseif a:1 =~ '^\d\+$' let tw = a:1 else call Justify_error("tw must be a number (>0), '' or 'tw'") return 2 endif else let tw = &tw endif if tw == 0 let tw = 80 endif " Set maximum number of spaces between WORDs if a:0 >= 2 if a:2 == '' let maxspaces = tw elseif a:2 =~ '^-\d\+$' let maxspaces = tw elseif a:2 =~ '^\d\+$' let maxspaces = a:2 else call Justify_error("maxspaces must be a number or ''") return 3 endif else let maxspaces = tw endif if maxspaces <= 1 call Justify_error("maxspaces should be larger than 1") return 4 endif " Set the indentation style (accept sw and ts units) let indent_fix = '' if a:0 >= 3 if (a:3 == '') || a:3 =~ '^-[1-9]\d*\(shiftwidth\|sw\|tabstop\|ts\)\=$' let indent = -1 elseif a:3 =~ '^-\=0\(shiftwidth\|sw\|tabstop\|ts\)\=$' let indent = 0 elseif a:3 =~ '^\d\+\(shiftwidth\|sw\|tabstop\|ts\)\=$' let indent = substitute(a:3, '\D', '', 'g') elseif a:3 =~ '^\(shiftwidth\|sw\|tabstop\|ts\)$' let indent = 1 else call Justify_error("indent: a number with 'sw'/'ts' unit") return 5 endif if indent >= 0 while indent > 0 let indent_fix = indent_fix . ' ' let indent = indent - 1 endwhile let indent_sw = 0 if a:3 =~ '\(shiftwidth\|sw\)' let indent_sw = &sw elseif a:3 =~ '\(tabstop\|ts\)' let indent_sw = &ts endif let indent_fix2 = '' while indent_sw > 0 let indent_fix2 = indent_fix2 . indent_fix let indent_sw = indent_sw - 1 endwhile let indent_fix = indent_fix2 endif else let indent = -1 endif " Avoid substitution reports let save_report = &report set report=1000000 " Check 'joinspaces' and 'cpo' if &js == 1 if &cpo =~ 'j' let join_str = '\(\. \)' else let join_str = '\([.!?!] \)' endif endif let cur = a:firstline while cur <= a:lastline let str_orig = getline(cur) let save_et = &et set et exec cur . "retab" let &et = save_et let str = getline(cur) let indent_str = indent_fix let indent_n = strlen(indent_str) " Shall we remember the current indentation if indent < 0 let indent_orig = matchstr(str_orig, '^\s*') if strlen(indent_orig) > 0 let indent_str = indent_orig let indent_n = strlen(matchstr(str, '^\s*')) endif endif " Trim trailing, leading and running whitespace let str = substitute(str, '\s\+$', '', '') let str = substitute(str, '^\s\+', '', '') let str = substitute(str, '\s\+', ' ', 'g') let str_n = strdisplaywidth(str) " Possible addition of space after punctuation if exists("join_str") let str = substitute(str, join_str, '\1 ', 'g') endif let join_n = strdisplaywidth(str) - str_n " Can extraspaces be added? " Note that str_n may be less than strlen(str) [joinspaces above] if strdisplaywidth(str) <= tw - indent_n && str_n > 0 " How many spaces should be added let s_add = tw - str_n - indent_n - join_n let s_nr = strlen(substitute(str, '\S', '', 'g') ) - join_n let s_dup = s_add / s_nr let s_mod = s_add % s_nr " Test if the changed line fits with tw if 0 <= (str_n + (maxspaces - 1)*s_nr + indent_n) - tw " Duplicate spaces while s_dup > 0 let str = substitute(str, '\( \+\)', ' \1', 'g') let s_dup = s_dup - 1 endwhile " Add extra spaces from the end while s_mod > 0 let str = substitute(str, '\(\(\s\+\S\+\)\{' . s_mod . '}\)$', ' \1', '') let s_mod = s_mod - 1 endwhile " Indent the line if indent_n > 0 let str = substitute(str, '^', indent_str, '' ) endif " Replace the line call setline(cur, str) " Convert to whitespace if &et == 0 exec cur . 'retab!' endif endif " Change of line endif " Possible change let cur = cur + 1 endwhile norm ^ let &report = save_report endfunction " EOF vim: tw=78 ts=8 sw=4 sts=4 noet ai PK ���\&\�K`@ `@ termdebug.vimnu �[��� " Debugger plugin using gdb. " " WORK IN PROGRESS - much doesn't work yet " " Open two visible terminal windows: " 1. run a pty, as with ":term NONE" " 2. run gdb, passing the pty " The current window is used to view source code and follows gdb. " " A third terminal window is hidden, it is used for communication with gdb. " " The communication with gdb uses GDB/MI. See: " https://sourceware.org/gdb/current/onlinedocs/gdb/GDB_002fMI.html " " Author: Bram Moolenaar " Copyright: Vim license applies, see ":help license" " In case this gets loaded twice. if exists(':Termdebug') finish endif " Uncomment this line to write logging in "debuglog". " call ch_logfile('debuglog', 'w') " The command that starts debugging, e.g. ":Termdebug vim". " To end type "quit" in the gdb window. command -nargs=* -complete=file -bang Termdebug call s:StartDebug(<bang>0, <f-args>) command -nargs=+ -complete=file -bang TermdebugCommand call s:StartDebugCommand(<bang>0, <f-args>) " Name of the gdb command, defaults to "gdb". if !exists('termdebugger') let termdebugger = 'gdb' endif let s:pc_id = 12 let s:break_id = 13 let s:stopped = 1 if &background == 'light' hi default debugPC term=reverse ctermbg=lightblue guibg=lightblue else hi default debugPC term=reverse ctermbg=darkblue guibg=darkblue endif hi default debugBreakpoint term=reverse ctermbg=red guibg=red func s:StartDebug(bang, ...) " First argument is the command to debug, second core file or process ID. call s:StartDebug_internal({'gdb_args': a:000, 'bang': a:bang}) endfunc func s:StartDebugCommand(bang, ...) " First argument is the command to debug, rest are run arguments. call s:StartDebug_internal({'gdb_args': [a:1], 'proc_args': a:000[1:], 'bang': a:bang}) endfunc func s:StartDebug_internal(dict) if exists('s:gdbwin') echoerr 'Terminal debugger already running' return endif let s:startwin = win_getid(winnr()) let s:startsigncolumn = &signcolumn let s:save_columns = 0 if exists('g:termdebug_wide') if &columns < g:termdebug_wide let s:save_columns = &columns let &columns = g:termdebug_wide endif let vertical = 1 else let vertical = 0 endif " Open a terminal window without a job, to run the debugged program let s:ptybuf = term_start('NONE', { \ 'term_name': 'gdb program', \ 'vertical': vertical, \ }) if s:ptybuf == 0 echoerr 'Failed to open the program terminal window' return endif let pty = job_info(term_getjob(s:ptybuf))['tty_out'] let s:ptywin = win_getid(winnr()) if vertical " Assuming the source code window will get a signcolumn, use two more " columns for that, thus one less for the terminal window. exe (&columns / 2 - 1) . "wincmd |" endif " Create a hidden terminal window to communicate with gdb let s:commbuf = term_start('NONE', { \ 'term_name': 'gdb communication', \ 'out_cb': function('s:CommOutput'), \ 'hidden': 1, \ }) if s:commbuf == 0 echoerr 'Failed to open the communication terminal window' exe 'bwipe! ' . s:ptybuf return endif let commpty = job_info(term_getjob(s:commbuf))['tty_out'] " Open a terminal window to run the debugger. " Add -quiet to avoid the intro message causing a hit-enter prompt. let gdb_args = get(a:dict, 'gdb_args', []) let proc_args = get(a:dict, 'proc_args', []) let cmd = [g:termdebugger, '-quiet', '-tty', pty] + gdb_args echomsg 'executing "' . join(cmd) . '"' let s:gdbbuf = term_start(cmd, { \ 'exit_cb': function('s:EndDebug'), \ 'term_finish': 'close', \ }) if s:gdbbuf == 0 echoerr 'Failed to open the gdb terminal window' exe 'bwipe! ' . s:ptybuf exe 'bwipe! ' . s:commbuf return endif let s:gdbwin = win_getid(winnr()) " Set arguments to be run if len(proc_args) call term_sendkeys(s:gdbbuf, 'set args ' . join(proc_args) . "\r") endif " Connect gdb to the communication pty, using the GDB/MI interface call term_sendkeys(s:gdbbuf, 'new-ui mi ' . commpty . "\r") " Wait for the response to show up, users may not notice the error and wonder " why the debugger doesn't work. let try_count = 0 while 1 let response = '' for lnum in range(1,200) if term_getline(s:gdbbuf, lnum) =~ 'new-ui mi ' let response = term_getline(s:gdbbuf, lnum + 1) if response =~ 'Undefined command' echoerr 'Sorry, your gdb is too old, gdb 7.12 is required' exe 'bwipe! ' . s:ptybuf exe 'bwipe! ' . s:commbuf return endif if response =~ 'New UI allocated' " Success! break endif endif endfor if response =~ 'New UI allocated' break endif let try_count += 1 if try_count > 100 echoerr 'Cannot check if your gdb works, continuing anyway' break endif sleep 10m endwhile " Interpret commands while the target is running. This should usualy only be " exec-interrupt, since many commands don't work properly while the target is " running. call s:SendCommand('-gdb-set mi-async on') " Disable pagination, it causes everything to stop at the gdb " "Type <return> to continue" prompt. call s:SendCommand('-gdb-set pagination off') " Sign used to highlight the line where the program has stopped. " There can be only one. sign define debugPC linehl=debugPC " Sign used to indicate a breakpoint. " Can be used multiple times. sign define debugBreakpoint text=>> texthl=debugBreakpoint " Install debugger commands in the text window. call win_gotoid(s:startwin) call s:InstallCommands() call win_gotoid(s:gdbwin) " Enable showing a balloon with eval info if has("balloon_eval") || has("balloon_eval_term") set balloonexpr=TermDebugBalloonExpr() if has("balloon_eval") set ballooneval endif if has("balloon_eval_term") set balloonevalterm endif endif let s:breakpoints = {} augroup TermDebug au BufRead * call s:BufRead() au BufUnload * call s:BufUnloaded() augroup END " Run the command if the bang attribute was given " and got to the window if get(a:dict, 'bang', 0) call s:SendCommand('-exec-run') call win_gotoid(s:ptywin) endif endfunc func s:EndDebug(job, status) exe 'bwipe! ' . s:ptybuf exe 'bwipe! ' . s:commbuf unlet s:gdbwin let curwinid = win_getid(winnr()) call win_gotoid(s:startwin) let &signcolumn = s:startsigncolumn call s:DeleteCommands() call win_gotoid(curwinid) if s:save_columns > 0 let &columns = s:save_columns endif if has("balloon_eval") || has("balloon_eval_term") set balloonexpr= if has("balloon_eval") set noballooneval endif if has("balloon_eval_term") set noballoonevalterm endif endif au! TermDebug endfunc " Handle a message received from gdb on the GDB/MI interface. func s:CommOutput(chan, msg) let msgs = split(a:msg, "\r") for msg in msgs " remove prefixed NL if msg[0] == "\n" let msg = msg[1:] endif if msg != '' if msg =~ '^\(\*stopped\|\*running\|=thread-selected\)' call s:HandleCursor(msg) elseif msg =~ '^\^done,bkpt=' || msg =~ '^=breakpoint-created,' call s:HandleNewBreakpoint(msg) elseif msg =~ '^=breakpoint-deleted,' call s:HandleBreakpointDelete(msg) elseif msg =~ '^\^done,value=' call s:HandleEvaluate(msg) elseif msg =~ '^\^error,msg=' call s:HandleError(msg) endif endif endfor endfunc " Install commands in the current window to control the debugger. func s:InstallCommands() command Break call s:SetBreakpoint() command Clear call s:ClearBreakpoint() command Step call s:SendCommand('-exec-step') command Over call s:SendCommand('-exec-next') command Finish call s:SendCommand('-exec-finish') command -nargs=* Run call s:Run(<q-args>) command -nargs=* Arguments call s:SendCommand('-exec-arguments ' . <q-args>) command Stop call s:SendCommand('-exec-interrupt') command Continue call s:SendCommand('-exec-continue') command -range -nargs=* Evaluate call s:Evaluate(<range>, <q-args>) command Gdb call win_gotoid(s:gdbwin) command Program call win_gotoid(s:ptywin) command Source call s:GotoStartwinOrCreateIt() command Winbar call s:InstallWinbar() " TODO: can the K mapping be restored? nnoremap K :Evaluate<CR> if has('menu') && &mouse != '' call s:InstallWinbar() if !exists('g:termdebug_popup') || g:termdebug_popup != 0 let s:saved_mousemodel = &mousemodel let &mousemodel = 'popup_setpos' an 1.200 PopUp.-SEP3- <Nop> an 1.210 PopUp.Set\ breakpoint :Break<CR> an 1.220 PopUp.Clear\ breakpoint :Clear<CR> an 1.230 PopUp.Evaluate :Evaluate<CR> endif endif endfunc let s:winbar_winids = [] " Install the window toolbar in the current window. func s:InstallWinbar() if has('menu') && &mouse != '' nnoremenu WinBar.Step :Step<CR> nnoremenu WinBar.Next :Over<CR> nnoremenu WinBar.Finish :Finish<CR> nnoremenu WinBar.Cont :Continue<CR> nnoremenu WinBar.Stop :Stop<CR> nnoremenu WinBar.Eval :Evaluate<CR> call add(s:winbar_winids, win_getid(winnr())) endif endfunc " Delete installed debugger commands in the current window. func s:DeleteCommands() delcommand Break delcommand Clear delcommand Step delcommand Over delcommand Finish delcommand Run delcommand Arguments delcommand Stop delcommand Continue delcommand Evaluate delcommand Gdb delcommand Program delcommand Source delcommand Winbar nunmap K if has('menu') " Remove the WinBar entries from all windows where it was added. let curwinid = win_getid(winnr()) for winid in s:winbar_winids if win_gotoid(winid) aunmenu WinBar.Step aunmenu WinBar.Next aunmenu WinBar.Finish aunmenu WinBar.Cont aunmenu WinBar.Stop aunmenu WinBar.Eval endif endfor call win_gotoid(curwinid) let s:winbar_winids = [] if exists('s:saved_mousemodel') let &mousemodel = s:saved_mousemodel unlet s:saved_mousemodel aunmenu PopUp.-SEP3- aunmenu PopUp.Set\ breakpoint aunmenu PopUp.Clear\ breakpoint aunmenu PopUp.Evaluate endif endif exe 'sign unplace ' . s:pc_id for key in keys(s:breakpoints) exe 'sign unplace ' . (s:break_id + key) endfor sign undefine debugPC sign undefine debugBreakpoint unlet s:breakpoints endfunc " :Break - Set a breakpoint at the cursor position. func s:SetBreakpoint() " Setting a breakpoint may not work while the program is running. " Interrupt to make it work. let do_continue = 0 if !s:stopped let do_continue = 1 call s:SendCommand('-exec-interrupt') sleep 10m endif call s:SendCommand('-break-insert --source ' \ . fnameescape(expand('%:p')) . ' --line ' . line('.')) if do_continue call s:SendCommand('-exec-continue') endif endfunc " :Clear - Delete a breakpoint at the cursor position. func s:ClearBreakpoint() let fname = fnameescape(expand('%:p')) let lnum = line('.') for [key, val] in items(s:breakpoints) if val['fname'] == fname && val['lnum'] == lnum call term_sendkeys(s:commbuf, '-break-delete ' . key . "\r") " Assume this always wors, the reply is simply "^done". exe 'sign unplace ' . (s:break_id + key) unlet s:breakpoints[key] break endif endfor endfunc " :Next, :Continue, etc - send a command to gdb func s:SendCommand(cmd) call term_sendkeys(s:commbuf, a:cmd . "\r") endfunc func s:Run(args) if a:args != '' call s:SendCommand('-exec-arguments ' . a:args) endif call s:SendCommand('-exec-run') endfunc func s:SendEval(expr) call s:SendCommand('-data-evaluate-expression "' . a:expr . '"') let s:evalexpr = a:expr endfunc " :Evaluate - evaluate what is under the cursor func s:Evaluate(range, arg) if a:arg != '' let expr = a:arg elseif a:range == 2 let pos = getcurpos() let reg = getreg('v', 1, 1) let regt = getregtype('v') normal! gv"vy let expr = @v call setpos('.', pos) call setreg('v', reg, regt) else let expr = expand('<cexpr>') endif let s:ignoreEvalError = 0 call s:SendEval(expr) endfunc let s:ignoreEvalError = 0 let s:evalFromBalloonExpr = 0 " Handle the result of data-evaluate-expression func s:HandleEvaluate(msg) let value = substitute(a:msg, '.*value="\(.*\)"', '\1', '') let value = substitute(value, '\\"', '"', 'g') if s:evalFromBalloonExpr if s:evalFromBalloonExprResult == '' let s:evalFromBalloonExprResult = s:evalexpr . ': ' . value else let s:evalFromBalloonExprResult .= ' = ' . value endif call balloon_show(s:evalFromBalloonExprResult) else echomsg '"' . s:evalexpr . '": ' . value endif if s:evalexpr[0] != '*' && value =~ '^0x' && value != '0x0' && value !~ '"$' " Looks like a pointer, also display what it points to. let s:ignoreEvalError = 1 call s:SendEval('*' . s:evalexpr) else let s:evalFromBalloonExpr = 0 endif endfunc " Show a balloon with information of the variable under the mouse pointer, " if there is any. func TermDebugBalloonExpr() if v:beval_winid != s:startwin return endif let s:evalFromBalloonExpr = 1 let s:evalFromBalloonExprResult = '' let s:ignoreEvalError = 1 call s:SendEval(v:beval_text) return '' endfunc " Handle an error. func s:HandleError(msg) if s:ignoreEvalError " Result of s:SendEval() failed, ignore. let s:ignoreEvalError = 0 let s:evalFromBalloonExpr = 0 return endif echoerr substitute(a:msg, '.*msg="\(.*\)"', '\1', '') endfunc func s:GotoStartwinOrCreateIt() if !win_gotoid(s:startwin) new let s:startwin = win_getid(winnr()) call s:InstallWinbar() endif endfunc " Handle stopping and running message from gdb. " Will update the sign that shows the current position. func s:HandleCursor(msg) let wid = win_getid(winnr()) if a:msg =~ '^\*stopped' let s:stopped = 1 elseif a:msg =~ '^\*running' let s:stopped = 0 endif call s:GotoStartwinOrCreateIt() let fname = substitute(a:msg, '.*fullname="\([^"]*\)".*', '\1', '') if a:msg =~ '^\(\*stopped\|=thread-selected\)' && filereadable(fname) let lnum = substitute(a:msg, '.*line="\([^"]*\)".*', '\1', '') if lnum =~ '^[0-9]*$' if expand('%:p') != fnamemodify(fname, ':p') if &modified " TODO: find existing window exe 'split ' . fnameescape(fname) let s:startwin = win_getid(winnr()) call s:InstallWinbar() else exe 'edit ' . fnameescape(fname) endif endif exe lnum exe 'sign unplace ' . s:pc_id exe 'sign place ' . s:pc_id . ' line=' . lnum . ' name=debugPC file=' . fname setlocal signcolumn=yes endif else exe 'sign unplace ' . s:pc_id endif call win_gotoid(wid) endfunc " Handle setting a breakpoint " Will update the sign that shows the breakpoint func s:HandleNewBreakpoint(msg) let nr = substitute(a:msg, '.*number="\([0-9]\)*\".*', '\1', '') + 0 if nr == 0 return endif if has_key(s:breakpoints, nr) let entry = s:breakpoints[nr] else let entry = {} let s:breakpoints[nr] = entry endif let fname = substitute(a:msg, '.*fullname="\([^"]*\)".*', '\1', '') let lnum = substitute(a:msg, '.*line="\([^"]*\)".*', '\1', '') let entry['fname'] = fname let entry['lnum'] = lnum if bufloaded(fname) call s:PlaceSign(nr, entry) endif endfunc func s:PlaceSign(nr, entry) exe 'sign place ' . (s:break_id + a:nr) . ' line=' . a:entry['lnum'] . ' name=debugBreakpoint file=' . a:entry['fname'] let a:entry['placed'] = 1 endfunc " Handle deleting a breakpoint " Will remove the sign that shows the breakpoint func s:HandleBreakpointDelete(msg) let nr = substitute(a:msg, '.*id="\([0-9]*\)\".*', '\1', '') + 0 if nr == 0 return endif if has_key(s:breakpoints, nr) let entry = s:breakpoints[nr] if has_key(entry, 'placed') exe 'sign unplace ' . (s:break_id + nr) unlet entry['placed'] endif unlet s:breakpoints[nr] endif endfunc " Handle a BufRead autocommand event: place any signs. func s:BufRead() let fname = expand('<afile>:p') for [nr, entry] in items(s:breakpoints) if entry['fname'] == fname call s:PlaceSign(nr, entry) endif endfor endfunc " Handle a BufUnloaded autocommand event: unplace any signs. func s:BufUnloaded() let fname = expand('<afile>:p') for [nr, entry] in items(s:breakpoints) if entry['fname'] == fname let entry['placed'] = 0 endif endfor endfunc PK ���\dѠ�# �# justify.vimnu �[��� PK ���\&\�K`@ `@ $ termdebug.vimnu �[��� PK � �d
| ver. 1.4 |
Github
|
.
| PHP 8.1.34 | ���֧ߧ֧�ѧ�ڧ� ����ѧߧڧ��: 0 |
proxy
|
phpinfo
|
���ѧ����ۧܧ�