LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-09-2024, 07:41 PM   #1
JinxsDad
Member
 
Registered: Apr 2023
Location: Fort Walton Beach, FL
Distribution: Slackwareb15
Posts: 282

Rep: Reputation: 23
how to add menubar rto vim OR copy/paste in vim without it using Menu-Edit-Copy or Paste without the menubar


In gvim (Slackware version), there is a menubar, but not in vim. How do I add that menubar in regular vim without having to build vim/gvim manually? I'm looking for something to put in ~/.vimrc.

^C and ^V don't seem to work, either, even with "map <C-c> y (from Slackexchange.com or Linuxexchage ... not sure which), referring to cut/paste to either the normal buffer or the X11 buffer But they don't work outside of the vim session in question (obviously). Nor does "+y or the put version.

I wouldn't care so much, if gvim didn't start off with a butt ugly font, where I have to set the font every time I use gvim (and no, the .vimrc settings don't work, either). It's just an added PITA just to be able to cut/paste between, say, vim (have to use gvim) and, for example, an email app.

So, to summarize, I need to use the menubar in vim just like it is in gvim. Specifically, the one from Slackware's install.

Thanks
 
Old 03-10-2024, 09:34 AM   #2
Paulo2
Member
 
Registered: Aug 2012
Distribution: Slackware64 15.0 (started with 13.37). Testing -current in a spare partition.
Posts: 935

Rep: Reputation: 527Reputation: 527Reputation: 527Reputation: 527Reputation: 527Reputation: 527
Is this for running vim in a terminal emulator?
To paste text from X clipboard, enter in insert mode and type ctrl+shift+v.
It works in konsole and Xfce terminal.
I think you can't copy text from vim to X clipboard, due to some compilation option.

About the font in gvim, how do you set it?
In .vimrc, I have this for vim/gvim separate configs
Code:
if has("gui_running")
	" GUI is running or is about to start.
	" Maximize gvim window.
	"set lines=999 columns=999
	set lines=45 columns=120
	"colorscheme peachpuff
	colorscheme desert
	set guifont=Liberation\ Mono\ 11
	"set guifont=DejaVu\ Sans\ Mono\ Oblique\ 11
else
	" This is console Vim.
	"if exists("+lines")
		"set lines=50
	"endif
	"if exists("+columns")
		"set columns=100
	"endif
	set t_ve+=[?81;0;112c " Block cursor in console.
	colorscheme blue
	"colorscheme lunaperche
	"hi Search cterm=NONE ctermfg=grey ctermbg=blue
	" Make distinction between vim and vimdiff.
	if &diff
		" Better colorscheme for vimdiff.
		colorscheme industry
	endif
endif
 
Old 03-11-2024, 06:29 PM   #3
JinxsDad
Member
 
Registered: Apr 2023
Location: Fort Walton Beach, FL
Distribution: Slackwareb15
Posts: 282

Original Poster
Rep: Reputation: 23
Quote:
Originally Posted by Paulo2 View Post
Is this for running vim in a terminal emulator?
To paste text from X clipboard, enter in insert mode and type ctrl+shift+v.
It works in konsole and Xfce terminal.
I think you can't copy text from vim to X clipboard, due to some compilation option.

About the font in gvim, how do you set it?
In .vimrc, I have this for vim/gvim separate configs
Code:
if has("gui_running")
	" GUI is running or is about to start.
	" Maximize gvim window.
	"set lines=999 columns=999
	set lines=45 columns=120
	"colorscheme peachpuff
	colorscheme desert
	set guifont=Liberation\ Mono\ 11
	"set guifont=DejaVu\ Sans\ Mono\ Oblique\ 11
else
	" This is console Vim.
	"if exists("+lines")
		"set lines=50
	"endif
	"if exists("+columns")
		"set columns=100
	"endif
	set t_ve+=[?81;0;112c " Block cursor in console.
	colorscheme blue
	"colorscheme lunaperche
	"hi Search cterm=NONE ctermfg=grey ctermbg=blue
	" Make distinction between vim and vimdiff.
	if &diff
		" Better colorscheme for vimdiff.
		colorscheme industry
	endif
endif
Thanks. I had an older method that used underlines instead of \_. Got that fixed, and added:

alias vim='/usr/bin/gvim'

to my ~/.alias (zsh) file. Works great. That solves the entire issue.

Thanks again. Marking this solved.

Last edited by JinxsDad; 03-11-2024 at 06:31 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy and Paste - make /qmake fails when Linux "paste" include ( ) in name jan128 Linux - Newbie 4 01-30-2021 05:01 AM
[SOLVED] How to restore traditional X11 copy-paste when using vim? colinh2 Slackware 9 10-03-2017 02:10 PM
[SOLVED] Preventing the screen copy and paste error on first paste slackartist Slackware 0 04-03-2016 06:48 PM
To disable cut, copy, paste options in the Edit menu. Aswathy Linux - Newbie 3 05-05-2011 02:09 AM
[SOLVED] Can't copy-paste from one terminal to another using vim cola Slackware 11 12-18-2009 10:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration