Ive recently started using emacs and i have the weird issue that my emacs session is not filling out the whole terminal
the black frames right and at the bottom should be white
how do i solve this
im using the emacs github theme
The issue here is that your terminal is resizing based on pixels while emacs is sized based on the height and width of the characters within the terminal. For GUI emacs frames you can set frame-resize-pixelwise to t to make emacs take up the available space but I don't think that's going to work for terminal based emacs.
Related
I am getting a grey/white overlay when using commands that take up the entire terminal like nmon and bmon. The first image is iterm2 and the second is the base macos terminal app, both running nmon.
It is not the transparency settings as I have already disabled those, not sure what setting to change to fix this.
I installed Gimp, Inkscape, and XQuartz on my Mac yesterday.
Today I get an error when I try to use resize in the Terminal:
$ resize 50 120
resize: Can't set window size under VT100 emulation
I did not intentionally enable VT100 emulation (I'm not even sure exactly what that means). I suspect it is a side effect of installing Gimp, Inkscape, or XQuartz.
I use the basic/default Terminal profile with no customizations other than switching to /bin/zsh as the default shell. I'm using Mac 10.14.5.
How can I turn off or disable VT100 emulation?
(I previously asked this in Ask Different. After thinking about it more, I'm not sure this is Mac-specific and so that may not have been the best site for this question.)
Edit:
resize is not a default command (see comment below).
$ which resize
/opt/X11/bin/resize
I don't think I was in VT100 emulation mode in the first place. One of those applications added another program called resize to my path. I was attempting to call a program called resize that I created based on this answer. But now that I have resize from X11, I can follow this answer.
MacVim is on the left, and to the right is Terminal.app running vim.
MacVim's app is clearly rendered in a different, lower resolution.
Is there a way to fix this?
Zooming In
Found and squashed, well not exactly.
If I launch MacVim from the terminal mvim ... there are no problems. The issue is when running the app from the GUI, i.e., clicking on icon.
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.
The post summarizes problems in using Screen in Mac's terminal when you have the following in your .zshrc
if [[ $STY = '' ]] then screen -xR; fi
Solution #1 is not working but Solution #2 works: Clipboard programs: pbcopy, pbpaste and xsel do not work at all
Bug in Vim when used in Mac: Unable to have no scattered windows in Screen by .Xresources.
Solved: Ctrl A stops working in terminal. This suggests me that Screen's keyboard bindings need to be changed slightly.
Solved: The scrolling with touchpad does not work. By editing your .screenrc the scrollback works normally (including touchpad)
Solved: Unable to have Dvorak keybindings for Screen for moving in Scrollback mod.
How can you use pbcopy/pbpaste/xsel inside Screen?
In screenrc:
# Make xterm scrolling work properly with screen.
termcapinfo xterm-256color|xterm-color|xterm|xterms|xs|rxvt ti#:te#
Works for Terminal.app too.
I usually solve the ctrl-a problem by setting my escape character to ctrl-z (which you generally don't need to use as often when you're running screen, since instead of backgrounding a process, you can just start up a new screen). In my .screenrc:
escape ^Zz
Scrolling using the touchpad just isn't going to work; screen is acting as a terminal emulator inside a terminal emulator, and it's just not possible for screen to switch the scrollback buffer in Terminal.app whenever you switch between screens. You're going to have to use screen's scrollback features. See this article for some tips on using screen's scrollback features.
The default OS X Terminal app is weak. Get iTerm instead:
iTerm
If I'm not mistaken, iTerm solves all of these out of the box (my install is a couple years old, so I can't test that theory now).
Problem #3 might be solvable if you enable the alternate screen buffer. Use altscreen on in .screenrc
Solution #1 which does not work
To be able to copy/paste in OSX put the following to your .screenrc
bind b eval "writebuf" "exec sh -c 'pbcopy < /tmp/screen-exchange'"
> Th[e] line - - sends that file to pbcopy - -.
The command is bound to C-a b (in my case, C-z b).
Solution #2 which works but is rather slow to type
Use Scrollback mode i.e. copy mode by
Coping
C-A [
Pasting
C-A ]
The solution is great, since it is the same in all terminal apps. It is similar to the clipboard as you use with your mouse.
Q5: Impossible: The scrolling with
touchpad does not work.
You can use ^A Esc to scroll up the screen. You cannot use Touchpad in Screen.
This solves the scrollback issue, although it is somewhat broken in that it isn't aware of screen's buffers.
env TERM=vt100 screen