Git Bash Inserts Tilde - vim

Does anyone know what could be causing git bash to randomly insert the tilde character in the terminal window.
Also I am not sure if related, but when viewing log files in vim, the help dialog automatically opens in a split window in vim.
Does anyone know what the issue could be? I suspect it could be some sort of keep alive setting, but I have yet to figure this one out.

Same as above answer.
Caffeine was causing it for me.
What I did was add a command argument -useshift and this stopped it completely.
For more command line things: Caffeine command line arguments

I finally found the answer to the issue from https://superuser.com/questions/708511/putty-inserts-random-characters-during-a-session
I had also just installed Caffeine about a month ago, and that is when the symptoms began! Now that I have it disabled the symptoms above have gone away!

caffeine -STES in the shortcut did it for me.

Related

Running my NodeJS program from bash on Windows writes lots of whitespace and cursor disappears

When I'm trying to run a command, bash appends a big space and the cursor disappears. I've searched for a solution and I haven't found any. Can someone help me please?

Getting rid of 'netrw' plugin for vim

I have no idea how 'netrw' works, nor how it got enabled on my vim. I want to get rid of it, or the very least learn how to run a 'c' file one it.
I have tried adding
let loaded_netrwPlugin = 1
to my ~/.vimrc file.
I have tried returning my vim back to default, with great failure. I have tried just about everything on the internet to get rid of it so I can test my homework on the flip server. But the strange plugin is still there and I can't figure out how to work it.
I am used to just going vim <folder_name> then clang <my_project.c> then ./a.out to run it. What happened to those good old days?
Thank you for any help. I have tried so many things and nothing is really working out.
This is what I see when I vim my CS-261, I just want to be able to open assignment_1 and compile my assignments in there.
I don’t see where you would need vim for the actions you want to do. Just run
cd <folder_name>
clang <my_project.c>
./a.out

-bash: _fzf_orig_completion_g++: bad substitution in Cygwin

When I open my Cygwin terminal, it shows the following at the top of window:
-bash: _fzf_orig_completion_g++: bad substitution
Eventhough it does not affect my jobs, but I want to avoid it.
Suggestions please.
Thanks!
To be precise, edit file C:\cygwin64\etc\bash_completion.d\zzz-fzf. Locate the function _fzf_defc() and add the following lines:
cmd="${cmd//+/_}"
cmd="${cmd//-/_}"
between the lines opts="$3" and orig_var="_fzf_orig_completion_$cmd"
Worked for me. Regards.
cygwin64, modify /etc/bash_completion_d/zzz-fzf, then it does work.
cmd="$1"
func="$2"
opts="$3"
cmd="${cmd//+/_}"
cmd="${cmd//-/_}"
orig_var="_fzf_orig_completion_$cmd"
It seems that this is a known issue. An issue on the github page for fzf posted on Jan 16, 2017 talks about it. The poster there posits the problem is the following,
the way i read all this is the reason for the error is the presence of the terminal part of the string, "...g++", as the ..++ part comprises illegal characters in a name
The above link references another similar issue posted on Sept 24, 2016 where the author responded on Jan 11th,
The support for Cygwin was discontinued since 0.9.0 due to the portability issue of ncurses library. But I'm working on a new renderer that does not depend on ncurses (#782), and it might be possible that we can make the latest fzf work on Cygwin again (#794). I'll let you know if it works out.
The easiest way to remove the bad substitution error that you are getting would be, as #dubnde posted in the comments and I can verify as well, to uninstall fzf and its related packages until the support is worked out for cygwin.

Vim won't write file without a "!" sometimes (E13)

Very often (as in multiple times an hour), when I save my file :w, vim tells me "E13: File exists (add ! to override)"
I don't know why it does this, I can't reliably reproduce it, it feels random.
This is my vimrc, note that it sets nobackup, nowritebackup, and noswapfile, and there is a function to strip trailing whitespace that gets run when I save a file.
Also, I tend to have 20 vims open at once, all backgrounded, often editing the same file. Also not improbable that I have the same buffer open in multiple windows (ie :vsp) and might open it, then reopen it with the e command a lot, possibly from a relative filepath, or possibly from an absolute one (the cmap %/ <C-R>=expand("%:p:h")."/"<CR>). No idea if any of this matters. Next time I have this issue, I'll check my ls and report anything odd.
Update:
When I tried to save "lib/seeing_is_believing/wrap_expressions.rb" (note that this is a different file than the one in the gif), this happened again. Here is the ss, it's buffer 3:
Update2 (for #mMontu)
I just realized that there are two errors happening here. The one in the screenshot is the readonly thing. The one in the gif is the more common one, E13: File exists (add ! to override)
The one I just hit is E13 File exists, for this one, readonly is not set:
Update 3
I'm pretty sure the problem is the ZoomWin plugin. I had switched it up to a newer version, and it simply didn't work right. So I stopped using it for a bit, and didn't have this issue. Then switched it back, b/c I miss its functionality (it's my favourite vim plugin), and the problems started again. Possibly it's ZoomWin in conjunction with NerdTree window. Probably not the lib authors' faults, vim in general seems fragile and buggy. Maybe I'll try NeoVim, see if they've done a better job. Maybe it's time to try Atom or Emacs again.
It seems that if there were read errors opening the file, Vim will print an error on :w. This can be seen by running :f:
"MANIFEST.in" [Read errors] 1 line --100%--
The errors aren't necessarily errors in reading the contents of file; they can be caused by a plugin.
I think the main problem is that the file has been modified externally, see http://vim.wikia.com/wiki/Have_Vim_check_automatically_if_the_file_has_changed_externally to reload it whenever this happens

Run a Command When Terminal Opens (Linux)

This feels like a stupid question, but I can't find an answer (that works) anywhere. So, I thought I'd ask it here.
Basically, I would like a command to run every time I open a Terminal window, and then show the output in the Terminal (I have Fedora). Is this possible with the MOTD, or is that text-only?
Thanks!
Put it in ~/.bashrc or equivalent.

Resources