5

I am new to Neovim and using the default terminal in Ubuntu for Neovim.

With the default terminal, we can click the right mouse and get the options for cut, copy and paste.

enter image description here

How can I get this type of functionality in Neovim?

1
  • 1
    Welcome to this site! AFAIK this is not a built-in feature. You might create such a menu with a bit of code (check :h creating-menus) however I would strongly advise against do it. Vim is a modal editor so its power comes from the different modes and the ability to execute actions (like copy and paste, moving cursor, selecting text, etc...) from the keyboard in the right mode. Creating this kind of menu means going against how Vim is intended to work so you loose most of the advantages of this editor.
    – statox
    Commented Mar 24, 2022 at 9:17

1 Answer 1

5

First, you must enable mouse support with :set mouse=a.

In GVim you also need to :set mousemodel=popup to activate builtin popup menu.

In Neovim it all depends on GUI frontend, as Neovim itself has no GUI code builtin. So you should consult the help system of relevant frontend to know if you have to do something or if that's possible at all.

However, as @statox mentioned in a comment above, in Vim/Neovim the major part of editing actions should be done mouseless. Of course, this is not an absolute strict rule, but, at least the most frequent ones, such as copy/paste, really belong to your keyboard. I encourage you to give this a try, even if it is a paradigm-shift.

3
  • I have neovim-qt installed can we use this GUI. This is the first time am using terminal only editor and I am having some difficulty working on it.
    – Eka
    Commented Mar 24, 2022 at 10:20
  • 2
    @Eka You can give a try. IMO, gvim is the best choice for a newbie.
    – Matt
    Commented Mar 24, 2022 at 10:47
  • 1
    @Eka you might be interested in working through vimtutor and/or reading :help if you haven't done so already.
    – D. Ben Knoble
    Commented Mar 24, 2022 at 14:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.