LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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
 
Search this Thread
Old 06-01-2013, 11:48 PM   #1
lucmove
Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian Wheezy, Slackware
Posts: 604

Rep: Reputation: 70
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, 05: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, 10:19 PM   #3
lucmove
Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian Wheezy, Slackware
Posts: 604

Original Poster
Rep: Reputation: 70
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, 10: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, 10:33 PM   #5
lucmove
Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian Wheezy, Slackware
Posts: 604

Original Poster
Rep: Reputation: 70
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, 02: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


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


All times are GMT -5. The time now is 02:01 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration