• Vim in =?UTF-8?B?VXNlbmV0PyAtLSAoIHNob3J0aGFuZCBmb3IgW1Bhc3RlXSAtICAicC

    From HenHanna@21:1/5 to All on Thu Feb 29 23:40:46 2024
    i select a region (of text within Vim) and i have to use my Mouse to copy it (to Clipboard)

    Can i do ths by keyboard only? other than...

    "+y -------- which is too hard to remember!


    ____________________


    Is there a Usenet Newsgroup where there's discussion of Vi or Vim ?

    ---- [comp.editors] is not active https://www.novabbs.com/computers/thread.php?group=comp.editors



    for Pasting (within Vim) i always Clicked on [Edit] with my Mouse.

    but today i discovered that... just hitting "p" does the job.




    >>> Vim has tons more to offer than just p! I’d recommend looking through the helpdocs. Basically anything which can be done through the toolbar of gvim can be done directly within vim (through the keyboard) instead.
    (Not to mention, there are thousands of different key combinations, commands, etc. which can't be done through the toolbar.)


    ---------- thanks for the comment!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andreas Kohlbach@21:1/5 to HenHanna on Thu Feb 29 20:03:29 2024
    On Thu, 29 Feb 2024 23:40:46 +0000, HenHanna wrote:

    i select a region (of text within Vim) and i have to use my Mouse to copy it (to Clipboard)

    Can i do ths by keyboard only? other than...

    "+y -------- which is too hard to remember!

    Stackoverflow names some solutions at <https://stackoverflow.com/questions/9166328/how-to-copy-selected-lines-to-clipboard-in-vim>. May
    be one or more work for you?

    Personally I instead move the cursor to the last line I want to copy,
    remember the line number, move to the first line and subtract the
    values. Then I type the number of the calculated value and "yy" to get
    the lines into the clipboard.

    Oh, to have vim show line number you might also need to ass

    set laststatus=2 " enables the statusline.
    set statusline=%F%m%r%h%w%=(Line\ %l\/%L,\ Col\ %c)\ %P

    to your vimrc.

    Is there a Usenet Newsgroup where there's discussion of Vi or Vim ?
    ---- [comp.editors] is not active

    But it is. Just not much traffic here.
    --
    Andreas

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From HenHanna@21:1/5 to All on Fri Mar 1 01:40:18 2024
    thanks!

    i guess... Non-Geeks just use MSWord (or its clones) and don't use
    text editors and
    they've never heard of vi, Vim, or Emacs (or Teco, ...)


    i wonder what the Global stats are for Editor-Use...


    Does Vim have a [Retro feel] ?


    and speaking of the [Retro Look] of the Fixed-width characters....



    (Lispy GIF Art) -- When (writing Lisp with Vim) (the *Neon Colors* are Dazzling ! )
    https://i.redd.it/gjn8amwym1061.gif
    geeky Lisp-Art by HenHanna

    ----------- any ideas about a Python version of this ???

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to HenHanna on Fri Mar 1 02:20:57 2024
    On Fri, 1 Mar 2024 01:40:18 +0000, HenHanna wrote:

    Does Vim have a [Retro feel] ?

    I prefer to use editors that don’t have modes.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Janis Papanagnou@21:1/5 to HenHanna on Fri Mar 1 06:42:44 2024
    On 01.03.2024 00:40, HenHanna wrote:
    i select a region (of text within Vim) and i have to use my Mouse to
    copy it (to Clipboard)

    Can i do ths by keyboard only? other than...

    "+y -------- which is too hard to remember!

    There's a couple different approaches you can choose from.

    If memorizing these letters is hard use 'gvim' instead of 'vim';
    there you have menus available (and the menu entries also show
    the key combination to eventually memorize them if you prefer).

    You can also use the mouse in 'gvim' to select a region.

    Or you can 'map' your own (better memorizable) keyboard command
    if you regularly use and cannot remember some specific commands.


    Is there a Usenet Newsgroup where there's discussion of Vi or Vim ?
    ---- [comp.editors] is not active https://www.novabbs.com/computers/thread.php?group=comp.editors

    This is the right place. - And it is active. You posted and you
    got replies quickly. - If there was no traffic just means that
    recently there were no questions.


    for Pasting (within Vim) i always Clicked on [Edit] with my Mouse.

    but today i discovered that... just hitting "p" does the job.

    Okay, now mentioning "Edit" it seems you are using already 'gvim'?

    Yes 'p' pastes a copied or cut region after the current line, or
    use 'P' to paste it before the current line.

    Generally I suggest to choose (depending on your editing tasks!)
    whether you want to use "simple" (restricted) mouse and menu based
    editing or (fast and powerful) keyboard editing.

    You can do all sorts of selections, on different types of editing
    entities, etc. You can also operate on regions without an explicit
    selection. (Best would be to inspect the vim manual or a tutorial,
    since it makes little sense to reproduce all in this post or to
    post just an arbitrary subset without knowing what sort of editing
    you do.)


    >>> Vim has tons more to offer than just p! I’d recommend looking through the helpdocs. Basically anything which can be done
    through the toolbar of gvim can be done directly within vim (through the keyboard) instead. (Not to mention, there are thousands of
    different key combinations, commands, etc. which can't be done through
    the toolbar.)

    You obviously got some information already also from another source.
    So you may want to come back with specific questions. You're welcome.

    Janis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andreas Kohlbach@21:1/5 to HenHanna on Fri Mar 1 13:40:31 2024
    On Fri, 1 Mar 2024 01:40:18 +0000, HenHanna wrote:

    thanks!

    i guess... Non-Geeks just use MSWord (or its clones) and don't use
    text editors and they've never
    heard of vi, Vim, or Emacs (or Teco, ...)


    i wonder what the Global stats are for Editor-Use...

    The worldwide distribution across all text editors?

    Suppose something coming with Windows. Notepad?

    Does Vim have a [Retro feel] ?

    Not for me. It was default on my first Linux distribution 1997, so I got
    used to it. Didn't want to learn nano, joe or similar.

    and speaking of the [Retro Look] of the Fixed-width characters....

    Am writing this (in Emacs actually) on a TTY. There's only a fixed font available.

    Curious, your text format looks somewhat strange. From your header you
    use "Rocksolid Light". Google says it's a "NNTP front end". Using a BBS
    or something? Cool!
    --
    Andreas

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andreas Kohlbach@21:1/5 to Janis Papanagnou on Fri Mar 1 13:48:50 2024
    On Fri, 1 Mar 2024 06:42:44 +0100, Janis Papanagnou wrote:

    On 01.03.2024 00:40, HenHanna wrote:

    for Pasting (within Vim) i always Clicked on [Edit] with my Mouse.

    but today i discovered that... just hitting "p" does the job.

    Okay, now mentioning "Edit" it seems you are using already 'gvim'?

    Never heard of gvim. Google says it's a GUI version of vim.

    Hence gvim should act just like vim, ignoring possible mouse uses.

    Yes 'p' pastes a copied or cut region after the current line, or
    use 'P' to paste it before the current line.

    Also worth mentioning seems to me to append numbers to these.

    2yy

    yanks (copies) 2 lines (after the cursor).

    3PP

    would insert 3 clipboard contents above the cursor position.

    I often use

    1000dd

    to clear the whole document below the cursor, assuming it has no more
    than 1000 lines. But if,

    .

    repeats the last command (deletes another 1000 lines below in this case).

    vim becomes quite handy once you learned some of its basic shortcuts.
    --
    Andreas

    Vintage arcade video games https://ankman.de/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Janis Papanagnou@21:1/5 to Andreas Kohlbach on Sat Mar 2 03:56:28 2024
    On 01.03.2024 19:48, Andreas Kohlbach wrote:
    On Fri, 1 Mar 2024 06:42:44 +0100, Janis Papanagnou wrote:

    Okay, now mentioning "Edit" it seems you are using already 'gvim'?

    Never heard of gvim. Google says it's a GUI version of vim.

    Yes.


    Hence gvim should act just like vim, ignoring possible mouse uses.

    I don't know about your platform. On Linux (for example) vim starts
    a session in the terminal where it's called from, and without any
    GUI features, while gvim starts a window wtih a specific GUI version
    with gvim menus and whatnot. In gvim you can (for example) use the
    mouse to select areas, choose commands from the gvim GUI menus, etc.
    The functional (non-GUI) kernel of these two program variants are
    the same with its commands in command/insert/ex/visual mode.

    Janis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andreas Kempe@21:1/5 to All on Sat Mar 2 13:01:29 2024
    Den 2024-03-01 skrev Andreas Kohlbach <ank@spamfence.net>:

    I often use

    1000dd

    to clear the whole document below the cursor, assuming it has no more
    than 1000 lines.

    My goto for entire document clearing is dG to clear below the cursor, or dgg
    to clear above the cursor. G moving you to the bottom of the document
    and gg moving you to the top.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Janis Papanagnou@21:1/5 to Andreas Kempe on Sat Mar 2 14:47:09 2024
    On 02.03.2024 14:01, Andreas Kempe wrote:
    Den 2024-03-01 skrev Andreas Kohlbach <ank@spamfence.net>:

    I often use

    1000dd

    to clear the whole document below the cursor, assuming it has no more
    than 1000 lines.

    My goto for entire document clearing is dG to clear below the cursor, or dgg to clear above the cursor. G moving you to the bottom of the document
    and gg moving you to the top.

    I'm still using the old Vi commands for that; dG and d1G, respectively.

    (I think dgg is one of the Vim additions that I'm not used to because
    the Vi form that I'm accustomed to had been efficient enough.)

    Janis

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From LC's No-Spam Newsreading account@21:1/5 to Andreas Kohlbach on Sat Mar 2 20:39:42 2024
    On Fri, 1 Mar 2024, Andreas Kohlbach wrote:

    Does Vim have a [Retro feel] ?

    Not for me. It was default on my first Linux distribution 1997, so I
    got used to it. Didn't want to learn nano, joe or similar.

    Uh ... I never liked vi when I started with Unix in 1990 (coming from an experience with editors on IBM mainframes, HP RTE and VAX VMS mini's
    :-)). Nor I liked the GUI-notepad-likes available on thos Unixes. My
    preferred editor has always been and still is THE, The Hessling Editor,
    a clone (available for Unx, Linux and I guess even Windows) of the IBM
    VM/CMS XEDIT ... google for "orthodox editors" :-)

    Only for occasional quick things I stand pico.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andreas Kohlbach@21:1/5 to Andreas Kempe on Sat Mar 2 20:26:30 2024
    On Sat, 2 Mar 2024 13:01:29 -0000 (UTC), Andreas Kempe wrote:

    Den 2024-03-01 skrev Andreas Kohlbach <ank@spamfence.net>:

    I often use

    1000dd

    to clear the whole document below the cursor, assuming it has no more
    than 1000 lines.

    My goto for entire document clearing is dG to clear below the cursor, or dgg to clear above the cursor.

    Very nice. Thanks.

    G moving you to the bottom of the document and gg moving you to the
    top.

    I knew these. But not that they also work in combination with d or y.

    Sweet!
    --
    Andreas

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Janis Papanagnou@21:1/5 to Andreas Kohlbach on Sun Mar 3 03:37:24 2024
    On 03.03.2024 02:26, Andreas Kohlbach wrote:

    G moving you to the bottom of the document and gg moving you to the
    top.

    I knew these. But not that they also work in combination with d or y.

    That's actually one central design principle of Vi (and successors).
    You have all sorts of movement commands and you have some operators
    (d, y, c, <, >). What you see with commands like 'd1G' is just a
    composition of the 'd' operator with a '1G' movement.
    This composition is one aspect why Vi, Vim, etc. are so powerful.

    Janis

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