• Re: any editors that limit find/search to certain columns?

    From Andreas Kohlbach@21:1/5 to Suzy Wong on Sat Feb 18 01:59:57 2023
    On Sat, 18 Feb 2023 11:59:31 +0800, Suzy Wong wrote:

    In a job some years ago, we had a real nice editor, maybe it was
    Ultraedit. The job files were a throwback to punch cards, so you would
    do a find/replace restricted to columns 1-8 for example.
    I haven't seen any FOSS editor with this column option.
    Does anybody know one?

    Combine "grep" with "cut" may be?

    Or may be "grep" can limit itself already. Can you give an example?
    --
    Andreas

    https://news-commentaries.blogspot.com/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Carlos E.R.@21:1/5 to Suzy Wong on Sat Feb 18 12:15:53 2023
    On 2023-02-18 04:59, Suzy Wong wrote:
    In a job some years ago, we had a real nice editor, maybe it was
    Ultraedit. The job files were a throwback to punch cards, so you would
    do a find/replace restricted to columns 1-8 for example.
    I haven't seen any FOSS editor with this column option.
    Does anybody know one?

    jstar should have it, but it fails. Seems a bug.

    You have to set column mode (^OX), then mark start and end of block
    (^K^B, ^K^K), then search inside block (^Q^F, option 'k').

    --
    Cheers, Carlos.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dan Espen@21:1/5 to Suzy Wong on Sat Feb 18 07:31:18 2023
    Suzy Wong <suzywng@outlook.com> writes:

    In a job some years ago, we had a real nice editor, maybe it was
    Ultraedit. The job files were a throwback to punch cards, so you would
    do a find/replace restricted to columns 1-8 for example.
    I haven't seen any FOSS editor with this column option.
    Does anybody know one?

    https://emacs.stackexchange.com/questions/52483/search-within-column-or-rectangle

    --
    Dan Espen

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Grant Taylor@21:1/5 to Suzy Wong on Sat Feb 18 10:54:32 2023
    On 2/17/23 8:59 PM, Suzy Wong wrote:
    In a job some years ago, we had a real nice editor, maybe it was
    Ultraedit. The job files were a throwback to punch cards, so you would
    do a find/replace restricted to columns 1-8 for example.
    I haven't seen any FOSS editor with this column option.
    Does anybody know one?

    I usually use awk for things that are column specific.

    Or I'll do visual block mode selection in vim and apply a regex thereto.



    --
    Grant. . . .
    unix || die

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)