Re: BASH script: Indent with tabs, align with spaces

"Steven H." <[email protected]>
Newsgroups gmane.editors.vim
Message-ID <20250322071137.2d4ddf26@localhost>
Marc,

I think some correction of the implementation of the algorithm may be
necessary, otherwise editing existing code does not auto-align next
line.

Perhaps:

> if (Enter is pressed after a single backslash); then

^^ Currently that condition is checked through be the key mapping of
'\<cr>' but when editing existing code, pressing Enter after an
*existing* backslash does not run your function.

I don't know if it is possible to map the function to '<cr>', then
(considering how it currently works by copying the line) make it:

> 	go to new line
> 	preserve the indentation and alignment of the previous line

	delete trailing backslash

> 	add spaces to align to the second word in the previous line
> 	# word: anything that is not white space
> fi

What do you think?



On Sat, 22 Mar 2025 06:35:08 -0000 Steven H. wrote:

> P.S. Speaking of duplication: I don't know why but I always receive
> each of your messages twice. :)  

I think the reason is that (I see that in your messages only):

To: [email protected]
Cc: [email protected]

-- 
-- 
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 [email protected].
To view this discussion visit https://groups.google.com/d/msgid/vim_use/20250322071137.2d4ddf26%40localhost.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.