Default to using VIM's termdebug plugin for debug
VIM 8.1 added the optional plugin termdebug which integrates gdb with separate buffers for source, output, and gdb console. This adds the `vimdebug` command which enables the termdebug plugin and executes the `:TermdebugCommand` with the given arguments.
This commit is contained in:
		
							parent
							
								
									7b87688885
								
							
						
					
					
						commit
						9037d2dd41
					
				| @ -7,7 +7,10 @@ alias build="build-dir --build" | ||||
| # Detect installed debugger and set the `debug` alias to debug a program with | ||||
| # command line arguments. | ||||
| if [ `uname` = Linux ]; then | ||||
|   if which cgdb &> /dev/null; then | ||||
|   if [[ "`vim --version`" =~ "^VIM - Vi IMproved 8\.1.*$" ]]; then | ||||
|     function vimdebug() { vim "+packadd termdebug" "+TermdebugCommand $*" } | ||||
|     alias debug='vimdebug' | ||||
|   elif which cgdb &> /dev/null; then | ||||
|     alias debug='cgdb --args' | ||||
|   elif which gdb &> /dev/null; then | ||||
|     alias debug='gdb --args' | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user