[libvirt PATCH 4/4] docs: coding-style: One variable declaration per line

Ani Sinha ani at anisinha.ca
Sat Jan 15 04:10:02 UTC 2022


On Sat, Jan 15, 2022 at 02:22 Laine Stump <laine at redhat.com> wrote:

> On 1/14/22 3:29 PM, Ján Tomko wrote:
> > On a Friday in 2022, Laine Stump wrote:
> >> Since it's Friday and we're talking about personal preferences - I
> >> personally dislike the use of i and j (and anything else with a single
> >> letter) as variable names, because it makes using a text search for
> >> occurences pointless. Sure, longer variable names could also be a
> >> substring of something else, and any variable could be re-used
> >> elsewhere, but even then a search is mildly usable.
> >
> > Well, you need to search for the word i instead of the letter i.
> >
> > grep has the '-w' switch for that, or you can specify some boundaries:
> >     \bi\b
> >     \<i\>
> >
> > vim searches for the word under the cursor with '*' by default
> >
> > Surely other search tools have some equivalent.
>
> This forced me to go look for it in emacs, and after 28 years, I've
> learned about isearch-forward-symbol-at-point, which is by default bound
> to [alt-s .]. But that's just another different keystroke I have to
> remember. Much easier if I can just use an expansion of the ctl-s
> (incremental search) that I already know and use for pretty much all
> searching within a single file.


Haha ! I use emacs as well and I never knew about this too. Will try it
too. Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20220115/dac1a2d5/attachment-0001.htm>


More information about the libvir-list mailing list