Are there any ways to disable ctrl-i at mac's default terminal? - macos

I'm a mac user and use mac's default terminal app. Are there any ways to disable ctr-i at mac's default terminal? Ctrl-i conflicts my vim and tmux shortcut. I don't need to use ctrl-i binding as the terminal.

ctrl+I (whether i or I does not matter) is the TAB character, which you probably need. It is not a key which is set in Terminal's preferences, so (while you could add a keyboard shortcut to something different), it is not something that you could disable.

Related

ctrl+shift+x terminator alternative in iTerm MAC os?

In order to make any tab into the fullscreen window, in Terminator, we have an option with shortcut ctrl+shift+X, perhaps I am trying to find the same shortcut in iTerm, but couldn't figure it out. I like to know if there is any shortcut exist or the feature is not present in iTerm.
After trial and error, I found it finally
cmd+shift+enter

How to allow terminal app read ALT and other keys?

How to enable Alt key, Control-Left, Control-F1, Alt-S, Shift-End and other "impossible" keyboard combinations in the terminal applications?
Is this at all possible? I was thinking about TERMINFO and TARMCAP, maybe I need to install and user other terminal emulators rather than xterm, xterm-256color and vt100? I know xterm-256color extends xterm to support 256 colors, maybe you can do the similar thing with the keyboard.
I am not talking about X keyboard access.

Emacs on Mac OS X Lion - what about the Ctrl and Alt touch?

How can I hold Ctrl and arrow key up/down to move fast in my code? Because this is a shortcut in OS X.
How can I use alt (meta) touch? Emacs doesn't recognize option or command key?
For the Control key shortcuts, you're probably best off using the Keyboard section of the System Preferences to disable any Ctrl+Arrow shortcuts. I changed all the Control key system shortcuts to use Control, Option and Command together, which is easy enough to hit (particularly on a full-size keyboard) while being much less likely to conflict with emacs.
As for the Meta key, if you are using terminal emacs, you may just have to put up with slightly poor modifier key support. (I've found a number of shortcuts to simply not work, even after playing with the terminal preferences. The terminal system is just slightly limited, it seems.) The easiest solution is to use the Esc prefix key instead of Meta - so instead of holding Meta and tapping the key, you tap Esc, and then tap the key. So for M-x, say, you would type ESC x. This is sometimes annoying (e.g., M-f and M-b aren't so convenient any more...), but it certainly does work.
If you can, I recommend switching to the GUI version of OS X emacs, which has none of these problems.
To make the option key work:
In the terminal settings 'CMD-,' click 'Profiles -> Keyboard -> Use Option as a modifier key'.

configuring emacs keys on mac os x

I've attached an external keyboard to my laptop and I've modified my keyboard mappings such that
1. Ctrl is CAPS
2. CAPS is Ctrl
I want to continue using the right Ctrl key as Ctrl instead of CAPS. Any pointes on how this can be achieved ?
I'm not at my mac right now so I might get this wrong, but...
Take a look at the group of variables named like ns-right-control-modifier, they control how the left and right modifier keys should behave.
You might need a recent version of Emacs to get full support.
I know this might be a little orthogonal to your problem, but I would sugget running emacs in iTerm 2 with emacs -nw
I say this because then in iTerm you have a little more control over the rebinding of the modifier keys by going to iTerm -> Preferences -> Keys. There you can remap both left and right keys.
I also suggest running emacs in the terminal because then if you use a terminal multiplexer like tmux or screen you have the ability to copy and paste from a terminal window right into your emacs buffer.

Scrolling inside Vim in Mac's Terminal

I've been googling around trying to figure out if it's possible to use my mouse wheel to scroll while inside Vim in Mac's Terminal, with no luck. It seems as if only X11 or iTerm support this.
Before I give up, I thought I'd try the geniuses here to see if anyone knows a way to do this. So, does anyone know if I can set that up?
Or should I seriously consider using a different terminal application?
And if you're using iTerm, add this to your vimrc
:set mouse=a
http://bitheap.org/mouseterm/
Use MouseTerm (and do make sure to install SIMBL first!) and scrolling will work like a charm, even remote, using Mac Terminal.
You need to fully quit the Terminal application (Command+Q) and then launch it again after installing MouseTerm.
This is an old question, but a top hit on google, so I feel compelled to provide an updated answer.
Running OSX El Capitan 10.11, vim mouse and trackpad scrolling just worked(TM) for me in Terminal.app by default. However occasionally the mouse/trackpad input stopped manipulating the vim buffer, and started scrolling the terminal buffer. The answer was Command+R or Menu View --> Allow Mouse Reporting. Turning that on allowed the mouse/trackpad scroll operations to move the cursor in vim.
Termanal Menu > View > Allow Mouse Reporting
Terminal Menu > Preferences >
Keyboard > Scroll alternate screen
If the mouse functionalities still do not work properly take a look at my answer in this post How to let vim behave on Mac OS X as on Ubuntu?, just add to your .vimrc
set ttymouse=xterm2
You can read this article, but I'm pretty sure since the default terminal in Mac OS X has a built-in scrollbar, the mousewheel commands automatically go to it. You could definitely use gVim as suggested in the previous answer. I find that I don't generally want to use the mouse in Vim though as it takes my hands off the keyboard.
I just use 50j to go down and 50k to go up. Not exactly scrolling, but it works pretty well.
Make sure the terminal is xterm & not ansi in Terminal Menu > Preferences > Profiles > Advanced. I accidentally broke scrolling by changing the term type in a naive effort to get coloring to work over ssh.
Use gVim, which gives you a text editing environment in a window you can scroll. Terminal is not involved when using gVim.
I'm using xterm in X11 (XQuartz 2.3.4) and vim works very fine with mouse and also suport 256 colors.
Here is the ~/.Xresources I use to make my xterm nicer in X11:
XTerm*faceName: Lucida Sans Typewriter Regular
XTerm*faceSize: 9
XTerm*utf8: 1
xterm*saveLines: 1000
xterm*jumpScroll: true
!xterm*awaitInput: true
!xterm*multiScroll: true
XTerm*scrollBar: false
xterm*scrollbar*thickness: 16
xterm*rightScrollBar: true
XTerm*foreground: white
XTerm*background: grey10
!XTerm*background: black
XTerm*cursorColor: yellow
xterm*visualBell: false
xterm*loginShell: true
Little tips, to remove the bell sound in X11's xterm type this command:
xset b 0
I would recommend using iTerm - it has so many advantages over Terminal eg Mouse support, 256 colors, sensible copy and paste (auto-copy, word/url selection with double click, middle click paste)...
When using iTerm create a .vimrc file (if not already there) in your home folder and add the line:
:set mouse=a
Scrolling down in vim to view a file works after this.

Resources