Thread Subject: how to set breakpoint in vim when edit .m file

Subject: how to set breakpoint in vim when edit .m file

From: Arthur Zheng

Date: 21 Apr, 2009 03:10:02

Message: 1 of 4

how to set breakpoint in vim when edit .m file, I ssh to the linux server

Subject: how to set breakpoint in vim when edit .m file

From: Ashish Uthama

Date: 21 Apr, 2009 16:50:25

Message: 2 of 4

On Mon, 20 Apr 2009 23:10:02 -0400, Arthur Zheng <hzheng7@gatech.edu>
wrote:

> how to set breakpoint in vim when edit .m file, I ssh to the linux server

I do not think you can do this in VIM.

You could set the breakpoint from the MATLAB command line:

help dbstop

Subject: how to set breakpoint in vim when edit .m file

From: Arthur Zheng

Date: 21 Apr, 2009 22:47:02

Message: 3 of 4

"Ashish Uthama" <first.last@mathworks.com> wrote in message <op.usqw2bm9a5ziv5@uthamaa.dhcp.mathworks.com>...
> On Mon, 20 Apr 2009 23:10:02 -0400, Arthur Zheng <hzheng7@gatech.edu>
> wrote:
>
> > how to set breakpoint in vim when edit .m file, I ssh to the linux server
>
> I do not think you can do this in VIM.
>
> You could set the breakpoint from the MATLAB command line:
>
> help dbstop

thanks

Subject: how to set breakpoint in vim when edit .m file

From: Alex Holyoake

Date: 26 Jun, 2009 11:40:04

Message: 4 of 4

If you put this in your .vimrc file

function! Matbreak()
   return 'dbstop in '.expand("%:t:r").' at '.line(".")
endfunction

:imap <F5> <C-R>=Matbreak()<CR>
:command! Matbreak :call Matbreak()

Then when you are in insert mode, and you would like a break point, press f5 and it will insert one. It's a bit hacky, but easier than remembering a line number and putting it into the command window in Matlab.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
vim matlab dbst... Alex Holyoake 26 Jun, 2009 07:44:04
vim linux Arthur Zheng 20 Apr, 2009 23:15:04
rssFeed for this Thread

Contact us at files@mathworks.com