我现在正在处理Fortran中的一个很长的表达。这段代码是由Mathematica生成的,所以它真的很长,所以如何告诉vim用连续字符“&”自动换行。自动添加到换行符?
我已阅读formatoption但仍然不知道如何解决此问题
非常长的行示例:
-(w1*wt00*wt10*metricUcontra(1,1,pdum,tdum))/(3.*h1*h2) - (w1*wt00**2*wt10*metricUcontra(1,1,pdum,tdum))/(3.*h1*h2) - (w1*metricUcontra(1,2,pdum,tdum))/(3.*h1*deltat(-1 + gi)) + (w1*wt00*metricUcontra(1,2,pdum,tdum))/(h1*deltat(-1 + gi)) + (w1*wt00*wt10*metricUcontra(1,2,pdum,tdum))/(h1*deltat(-1 + gi)) + (w1*wt00*wt10*metricUcontraUd(1,1,1,pdum,tdum))/(6.*h1) + (w1*wt00**2*wt10*metricUcontraUd(1,1,1,pdum,tdum))/(6.*h1) + (w1*wt00*wt10*metricUcontraUd(1,2,2,pdum,tdum))/(6.*h1) + (w1*wt00**2*wt10*metricUcontraUd(1,2,2,pdum,tdum))/(6.*h1) + (w1*wt00*wt10*jacobUfd(pdum,tdum,1)*metricUcontra(1,1,pdum,tdum))/(6.*h1*spjac(pdum,tdum)) + (w1*wt00**2*wt10*jacobUfd(pdum,tdum,1)*metricUcontra(1,1,pdum,tdum))/(6.*h1*spjac(pdum,tdum)) + (w1*wt00*wt10*jacobUfd(pdum,tdum,2)*metricUcontra(1,2,pdum,tdum))/(6.*h1*spjac(pdum,tdum)) + (w1*wt00**2*wt10*jacobUfd(pdum,tdum,2)*metricUcontra(1,2,pdum,tdum))/(6.*h1*spjac(pdum,tdum))