As stated before, sky subtraction can be a very critical step in the reduction of long slit spectra with the main problem being the curvature of the lines along the slit (due to both misalignment of CCD and spectrum and residual optical distortions).
Although one may intuitively tend to subtract the sky spectrum still in pixel space in order to avoid the problems inherent to non-linear rebinning, experience shows that a proper wavelength calibration can remove the curvature of the sky lines to a high degree of accuracy (one should aim for 0.1 pixels rms).
The command SKYFIT/LONG makes a polynomial fit to the sky in two windows above and below the object spectrum, either with one single function for the full length of the spectrum (mode = 0) or with one function for every column (mode = 1). Mode 0 is recommended for the spectral regions where the sky is faint, because usually there is not enough signal to achieve a meaningful fit for every column. The same is not true for the bright sky lines, where mode 1 helps dealing with the variable line width and with residual line curvature.
For this reason, it often is best to prepare two sky spectra first: sky0 fitted obtained in mode 0 and with a polynomial of degree 0-2 fitted to windows with ``clear'' sky, and sky1 derived with mode 1 and multiple polynomials of degree 2-4 on windows going as close as possible to the object. The final sky spectrum, (sky), to be subtracted from the object is obtained from a combination of the two sky spectra and essentially consists of sky0 which only for the bright sky lines has been replaced with sky1. Such a combination can be prepared by mean of the command REPLACE/IMAGE (e.g., REPLACE/IMA sky0 sky 120.,>=sky1).