get vim working in mobaxterm - windows

I have installed gvim and vim in mobaxterm 8 (using apt-get and mobapt respectively), and can't get either to work. nano works fine.
When I run the program, the cursor moves to a new line in the terminal but nothing happens.
I have also tried creating a .vimrc. Does anyone have any ideas? Thanks.

I installed the latest version of MobaXterm as up today which is 9.1 (http://mobaxterm.mobatek.net/download-home-edition.html) and the list of bug fixes includes the freezing problem you are are talking about. It works for me now and I no longer see that issue. The only thing is that after the installation is completed you need to download the CygUtils plugin and copy it to the same folder where the MobaXterm executable is located and then restart the application. It seems overall more stable now. Hope that helps.

I am using V9.4 which already has the vim. To configure the environment for your vim you may creat a .vimrc file in your home directory (go to the directory using cd command only).

Related

failed to run '/usr/bin/bash': no such file or directory

I've been using gitbash these past few days and it's working just fine. But a while ago, after install a pdf reader with patch file, when I opened my gitbash it gave me the error which says "Failed to run '/usr/bin/bash': No such file or directory". I don't know what happened and why, but I think the patch file of the application that I installed has something to do with it. My pc antivirus prompted a warning, and I took actions. Then the trouble in the gitbash happened. Please help me, I don't want to reinstall gitbash again coz I also have to install some things.
Had the same issue, searched for it, this is one of the first few results. So if you are looking why you got this message recently: check your antivirus and that the folder and the file actually exist. As previous answers mentioned, reinstall helps bring it back, but antivirus might break it again. So I would check your antivirus GUI and see if you can restore it and add an exception.
Mine was that Avast antivirus classified it as 'IDP.Generic' threat (weirdly only when I would close the shell with ctrl+c or ctrl+d on Windows 10).
to resolve this issue simply reinstall git.
I disabled Avast antivirus software
Then uninstalled and reinstalled git
It worked for me:)
Like jack this was caused by my virus scanner(avast). To resolve I opened the quarantine page restored and added exemption.
Try 'echo $PATH' in CygWin Terminal to get the PATH it must written something like
/usr/local/bin:/usr/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program
Files/TortoiseHg:/home
Depending on the Chroot in you sshd_config it looks for the /bin/bash file
you will have three options
you might have to copy the files into the Chroot mentioned folder and give the permission.
You can update with you Chroot
Or bind mounting would also help
ref
To resolve this issue simply deactivate your antivirus while reinstalling git.

Gnome Shell extensions not loading, no error message available

I have two gnome-shell extensions that don't appear to be loading after upgrading to 3.24. In gnome-tweak-tool they have a warning sign icon with "Error loading extension", and nothing else. I tried using looking glass (lg), and it just says "Error", and that the extension "has not reported any errors".
How can I debug the extension to find out why exactly it's not loading?
I found the error in the systemd journal:
$ sudo journalctl /usr/bin/gnome-shell
Just simply run this on terminal:
gnome-extensions-app
and enable it to make the extensions work.
Works perfectly with GNOME 40
As mentioned on the Github page.
A Shell reload is required. Press Alt+F2 r Enter and the extension has to be enabled with gnome-tweak-tool or with dconf.
As mentioned on Dash to Dock's User reviews. Make sure you disable Ubuntu Dock if you are using this in Ubuntu, otherwise you are going to have conflicts.
To disable Ubuntu Dock type the following in terminal:
gnome-extensions disable ubuntu-dock#ubuntu.com
I also experienced the same error. I think I will like to state the procedures that I took to make mine to work, and then you can check to see if you got it wrong somewhere.
Here are the steps
First install the Gnome shell extensions package from the terminal
sudo apt install gnome-shell-extensions
And then reboot your system. After that, start GNOME Tweaks and you’ll find a few extensions installed. You can just toggle the button to start using an installed extension.
Next, go to GNOME Extensions website (GNOME User Themes Extensions) and download the extension with the latest version (Although, I often prefer to download the version next to the latest version, since it may be more stable).
Extract the downloaded file to the ~/.local/share/gnome-shell/extensions (home/.local/share/gnome-shell/extensions) directory. You can press Ctrl + H to show hidden folders. Create the extensions folder if you don't have it yet.
Now restart GNOME Shell. Press Alt+F2 and enter r to restart GNOME Shell.
Restart GNOME Tweaks tool as well. You should see the manually installed GNOME extension in the Tweak tool now. You can configure or enable the newly installed extension here.
That's all
I hope this helps
Loging in without wayland works for me.
My extension was not enabling. I just log out and log in back and ran this command.
gnome-extensions enable example#hammad.example.com
It worked in my case.

