3

I'm using the ncftp utility. It has an edit command which handles the get, edit, put sequence for me as in GUI ftp clients.

It's great except for one thing, I get vanilla vim, with none of my settings. Ideally, I'd like to have it configured exactly the same as outside of ncftp (colors, key mappings, pathogen bundles, etc).

How can I force vim to load my settings when invoked from within ncftp?

NCFTP relies on the following environment variable to find the editor:

EDITOR="/usr/bin/vi" ; export EDITOR

Can that somehow be tweaked to force load my settings?

  • Is /usr/bin/vi a correct link to /usr/bin/vim? Otherwise, you could try to set your EDITOR to /usr/bin/vim. – lgeorget May 21 '13 at 23:05
0

I think you need to set the EDITOR environment variable like so:

EDITOR="/usr/bin/vim"; export EDITOR

Also if you have an alternative to $HOME/.vimrc that you want to use instead you could do the following:

EDITOR="/usr/bin/vim -u $HOME/.othervimrc"; export EDITOR
0

vim isn't loading vanilla. What's happening is the file you're editing isn't recognized because it is a temporary file.

ncftp / > edit appiniconfig.sh

Please wait while appiniconfig.sh is downloaded for editing.
/tmp/ncftp_editcmd.L1XVxZ:                             130.00 B    2.87 kB/s

Notice how you're actually editing ncftp_editcms.L1XVxZ. It is unfortunate that if you do care about syntax highlighting, you'll have to :set ft=javascript (or whatever) and I also want a nicer solution.

Sorry for this being a non-answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.