Cannot use PuTTy for openSUSE Yast 2 due to corrupt coloring - putty

Thats how my yast looks in putty: http://i.stack.imgur.com/s9wDe.png
Anyone any ideas how can I fix this? I already did export NCURSES_NO_UTF8_ACS=1 to get lines instead of characters as line in yast. Changing colors does not help because the colors set (default) doesn't change when going into yast ... I'm using default settings in PuTTy
Solution:
Well, I just saw putty is doing entries in registry, so I just remove the complete PuTTy key. After that, I restarted putty, and the color problem was fixed already ... I can't remember that I ever should have changed anything here .. anyway, complete reinstallation worked for me tho. I found another method to fix the line problem: PuTTy - Connection - Data and change xterm in terminal-data string to unix. Worked for me.
Source (Ger): http://www.mediamill.de/blog/2008/03/25/darstellung-von-umlauten-und-linien-bei-einer-ssh-verbindung-mit-putty-zu-einer-opensuse-101-installation/

Related

I seem to have two different Vim environments. What is causing this?

I am trying to set up a development environment on Windows 10. So far I've installed Vim and Cmder (the full version with Git for Windows).
Playing around, I noticed some strange behavior which I don't understand, but I feel like it is important that I understand.
Case A
I open PowerShell
Locate the folder that contains vim.exe
Run .\vim.exe
Vim pops up and displays the default screen (VIM - Vi IMproved, version 8.1.1, etc.)
In Normal Mode I type :version to check the version number and to see where my _vimrc file is located
Vim gives me the expected output
Case B
I open Cmder and open a new PowerShell tab (I am assuming that that gives me access to the PowerShell instead of the default cmd.exe, but please correct me if I am wrong.)
NOW THIS IS WHERE IT GETS INTERESTING
If I repeat steps 2-6 exactly as in Case A, I get exactly the same result.
BUT:
If instead of locating the folder that stores vim.exe I just type in vim and hit Enter it opens Vim once again, but this time it has a tab on the bottom that says "unix". See attached images.
Out of curiosity, in Normal Mode I type :version, just like in Case A, but this time I am getting a different date in the version section, a different selection of options, and a different Unix-like path to the vimrc file which in now .vimrc instead of _vimrc.
What gives? My guess is that Git for Windows that came with Cmder is simulating a Unix environment and accessing a different Vim version that was compiled for Unix?
If this is true, then could you help me make sense of this Windows/Unix environment duality? Do I now have two HOME folders, two copies of the vimrc file, and two copies of who knows what else? What is simulating this Unix environment - Cmder?
Thanks!
I don't have experience with Cmder, but I use Git for Windows a lot.
Git for Windows comes with some Unix utilities and uses Cygwin which is Unix emulator for running those. Vim is among them as default text editor for commit messages, etc. So it might be it.
I tried to reproduce this on my machine. but I cannot reproduce what you are seeing. Nonetheless I found the vimrc file for the Vim you are probably using in the second case.
It is in <Cmder-dir>\vendor\git-for-windows\etc\vimrc.
You have two different versions of Vim installed, and depending on the environment you start it from, one or the other gets selected. Git (as a tool that initially was developed on and for Linux) typically brings with it a set of Windows-ports.
You can check what Vim binary is used (respectively) from within Vim via
:echo v:progpath
Whether you live with this duplication or try to consistently use one Vim instance is up to you. It looks like the Vim that accompanies Git has more Unix-centric settings; it might be good to keep that to avoid interoperability issues.
You definitely don't need to clone your whole Vim configuration - as long as you stick to Unix-style (LF) line endings, it can be understood by any Vim. By setting the HOME environment variable (but that may affect other programs!), you can make Vim use the same location. Else, you could give one Vim config location a small .vimrc that just corrects 'runtimepath', and then :sources the "real" vimrc from the other location.

Duplicated paths in windows command line

I don't know what did I do but suddenly when I ran windows command line I saw duplicated paths
C:\WINDOWS\system32>C:\WINDOWS\system32>
Any help would be appreciated.
Thanks
Something has changed your PROMPT environment variable to $P$G$P$G.
Simple fix is to write SET PROMPT=$P$G. But the change may have been applied more resiliently than just the current command prompt - you may have to edit your Environment Variables settings.

Appearance of a tilde(~) in mac OSX terminal in the path

I am new to the Mac OSX environment, and was programming in C using the terminal. To change the current directory, I used the command cd .. to go one level up. However, this had a weird effect on the terminal. A clear screen on my mac terminal normally used to show this path always-
manishs-mbp:manishgiri$
However, since the time I did cd .. (to go one level up), the current pathway of the terminal has changed to:
manishs-mbp:~ manishgiri$
As you can see, there is a tilde now in the pathname. On reading about it, it looks like this tilde is used to represent the home directory in mac os. However, i would like to get rid of it, as it was earlier.
I tried to think of it, and realized that cd .. would have taken me one level up. So, I entered pwd in the terminal to see the current pathway(this is with the tilde situation), and got this-
manishs-mbp:~ manishgiri$ pwd
/Users/manishgiri
Maybe the tilde appears because I am now by default in the /Users(Home) folder. If that's the case, then how do I revert it back to the previous settings to get rid of the tilde?
Any help on this would be highly appreciated, thank you.
Try
PS1=`pwd `
to set your prompt.
If you like that, check in your home directory for a file called .profile and edit PS1 setting permanently into there.
This may help.

weird chars on tab completition terminal

I am using putty to connect to the a server.
Whenever i press tab.. for file name completion... it puts some weird character..
the ups and downs arrow doesnt work.. and ulimately i end up typing everything.. (the file names..)
for example
directory has file.. foo.py foo.txt
$python foo.py fo[tab].... i am hoping to see the selections.. (foo.py, foo.txt) and stuff
and it shows that...but it also adds a char to the end..and if i try to erase it.. it puts more characters in the end.. :(
Any suggestions on what might be the issue?
Thanks
Autocomplete and history depends on what environment the server is running. So I'm afraid there's nothing to enable from the client-side. If you can find out what environment the server is running and you have write-access, then maybe you could find some environment-specific edits to be made (to config files and such).

Using VIM on Windows to access windows server share directory

In Windows Explorer I can navigate to "\\servername\shared_directory". Is there any way I can navigate to the same directory using VIM and NERDTree?
Example:
:NERDTree \\servername\shared_drirectory
I think you might want to report this behavior to the NERDTree developer. I tried it myself and no, it does not work.
You could try pulling the current NERDTree from https://github.com/scrooloose/nerdtree or writing the developer.
I don't use NERDTree, but both :browse e \\servername\shared_directory and :e \\servername\shared_directory\filename.txt work fine for me in gvim.
Playing with this a bit more, I see that the forward-slash syntax seems to even work with tab-completion (after I get the server and initial directory right, of course).
If NERDTree doesn't want to work with either //servername/directory or \\servername\directory, you might want to try executing a :lcd //servername/directory first, followed by :NERDTree ..
This issue was fixed in this branch : https://github.com/actionshrimp/nerdtree .
Download nerdtree from https://github.com/actionshrimp/nerdtree/downloads

Resources