Mac can't open system vim in terminal

I tried to upgrade my system Vim from 7.3 to a high version so I used macport to do that. This newer version is located in /opt/local/bin/. Later I decided to uninstall it due to some reason.
Now I can't open my system Vim in the terminal, the error message is -bash: /opt/local/bin/vim: No such file or directory. Somehow the machine still thinks the vim is located in /opt/local/bin/.
Then weird thing happens, when I type which vim, it shows my vim located at /usr/local/bin, and there is indeed a vim folder in that directory, but I can't open it by typing vim in the terminal.
So here is the situation: I have two working versions of Vim in my machine, a 7.3 version in /usr/bin and a 7.4 version in /usr/local/bin(I don't know how I got this one). Both working (I have to type the whole directory /urs/bin/vim or /urs/local/bin/vim), but can't be opened in the terminal by simply typing vim.
Updates:
now I can use vi or vim, but the problem is, the former opens 7.3 whereas the latter opens 7.4
At the current command window, type:
$ hash -r
then try running vim again. Or create a new window and try in that.
Bash remembered where vim was found, and expects to find it there again. When you removed vim, it got upset and complained (rather than try to find it again before complaining). Using hash -r vim forgets all previously hashed commands and then finds vim explicitly. Run hash with no options to see what it knows.
See the Bash manual on hash for more information.
The default Vim is /usr/bin/vim. There is absolutely no reason whatsoever to change it.
If you want a more up-to-date Vim, install MacVim and use the bundled mvim script instead of vim.

MacVim on OSX / Yosemite: no editor windows visible at all

Installed MacVim on my Yosemite 10.10.2 Macbook Pro today from http://www.macupdate.com/app/mac/25988/macvim
The problem is that no editor window(s) are visible. If I open a file using the menu, there's simply no effect: no editor window appears. It's not hidden behind other windows, it's not listed in the Windows menu, it's just entirely undisplayed.
Strangely, the file will appear in the MRU list, though. So this renders the entire editor completely useless. Should I just build gvim myself? Is this app actually being maintained by anyone?
I'd read some answers which suggest running:
brew install macvim
... does the trick.
You might want to try that first.
What worked for me...
However, this didn't work for me because although it updated my macvim, the one being linked to in the /Applications folder was not the version being updated by brew.
So, here are the steps I had to take.
Quit MacVim if open.
Delete the MacVim file in /Applications.
In the terminal, run:
brew install macvim --override-system-vim
Run (this will add the link to your Applications file):
brew linkapps macvim
I can't be sure every step above is required, or that the --override-system-vim flag is required, but I can tell you that doing the above steps worked for me.
Hope this helps.
It looks like MacVim development has been moved to a new repository (and maybe a different group of developers?):
https://github.com/macvim-dev/macvim
This repo has had changes applied to fix MacVim's graphical problems under Yosemite. (This is the same location that brew's macvim formula currently pulls its source from, which is why MacVim works on Yosemite when installed via brew.)
They also have a set of precompiled binary releases:
https://github.com/macvim-dev/macvim/releases
The latest ("snapshot 76") has worked fine for me in Yosemite so far. You just need to download the .tbz archive, double-click it to unpack to a folder, then drag the MacVim.app icon to Applications -- much easier and less invasive than installing a whole package management system and build environment! :)
Note: I had to execute a command given in another StackOverflow answer to correct a rendering glitch seen in full screen mode for snapshot 76:
$ defaults write org.vim.MacVim MMNativeFullScreen 0
I got the same problem today.
The solution:
mv ~/.vimrc ~/.vimrc_bak
It looks like there is something wrong with my .vimrc file.
I was having the same issue, and one of the answers in here helped me, but not for the reason explained so I thought this might be useful for others.
Some plugins might depend on the version of vim, and may work in version 7 but not in version 8, when you install MacVim this could be version 8, and the terminal vim version might be 7, both will use the same .vim folder and .vimrc to load the plugins and configuration, when you open the vim from terminal it might still work because the plugins were depending on vim version 7, but when you try to execute MacVim it will try to load the plugins using version 8 and then it will crash, the reason some of the answers worked it's because they are replacing the system vim, therefore MacVim and vim will be in the same major version, if you have upgraded from the previous version the best you can do it's to clear up the plugins folder and then load MacVim or vim and check that everything is working, then start applying the plugins one by one checking that they are not breaking vim. At least with this method I found that one of the plugins was not working as expected and removing it solved the "MacVim" issue.
In summary:
- move your .vim as .vim_bak
- move your .vimrc as .vimrc_bak (suggested by #hai feng kao)
And test if this solves the issue, if that's the case then a plugin is breaking your installation and you will need to activate some and figure out which is the one that causes the issue.
Hope this helps to others, I've followed a lot of these recommendations without success until I decided to upgrade vim (terminal) and this started to break as well, that pointed me in the right direction.
Again hope this saves some hours for some.
I had the same symptom with MacVim launching with no window and command-N doesn't start any a new one. brew re-install didn't help.
It turned out there was another instance of macvim installed on my system somehow, in the Downloads folder. I found out by clicking "MacVim" --> "About MacVim" and it was a version from 2014. I found the instance and deleted it.
I created an alias for the newly installed version and copied that into Applications folder so spotlight search can find the new one. That solved my problem.
I had this problem upon updating from MacOS 10.12.5 to 10.12.6.
I uninstalled MacVim by moving it to the trashcan and downloading it again.
I would guess that the new version fixed whatever issue it had with the new operating system.

VIM Flashing Issue

I'm SSH'ing in from my mac OSX (10.6.8) to a school server running centOS5 and when I attempt to use VIM, it won't stop flashing inside the mac terminal. Any idea's on how to fix this? Keep in my mind I do not have the authority to modify any /etc files or /bin files on the server, although I believe I can locally on my user. Also I would love to see anyone's really cool .vimrc config file they want to share.
Try these out:
set visualbell t_vb= " turn off error beep/flash
set novisualbell " turn off visual bell
Though the link may go stale in the future, for the time being this is the source: http://phuzz.org/vimrc.html
I also know that you can set this via terminal options on the MAC, though this is not likely the issue if you are ssh-ing. Anyway, I hope it helps. Good luck! :)
I´ve just had the same issue.
I solved it by disabling the setting "Allow blinking text" in the terminal text settings as shown in this
screenshot.
Regarding .vimrc config there are tons of versions to be found on google, especially github is a good place to go.
to stop beeping & flashing in both the console & the GUI versions of Vim try:
set noerrorbells visualbell t_vb=
autocmd GUIEnter * set visualbell t_vb=
I was pretty frustrated with macvim installed via brew.
First, on installation, it had an issue with the python version.
I did upgrade brew and python. Then I started macvim but it was flashing really bad, to eliminate, I had to ***disable core text renderin***g under preferences -> advanced options.
Finally, it got stable but couldn't open files or tabs.
objc[80401]: Class FIFinderSyncExtensionHost is implemented in both
/System/Library/PrivateFrameworks/FinderKit.framework/FinderKit
(0x10d099200) and
/System/Library/PrivateFrameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride
(0x115309c00). One of the two will be used. Which one is undefined.
So I decided to get rid off it altogether.
brew uninstall --force macvim
Installed it manually from here.
Once installed, I used the following command to create an alias. Add the following line to your .bashrc or .zshrc (for iTerm users).
alias mvim=/Applications/MacVim.app/Contents/MacOS/MacVim -g
Now reload your terminal session and type mvim. Enjoy!!

Resources