Thursday, December 29, 2016

Vim ... after new line start at possition and after start

Hello guys,
I have tried to figure this out now for a while and is getting crazy.

I need vim to put the marker 7spaces in when i push enter for a new line.

_______|text goes here...

And i need vim to start counting the tabs from that position as well.

_______|<-tab-><-tab-><-tab->

For now i get it to make tabs 4space but then the tabs after the marker gets placed 1 space wrong.
like so.
_______| <tb><tb><tb>
<tb><tb> <tb><tb><tb>


This is because i am programming cobol :/ and the first 7 chars is used for other things than code.



I want it to be as this:
_______|<return>
_______|

_______|some text <return>
_______|


for now i have this :
set tabstop=4
set expandtab
set shiftwidth=4
set autoindent
set colorcolumn=7

But it makes the first tabs to start at one space wrong

Here is some cobol if you see my problem better that way :)
##########
IDENTIFICATION DIVISION.
* This is a comment
000001 PROGRAM-ID. YOUR-PROGRAM-NAME.
000002 DATA DIVISION.
FILE SECTION.
WORKING-STORAGE SECTION.
PROCEDURE DIVISION.
MAIN-PROCEDURE.
DISPLAY "Hello world"
STOP RUN.
END PROGRAM YOUR-PROGRAM-NAME.
##########

(haha yeah yeah change language cobol is the problem....have heard that one..)

Best regards
Martin Lindkvist

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment