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

Marc Chantreux <[email protected]>
Newsgroups gmane.editors.vim
Message-ID <Z9xHO2pMvxYfEOwT@prometheus>
On Wed, Mar 19, 2025 at 11:20:00AM -0700, D. Ben Knoble wrote:
> On Tuesday, March 18, 2025 at 10:07:25 AM UTC-4 Steven H. wrote:
> This was cross-posted at https://vi.stackexchange.com/q/46614/10604

which is genuinely disrespectful because the thread goes on in another place.

Steven: the way I read you, the only thing you miss is 'ai (:h 'ai)

I have

set noet ai ci pi

which is enough to get the behavior you need (at least the way I read your post).
You can also add an insert mode mapping to indent when you double the final \:

command ArgIndent y | put | s!\v^\s+\zs(\S+\s+).*!\=repeat(' ',1+len(submatch(1)))!
inoremap \\<cr> <c-o>:ArgIndent<cr>

regards,
Marc

-- 
-- 
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/Z9xHO2pMvxYfEOwT%40prometheus.
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.