Issue running vim as a root [closed] - linux

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
If this question is not considered to have this place in this forum, tell me I will remove it instantly !
I have installed on my ubuntu a vim plugin (called NERDTree). It works well when I open a file with a non-root status. When I run vim as a root and I try to launch the plugin with :NERDTree, I am told the command 'NERDTree' is unknown. Someone could help ?

Plugins placed in /usr/share/vim/vim7x will most likely be overwritten at the next upgrade. If you want your plugins to be available to root you should install them in /root/.vim.
That said, Vim comes by default with a file explorer plugin called netrw. You may try to learn how to use it (:h netrw) before installing any third party replacement.

Did you install the NERDTree plugin in your home ~/.vim/plugins directory? If so, then the root user probably doesn't "see" it. Move it to the global plugins directory and that should fix it.

Related

How to use local (user) installed version of VIM? - Linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I have vim 7.0 on my server machine and I don't have root permissions. So, I have extracted Vim73 to my home directory and installed using the following command without having any errors.
./configure --prefix=$HOME && make && make install
But still if I open vim it is showing the older version.
How can my .vimrc file read the latest version installed from local user (home)?
You need to add your home to your path:
export PATH=$HOME/bin:$PATH
If vim installs shared libraries, you'll also need to add your local libs path to your LD_LIBRARY_PATH:
export LD_LIBRARY_PATH=$HOME/lib:$HOME/lib64:$LD_LIBRARY_PATH
Choose lib or lib64 depending on what's present on your system.
Alternatively, call the binary with its absolute path:
$HOME/bin/vim
Create an alias in your .bashrc or .zshrc, ...
alias vim="/path/to/your/vim"
Configure the PATH variable to include the path to the locally installed vim. Or create an alias alias vim = /path/to/local/vim.

copy from vim into stackoverflow for example [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I have being trying to get crtl + V to select all lines of text and then using "+y and "*y but that doesn't seem to work when I try to paste into the forum.
Additionally, I have been to this post and tried changing Vims /.vimrc with the un-named clipboard option but that hasn't worked either.
How can I copy from Vim into a forum post without doing shift + crl + c and then having to remove the line numbers?
Make sure you are using a proper Vim build. The default Vim on most (if not all) Linux distributions is a "tiny" build that lacks clipboard support among other interesting features. You can verify that by running this command in your terminal emulator:
$ vim --version | grep clipboard
A + in front of a feature means that it's built-in, a - means that the feature is missing.
If your Vim has no clipboard support, you should consider upgrading it to a proper build. On debian-based systems, this is typically done with this command:
$ sudo apt-get install vim-gnome
At this point, you should be able to use "+y and experiment with :h 'clipboard.
However, this works only if your Vim runs locally. If you are using Vim on a remote machine, you can't have remote Vim talk to local clipboard unless you use the -X flag upon connection to enable "X11 forwarding" which comes with a variety of side effects and requirements.

Centos 6 startup script [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I need to put a startup script to my CentOS6 server.
I see that I need a script that contains start-stop cases.
But I have a problem to make it and neither how to put this script to startup.
Anyone can say me how can I add it?
The script must run a simply command that run a jar file:
java -jar FileName.jar
The simplest way would be to add your command to the file
/etc/rc.d/rc.local
Commands in the above file are run at startup (as root). Note that if you do this, your command will NOT respond to the usual service start/ stop commands.

Always hide cursor in Xfce 4.8 with Debian Wheezy [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I would like to hide my cursor always. I have only SSH access to the machine.
Try with unclutter, is a small program that does just that.
http://ftp.x.org/contrib/utilities/unclutter-8.README
http://ftp.x.org/contrib/utilities/unclutter-8.tar.Z
It's present on the repositories of various distributions, for example on Arch Linux you can install it with:
pacman -S unclutter
Then you can start it by adding an entry for it on Settings » Session and Startup » Applications Autostart or (preferred method) by adding it to your .xinitrc file like this:
run unclutter
EDIT: obsolete now
My solution was to download: A transparent cursor theme and do:
./configure
cd cursors
make install-data-local DESTDIR=/home/user/.icons/default CURSOR_DIR=/cursors
chown -R user:user /home/user/.icons

cd.. command does not work [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
The community reviewed whether to reopen this question 11 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I made a directory in my ubunto desktop and copied some file inside it.
I tried to go inside the directory by using the terminal.
the issue I have is when I want to back to the parent directory which is "Desktop" by using "cd.." command I got an error says cd..: command not found
I'm a newbie and want to know the reason.
would you explain it for me.
thank you
You need space, after command cd
cd ..
You missed the space in between cd and ..:
cd ..
You are missing a space, should be cd ..

Resources