On 13/11/08 23:03, [EMAIL PROTECTED] wrote:
> My issue with tabbing is that since actual source coding starts in
> card column 12 and tabs generally occur every 4 columns there after
> (16, 20, 24, 28, etc.).  The problem is that, since the cursor starts
> in column 1 instead of column 0 and assuming a tab width of 4 columns,
> pressing the tab key advances the cursor from column 1 to column 5, 9,
> 13, 17, 21, 25, etc.
>
> This tabbing behavior causes me to tab “almost” to where I need to be
> then add sufficient individual spaces to get to where I need to be.
> Backspacing causes a similar action to be used namely backspacing
> (which moves back an amount equivalent to a tab width) then once again
> adding sufficient individual spaces to get to where I need to be.  It
> would seem that if the tab action was 0-relative instead of 1 the
> tabbing activity would result in cursor arriving at the desired column
> without additional space characters.
>
> Question 1:
> How do I change the cobol.vim file to start tabbing from a 0-relative
> position instead  of the current 1-relative location?

You don't, except with the unofficial "variable tabs" patch (more about 
that later).

In standard Vim, the 'tabwidth' setting defines the width of fixed-width 
columns in your file. Using a hard tab brings you to the next column. 
Since the cursor columns are numbered starting at 1, these fixed-width 
columns are, by default (tw=8) 1 to 8, 9 to 16, 17 to 24, etc. If you 
set tw=4 (which might be regarded as a typical "tab width" for COBOL), 
you'd get 1-4, 5-8, 9-12, etc., which is indeed not what is desired in 
COBOL. So you'd want variable-width tabs starting at (1,) 7, 8, 12, 16, 
20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68 and 73 for the 
PROCEDURE DIVISION, and maybe something like (1,) 8, 12, 40, 73 for the 
IDENTIFICATION DIVISION; (1,) 7, 8, 12, 16, 20, 24, 40, 52 and 73 for 
the DATA DIVISION, and (it's been a long time since I last touched 
COBOL, or Hollerith cards for that matter) one of the same for the 
division I'm forgetting (ENVIRONMENT maybe?). The variable-width "tab 
columns" would of course end every time in the preceding column (6, 7, 
11, etc.)

Now about how to compile Vim with all standard patches and one (or more) 
non-standard one. No need to know the C language for that. Just see my 
HowTo pages, http://users.skynet.be/antoine.mechelynck/vim/compile.htm 
for Windows, or 
http://users.skynet.be/antoine.mechelynck/vim/compunix.htm for Unix-like 
OSes.


Best regards,
Tony.
-- 
Psychiatrists say that one out of four people are mentally ill.  Check
three friends.  If they're OK, you're it.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to