Ruby 2.0.0 and git collision - ruby

I am at a loss here. I use GIT by opening up a DOS window, which launches Ruby 2.0.0.
When I do a GIT diff, it gives me a blurb, but then leaves me in some sort of editing limbo with the prompt saying (END) instead of c:... (see screenshot)
I've tried Ctrl^C and :q and a bunch of other things but I cannot seem to escape this mode.
In the screenshot you can see that I typed Ctrl^C and it LOOKS like I've escaped back to the Cmd prompt, but the moment I try to type anything else, it puts me back in the (END) mode.
I do not understand what I've done to get in this mode, or what I do to escape it.

By default git diff drops you into a pager such as less or more. Control-C may not break you out of the pager, but you should be able to just hit q to quit. You can use git --no-pager diff so it doesn't use a pager at all.

Possibly something, or someone, changed your ~/.gitconfig file. That can override a lot of standard git behaviors.

q seems to have worked - THIS time.
It was naturally one of the first things I tried, but it was not working. Don't know what I was doing wrong, but it's working now. (Perhaps I will return if/when it stops working again.)

Related

How can I get out of this "➜ ~" state in my mac terminal and revert to the normal terminal state?

I tried making a git commit and push from my VS Code application. Immediately after making the commit and push, I realized that my mac terminal was in a different state. This is the image. Can someone help me revert back to my original mac terminal? Your help is much appreciated!
That looks like the oh-my-zsh robbyrussell prompt to me.
Maybe VS Code changed your default shell (which was bash I suppose).
Try changing the default shell back to /bin/bash.

characters not showing properly in git bash integrated terminal visual studio code

here is what is happening
I had no issue when i installed it first, everything was fine, but second time i opened my VSC this happend.
I tried changing to xterm-256color but it didn't work.
The data in screenshot showed terminal escape characters that changed
the text color back and forth.
and the thing that received output did not know how to handle those
(not a real terminal emulator) (but thought output is a tty)
You could try to set term to 'dumb'

CR is not working in ZSH

In most of the time, my zsh works correctly:
However, sometimes its behaviours became weird, and I would like to know how to deal with this problem. (So far, I have to open a new terminal tab to have the correct output).
My .zshrc is here, which was modified from https://github.com/jez/dotfiles
stty sane might bring back your terminal to a correct behavior.

How to map Shift-Tab in vim? (Cygwin, Windows cmd.exe)

I see a few entries here about making Shift-Tab work in vim, but none of them addresses the failure when it's in Cygwin, running at a Windows command prompt. In that environment, Shift-Tab works for me exactly like an unshifted tab, and my attempts at remapping have failed:
:imap <S-Tab> ^D [ this is a real Ctrl-D, entered with Ctrl-V before it ]
:imap [ typed Ctrl-V, Shift-Tab here; got a Tab character inserted ]
So it seems that the Shift modifier is being ignored. Any thoughts about how to proceed? Thanks.
That won't work in the Cygwin console because it sends the same keycode for both Tab and Shift+Tab: ^I.
You might want to install Cygwin's mintty terminal emulator, which sends the standard keycode for Shift+Tab: \e[Z.
Instead of messing with the Cygwin version, I suggest you remove it and install the native version instead. With that, you can map Shift-Tab without issues, even when starting Vim from a bash shell.
I don't have windows right here now, but look whether your vimrc contains
behave mswin
source ...\mswin.vim
In that case,
:e +g/mswin/norm!\ 0i" $MYVIMRC
should automatically comment these out. Relaunch vim, and inspect whether there are existing mappings:
:verbose map <S-Tab>
will show you any existing mappings, and where it was last defined, so you can find the script/plugin that is causing this (:he :verbose-cmd)
HTH
Update to the comment:
Well - blimey, turns out that Shift-Tab is magically impossible with Win32 Consoles. Never noticed.
Perhaps it is because I
use mintty these days, to provide a much better experience (Unix like copy pasting, real alternative terminals, more performance, and re-attaching screen sessions, e.g.)
might have tweaked the CompletionChar setting although this seems like a loose fodder even to me
Could you try with mintty? I'd think I'd have noticed such a hairy incompatibility over the years. But, you never know :)

Why do i sometime sees text all over editor in putty

I use putty on windows for Linux file editing.
Sometime when i type long commands then i see that text starts appearing either at the beginning of that line "on top of already written text" or sometime at some any remote corner.
But command still gets executed.
How can i fix the issue?
I had a similar issue due to a malformed $PS1 environment variable. I was having fun getting all cute with the different styles and colors and didn't realize I made a small mistake with the encodings.
Try setting it to a more basic one with this command... export PS1="\u#\h \w> "... and check if the issue still happens. If that solves it, then you can fiddle with your usual settings and see if you can correct it.
Hope this helps!

Resources