Ubuntu – How to paste text from Vim editor to browser

gedittext-editorvim

I need to copy text from vim to web browser since I'm not able to use gedit as I'm opening an sql file. How do I get this done?

Best Answer

Either

  1. Select the text without pressing a shortcut key and middle-click in the browser window, or
  2. Select the text, press shift-ctrl-c and then use ctrl-v to paste, or
  3. I'm not entirely sure what vim has to do with sql files and what these sql files are (sqlite?), but maybe you have to use vim because the environment variable EDITOR is set to vim; maybe you could do whatever you do by setting

    export EDITOR=gedit
    

    before starting whatever program you start to edit the sql files.