What to use for....

15 views
Skip to first unread message

Sebastian Gödecke

unread,
Apr 24, 2023, 6:07:29 AM4/24/23
to vim...@googlegroups.com
Hi there,
i'm running into issue if i don't get solution for getting older....
I'm working with config files for an application that is using DN's 
In this config-file the ldap-dn has to be written in one (long) line. Actually it's 1779 counts long and for this, i don't see the missing "=". 
So how could i improve vim to "show" me that in my config-file is something missing. 
Could this be done with a template, syntax-checking or what else?
Any hints for this would be great :D
Regards Sebastian

--
Mit freundlichen Grüßen
Sebastian Gödecke

Tony Mechelynck

unread,
Apr 24, 2023, 6:26:50 AM4/24/23
to vim...@googlegroups.com
By setting 'wrap' on, you will see as much of the current line as fits
in the current window ("window" in the Vim sense, there may be one or
more windows in a single Vim). Then you can scroll the text (by means
of the down-arrow key or, in Normal mode, by Ctrl-E) to display any
part of the current file line that overflow the current line. To get
at the next equal sign (if any), but only on the current line
(including any part of it overflowing the screen), use

f=

("forward to =", see ":help f"); or to go to the end of the line,
scrolling if necessary, use the <End> key or, in Normal mode, the $
key.

Best regards,
Tony.

Nicolas George

unread,
Apr 24, 2023, 7:16:33 AM4/24/23
to 'Sebastian Gödecke' via vim_use
'Sebastian Gödecke' via vim_use (12023-04-24):
> i'm running into issue if i don't get solution for getting older....
> I'm working with config files for an application that is using DN's
> In this config-file the ldap-dn has to be written in one (long) line.
> Actually it's 1779 counts long and for this, i don't see the missing "=".
> So how could i improve vim to "show" me that in my config-file is something
> missing.
> Could this be done with a template, syntax-checking or what else?

Write your config file how you want to write it, split the lines to make
them readable. And then use a pre-processor, possibly along with a
makefile, to turn it to the syntax you need.

Regards,

--
Nicolas George
signature.asc

Christian Brabandt

unread,
Apr 24, 2023, 7:20:54 AM4/24/23
to vim...@googlegroups.com

On Mo, 24 Apr 2023, 'Sebastian Gödecke' via vim_use wrote:

> Hi there,
> i'm running into issue if i don't get solution for getting older....
> I'm working with config files for an application that is using DN's
> In this config-file the ldap-dn has to be written in one (long) line.
> Actually it's 1779 counts long and for this, i don't see the missing "=".
> So how could i improve vim to "show" me that in my config-file is something
> missing.
> Could this be done with a template, syntax-checking or what else?
> Any hints for this would be great :D

Not sure I understand the problem. I think using numbered lines with
wrapping (possibly with breakindent/showbreak setting enabled) enabled
should allow you to show everything. So something like this:

:set wrap number breakindent showbreak=>>

For very long lines, smoothscroll feature could also be helpful (:set
smoothscroll) and then scroll using Ctrl-E/CTRL-Y

Best,
Christian
--
Humor ist nicht erlernbar. Neben Geist und Witz setzt er vor allem ein
großes Maß an Herzensgüte voraus, an Geduld, Nachsicht und
Menschenliebe.
-- Curt Goetz

Tim Chase

unread,
Apr 24, 2023, 7:54:32 AM4/24/23
to 'Sebastian G??decke' via vim_use
On 2023-04-24 12:07, 'Sebastian G??decke' via vim_use wrote:
> Actually it's 1779 counts long and for this, i don't see the missing
> "=".Ā
> So how could i improve vim to "show" me that in my config-file is
> something missing.

I've done one-off things like

:match Error /^[^=]\=$/

which will highlight any lines that don't have an "=" in them.

You might wire that up with a file-type detection to do that more
automatically.

If there are lines that can validly lack an "=", then you'd have
to add some context to identify lines that should have "=" but
don't.

-tim




Reply all
Reply to author
Forward
0 new messages