Hi, Thanks a lot. An alias has been set to vim(ie alias -x vi=/usr/local/ bin/vim). Now everything works fine. I just need to call vim instead of vi from my C application.
On May 27, 1:12 pm, pansz <[email protected]> wrote: > mthread 写道: > > > Hi, > > I am trying to run the vi editor from a C application using > > 'system' command(ie isystem("vi main.cpp"). The issue is, most of the > > keys are not working as it is supposed to be. For example, the arrow > > keys and delete key are not working. Event the color scheme associated > > with file opened(ie main.cpp) is completely gone and I can only see > > the text in plain white color. > > Whereas when I open the same file from the shell prompt > > everything works fine. Kindly let me know what needs to be done to > > solve this issue. > > It seems to be the TERM issue, but I cannot confirm. what is the > :echo &term > in your vi? try set it to xterm. > > Do you have an alias for vi? try call it with the absolute path. > > I've wrote a program: > > #include <stdlib.h> > int main() > { > system("vi"); > > } > > Compiled it and everything works fine. So this is not the vi issue. --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
