Changing Editor for Unix INFO Command - editor

Currently my "info" command uses Emacs as its default editor.
$ info printf
Is there a way to change it into Vi/Vim?

Your best hope that I can see is to run it with the --vi-keys command switch, which "uses vi-like and less-like key bindings". Unfortunately, I don't see anything else that can be of help to you.

You need something that understands TexInfo, which I don't believe Vi/Vim does. You might just be stuck with emacs. More info at wikipedia.

Try to set the VISUAL and EDITOR environment variables to the full path of Vim.

Related

How to remove a "system property" in Jenkins via Script Console

In Jenkins it is possible to customise/parameterise the application with so called "System Properties". In the console you can manage to set properties like the following:
System.setProperty("hudson.plugins.active_directory.ActiveDirectorySecurityRealm.forceLdaps", "true")
With the code of println and System.getProperty it is possible to see the value, which in this case is true. You can also view this on the page itself when navigating to /systemInfo in the URL.
Is it possible to remove the System Property by code? I searched the documentation of Jenkins but no luck. Another topic I found with the same problem is dead since 2012-2013.
I tried the following, unfortunately without success:
System.getProperty("hudson.plugins.active_directory.ActiveDirectorySecurityRealm.forceLdaps").remove()
System.removeProperty("hudson.plugins.active_directory.ActiveDirectorySecurityRealm.forceLdaps")
System.setProperty("hudson.plugins.active_directory.ActiveDirectorySecurityRealm.forceLdaps", null)
System.setProperty("hudson.plugins.active_directory.ActiveDirectorySecurityRealm.forceLdaps", undefined)
Any help is appreciated.
I have found the problem by myself:
You can use System.clearProperty(String key) to remove the System Parameter, the option I didn't used before.
Hopefully this can be a good use for other people.
Cheers.
If you added the property via Script Console, restarting Jenkins would remove it.
sudo systemctl restart jenkins

How do i make my windows command line more user friendly for running Ruby on rails?

I am new to RoR and am looking for a way, if possible, to make the Windows command line more user friendly like the mac system. Specifically an easier way to copy and paste, such as using short cut keys, but other suggestions are welcome to. So far I have managed to re-size the window and change the font and font size.
Please keep in mind that i am not technically proficient in this area and answers with steps would be greatly appreciated.
Thanks
Download GitBash :D
Here's a link: GitBash installation links and howto
It'll use bash instead of window's CLI, and makes stuff like GIT or SSH a breeze.
How to copy and paste the output of commands/files to clipboard with gitbash
Link

can i change VIMRUNTIM if i want to move/usr/share/vim/vim71 to other path?

if yes, how to change such variable?
should i modify vimrc? but vimrc is in $VIMTIME, if i changed it, how vim find it?
i maybe have lots copies of VIMRUNTIME, and i hope that i can switch to different VIMRUNTIMEs easily, how to make this done.
anybody here who have ever tried to do this?
btw, there are lots of .vim files inside $VIMRUNTIME, are they all vim plugins? is .vim files all writen in vimscript? what vimscript can do and what it cannot? why not all vim plugins implemented using .vim? since i find some vim plugin also use script language such as perl or python...
The gory details are documented under :help startup, but you rarely need to modify $VIMRUNTIME. You didn't mention why you would want to do this, but it's probably a bad idea.
If you don't want to set the VIMRUNTIME environment variable in the shell from which you launch Vim, you can modify it in a user-specific ~/.vimrc (via :let $VIMRUNTIME = '/path/to/it'), because that one is read before the system-wide configuration.
The runtime files contain the help documents, default configuration, filetype detections and syntax highlightings. You can add your own extensions (e.g. downloads from http://www.vim.org) in ~/.vim/.... As I said, there should be no need to mess with the system-wide runtime; this is managed by your system's package management.

How to use same terminal window after using "rails server" command?

Okay here's my problem.
I type in "rails s" and then my terminal won't let me type in any commands. So I have to start a new terminal window, which is pretty annoying.
On the other hand I can type in "rails s -d" which detaches, and then it's a pain to stop the server when I need to. (Instead of using control+c, I have to find the PID and use kill -9 PID)
I'm not a professional, so if anyone has any advice it would be much appreciated, thank you!
I don't believe there is a way to do the thing you are specifically asking for.
However, I use Iterm2 which allows me to open multiple terminal windows in one window, either by splitting my iTerm2 window or by creating multiple tabs. That way I can just make the terminals that are holding rails server and my development.log tail very small unless something interesting happens in them.
I use screen, you can also use TMUX but they are window managers in terminal and you can create multiple windows in same terminal window :)
Read up on them at WikiVS as that might help you :)
http://www.wikivs.com/wiki/Screen_vs_tmux
Screen: http://www.gnu.org/software/screen/
TMUX: http://tmux.sourceforge.net/
So you can easily switch and maintain same terminal window. You can't obviously use the EXACT same window that rails server running but it's close enough without having to do the searching for the PID.
You can type: rails s &. I'm not sure if this is what you meant.

Need to recover older $PATH setting

I have just installed an app which overwrote my $PATH variable... so now, a bunch of stuff will not work. While I have a full backup, I am hoping that there is an easier approach than to restore, get the PATH, the "roll it forward" again.
Is there a location in the windows registry (or anywhere else) that stores an older $PATH setting?
Thanks,
GS
If anyone is interested, I found the answer...
using REGEDIT, it is under
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment or
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Control\Session Manager\Environment
In my case, it was under HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002...
GS
type in cmd:
set path=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;
above code will set the path temporarily. To set permanently, add %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\; to System Properties -> Advanced System Settings -> Environment Variables

Resources