LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 06-01-2013, 10:48 PM   #1
lucmove
Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Lubuntu, Slackware
Posts: 575

Rep: Reputation: 64
GNU screen/Vim key binding conflict


I have Alt-Left and Alt-Right configured to navigate tabs on Vim.

:map <M-Left> :tabp<CR>
:map <M-Right> :tabn<CR>

It works. But when I run Vim inside GNU screen, either key binding combination deletes two lines in the active buffer instead of navigating tabs. Why??? Where does that come from, and how do I fix it?
 
Old 06-03-2013, 04:03 PM   #2
shm0
Member
 
Registered: Aug 2012
Location: Bahrain
Distribution: Slackware
Posts: 58

Rep: Reputation: 16
Check out this solution.
 
Old 06-07-2013, 09:19 PM   #3
lucmove
Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Lubuntu, Slackware
Posts: 575

Original Poster
Rep: Reputation: 64
Thank you, but it's not clear to me. It says:

Quote:
| # specialized entry for Screen when started in an Xterm
| # adds support for ctrl-alt-left and right arrows
| screen.xterm|xterm-sc|GNU Screen inside Xterm,
| kLFT5=\E[1;5D, kRIT5=\E[1;5C,
| kLFT3=\E[1;3D, kRIT3=\E[1;3C,
| kLFT7=\E[1;7D, kRIT7=\E[1;7C,
| use=screen,

"tic -x" this file, and export TERM=screen.xterm (if TERM=xterm
before you start Screen, this should be automatic).
I don't understand what parts (comments seem to be mixed) I am supposed to insert where (what file). Can you please explain?
 
Old 06-08-2013, 09:14 AM   #4
shm0
Member
 
Registered: Aug 2012
Location: Bahrain
Distribution: Slackware
Posts: 58

Rep: Reputation: 16
Quote:
Originally Posted by lucmove View Post
I don't understand what parts (comments seem to be mixed) I am supposed to insert where (what file). Can you please explain?
Add that piece to one of the termcap files (termcap, termcap-BSD, or termcap-Linux), they're under /etc.
 
Old 06-08-2013, 09:33 PM   #5
lucmove
Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Lubuntu, Slackware
Posts: 575

Original Poster
Rep: Reputation: 64
I don't have any of those files. I have /etc/terminfo, which is a directory.

I ran a search in the entire hard disk, the closest thing I found is /usr/share/vte/termcap/xterm

It does look a lot like that suggested snippet. So I pasted the snippet (yes, I removed the | pipes) and tested Vim under screen and... the problem persists.

So I created /etc/termcap and pasted that snippet, but that didn't work either.
 
Old 06-10-2013, 01:55 AM   #6
shm0
Member
 
Registered: Aug 2012
Location: Bahrain
Distribution: Slackware
Posts: 58

Rep: Reputation: 16
Quote:
Originally Posted by lucmove View Post
I don't have any of those files. I have /etc/terminfo, which is a directory.
My distro is Slackware and I have those files.

Quote:
I ran a search in the entire hard disk, the closest thing I found is /usr/share/vte/termcap/xterm

It does look a lot like that suggested snippet. So I pasted the snippet (yes, I removed the | pipes) and tested Vim under screen and... the problem persists.

So I created /etc/termcap and pasted that snippet, but that didn't work either.
I suggest you get the termcap source file of your distro installed, it might be missing. Then don't forget the other steps (tic -x filename, export...).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GNU screen - binding Ctrl-Z to meta shuple Linux - Newbie 5 04-01-2012 03:33 PM
GNU screen - customizing escape key to Ctrl-; shuple Linux - Software 2 08-26-2011 08:16 PM
key binding conflict between emacs and gterm bartonski Linux - Software 0 12-25-2009 01:22 PM
Gnu screen & tab key n0p.cracker Linux - Software 0 07-02-2008 10:08 AM
Key Binding mtecknology Linux - Software 0 07-28-2005 09:50 AM


All times are GMT -5. The time now is 08:45 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration