Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    What do i need to do to get VIM started easily each time

    Reply
    Page 2 of 3 | Prev |   1   2   3   | Next
    aflegg | # 11 | 2005-12-21, 16:12 | Report

    The problem with using .profile is that XTerm doesn't start login shells, and osso-af-init resets the path at desktop startup (IIRC).

    Setting your .profile and then typing sh --login after starting XTerm fixes this.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Dusty | # 12 | 2005-12-21, 18:22 | Report

    It works fine. I use it on my 770. You just have to reboot for the .profile to take effect. I can start an xterm, type 'vim', and there it is.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    aflegg | # 13 | 2005-12-21, 21:18 | Report

    Originally Posted by Dusty
    It works fine. I use it on my 770. You just have to reboot for the .profile to take effect. I can start an xterm, type 'vim', and there it is.
    Odd. What OS version have you got?

    Edit | Forward | Quote | Quick Reply | Thanks

     
    MikeB | # 14 | 2005-12-21, 22:50 | Report

    Originally Posted by Dusty
    It works fine. I use it on my 770. You just have to reboot for the .profile to take effect. I can start an xterm, type 'vim', and there it is.
    Thanks for mentioning this! I had been using the 'sh --login' method to use /home/user/.profile. I did not realized that this would work after a reboot. It now finds vim in my path...

    Unfortunately, my aliases are not available unless I use the 'sh --login' method. Is there something I need to do differently to make these available? Example:
    alias ll='ls -l'

    Edit | Forward | Quote | Quick Reply | Thanks

     
    msaunby | # 15 | 2005-12-29, 17:21 | Report

    I've created an entry in the wiki on using xterm that tries to cover what needs to be done to change the .profile. As you'll see in my examples I favour keeping things simple.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    msaunby | # 16 | 2005-12-29, 17:43 | Report

    Originally Posted by Neil McAllister
    Hey, speaking of VIM... I got it installed, but I couldn't get the carriage return to work. Instead, it inserted a capital "M" and maybe a couple of other garbage characters. I couldn't find a way to remap it with stty. It made it pretty hard to edit any files longer than one line. Anyone have better luck? I installed vim using the gainroot method.
    It's probably just a bad habit many of us have picked up. Use o rather than i and you won't have this problem.

    Maybe someone could add this to the wiki, perhaps with a link to a vi/vim cheat sheet - there are loads out there.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    aflegg | # 17 | 2005-12-29, 17:47 | Report

    I've updated the wiki and the vim port page with the "proper" vim-level fix for the cursor keys/enter problem:

    Put the following in /home/user/.vimrc:

    Code:
    set nocompatible
    That removes some of vim's backwards-compatibility with the original vi which is causing the problem.

    HTH,

    Andrew

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by aflegg; 2005-12-30 at 22:29. Reason: .vimrc != .profile (Doh...)

     
    msaunby | # 18 | 2005-12-30, 20:50 | Report

    I've put it in .vimrc and it did the trick.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    dillera | # 19 | 2006-01-02, 06:34 | Report

    Yet another method:

    ssh into your 770 and cut and paste these lines to permanently modify your .profile:

    echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/var/lib/install/usr/lib' >> /home/user/.profile
    echo 'export PATH=$PATH:/var/lib/install/usr/bin:/var/lib/install/usr/sbin' >> /home/user/.profile
    echo 'set nocompatible' >> /home/user/.vimrc

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Simon | # 20 | 2006-01-02, 07:41 | Report

    Maybe this is a stupid question but I managed to get Vim working whenever I run Xterminal. That's all good but if I then use sudo gainroot to get root access it no longer works. Where do I need to add those variables so Vim still works? Yes, I am a Linux newbie

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Page 2 of 3 | Prev |   1   2   3   | Next
vBulletin® Version 3.8.8
Normal Logout