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'm editing files on a shared machine. How do I configure vim for me, while allowing other users their configuration (which may be 'unconfigured')?
(edit, should have noted this initially:) Unfortunately we all have to use the same login ID so config file in home directory isn't a solution for me. Is there an environment variable I could set manually after login to tell vim where to load "my" config?
Your configurations are in your ~/.vimrc in your home folder. Your settings are therefore unique to your username. You should have no problem with others on the machine.
EDIT: Since you can't use a home folder (why again?), you can launch vim with a custom configuration script with the following:
vim -u custom.vimrc
If you have a .bash_profile or something similar, you can alias this to your own custom vim.
alias vime='vim -u custom.vimrc'
Related
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 3 years ago.
Improve this question
I need to access a server using an FTP client in passive mode, but how do I do this for Vim FTP
connections?
Running ftp -p 12.34.56.67 works fine, but how do I do this when starting vim (for ex. vim ftp://12.34.56.78/)?
This article states that you need to add this line to your .vimrc:
let g:netrw_ftp_cmd="ftp -p"
After that, according to this article, you should be able to do:
vim ftp://username#yourdomain.com//the/path/to/yourfile.php
This seems to be a native Vim function.
Note: This option should be turned off for FTP servers that are not passive.
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 8 years ago.
Improve this question
I logged into my account on Bluehost using SSH and I got an unusual prompt.
I expected it to show the directory and a typical prompt but instead got some bash.
What you're seeing is the default bash prompt. This is what you get when the distro doesn't provide a better one in /etc/profile or similar. You can get it on any platform by ignoring the environment and config files:
env -i bash --norc
To get the user#host:dir$ prompt that Debian and derived distros use, you can add
export PS1='\u#\h:\w\$ '
to your .bash_profile
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
In Windows, if I am on the command prompt (cmd), if I write the command
explorer .
It will open Windows Explorer with the current directory. Is there anything similar I can do with Linux?
xdg-open . opens with the default file explorer.
More information is here.
xdg-open uses data from
~/.local/share/applications/mimeapps.list
(in most cases) to find the correct application.
The MIME type for a directory is inode/directory from here.
On Ubuntu:
nautilus . # For the current folder
nautilus /home/ # Opens the home folder
If you do not have it, just install this by
apt-get install nautilus
Then use the above command to explore the directory.
It depends what file manager you have, but yes, you can.
For instance, type xfe, or dolphin, or gentoo, etc.
Type the name of the binary of the tool you want to open.
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 8 years ago.
Improve this question
I need to control the transferring of files on my server. Some files are sent through scp to my server and I want such a files to have a specific set of permissions let's say 770. I tried pam_umask.so in /etc/pam.d/login and setting umask in /etc/profile but it seems to not work.
Which is the best way on Linux to force an umask for files transferred via scp?
Regards,
Andrea
AFAIK, scp does not initialize a shell, thus don't source any file such as .profile, .bashrc, /etc/profile.
So the only way of doing this, as commented by Stefan Ferstl, seems to use the pam module pam_umask.so.
The file /etc/pam.d/sshd is probably the best place to do it, if you want to limit this behavior to ssh sessions :
session optional pam_umask.so umask=0007
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 3 years ago.
Improve this question
Is it possible to create a project based on a remote directory (on an ftp server) in VIM, using the Project plugin?
It's not true that vim doesn't have internal capabilities to open remote files. The first poster was correct, netrw is built into later versions of vim and it's awesome. I use it all the time to edit pages on website via ftp and sometimes over ssh.
Try:
:e ftp://user#machine/path
I seem to remember creating a .netrc file so that I didn't have to type in my user/pass all the time.
man ftp (and search for .netrc assuming you're using vim on unix and not windows)
Check out the netrw plugin. However, in general I've found development easier when files are local and I have a good revision control system (like git) to move files to and from the server.