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 1 of 3 | 1   2     3   | Next
    meshsmooth | # 1 | 2005-12-21, 02:59 | Report

    I went to http://www.bleb.org/software/770/#vim and installed vim then i run the long command
    Originally Posted by
    LD_LIBRARY_PATH=/var/lib/install/usr/lib /var/lib/install/usr/bin/vim
    to start it. But how do I just run a short comand like $ vim to get it started?

    Originally Posted by
    Usage
    As the default PATH does not include /var/lib/install/usr/bin (the Application Installer installs packages under /var/lib/install), the command to start vim is:

    LD_LIBRARY_PATH=/var/lib/install/usr/lib /var/lib/install/usr/bin/vim

    This can be improved by adding PATH and LD_LIBRARY_PATH exports to /home/user/.profile and then typing sh --login after starting the X Terminal.
    I have installed VIM i can run the long command
    The .profiles file dose not exist, do i create it? How do i format this .profiles file

    Help on this will make editing much easier.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    gnuite | # 2 | 2005-12-21, 04:04 | Report

    If you have root access, it's easier to edit /etc/profile, since that affects all users. Otherwise, use that file as an example for creating ~/.profile.

    gnuite

    Edit | Forward | Quote | Quick Reply | Thanks

     
    meshsmooth | # 3 | 2005-12-21, 04:28 | Report

    OK i have worked it out!

    cd to the directory /bin
    start vi with the long comand $ LD_LIBRARY_PATH=/var/lib/install/usr/lib /var/lib/install/usr/bin/vim
    paste that command into vi
    then save the file as “vim” by hitting escape and then :w vim
    exit out of vim :q
    then make that file executable $ chmod a+x vim


    Originally Posted by
    $ cd /bin
    $ LD_LIBRARY_PATH=/var/lib/install/usr/lib /var/lib/install/usr/bin/vim
    paste that command into vi
    esc
    :w vim
    :q
    $ chmod a+x vim
    then you can start vim just by typing vim

    if there is a less confusing way of explaining that go rite ahead and suggest it.

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by meshsmooth; 2005-12-21 at 04:46.

     
    TGKnIght | # 4 | 2005-12-21, 05:34 | Report

    i like your idea of writing a script... I'm admittedly a nix noob, but another script i found useful to write was auto move all .desktop files from the extras dir to the main location

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Neil McAllister | # 5 | 2005-12-21, 05:45 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    aflegg | # 6 | 2005-12-21, 09:30 | Report

    Hi,

    In terms of the 'vi' script in /bin, it'd be better if it read:

    Code:
    #!/bin/sh
    LD_LIBRARY_PATH=/var/lib/install/usr/lib:$LD_LIBRARY_PATH exec /var/lib/install/usr/bin/vim "$@"
    This'll ensure you can type vi foo.html and edit the foo.html file.

    As for the problem with pressing enter, this only happens in insert mode, but is a pain. I've seen it on desktop systems as well, but haven't yet worked out how to fix it. Something TERM related, probably.

    Cheers,

    Andrew

    Edit | Forward | Quote | Quick Reply | Thanks

     
    meshsmooth | # 7 | 2005-12-21, 11:41 | Report

    I have installed bash but cant find where it intalled to and how to get it started. Will I need to run Xterm to start bash? also is there an equivelent file to the .bashrc file? for xterm?

    By the way, Xterm is a memory hog for such a low level app what is with that?

    anybody concidering the uses of rSync?

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by meshsmooth; 2005-12-21 at 11:57.

     
    andymulhearn | # 8 | 2005-12-21, 13:19 | Report

    Originally Posted by meshsmooth
    OK i have worked it out!

    cd to the directory /bin
    start vi with the long comand $ LD_LIBRARY_PATH=/var/lib/install/usr/lib /var/lib/install/usr/bin/vim
    paste that command into vi
    then save the file as “vim” by hitting escape and then :w vim
    exit out of vim :q
    then make that file executable $ chmod a+x vim




    then you can start vim just by typing vim

    if there is a less confusing way of explaining that go rite ahead and suggest it.
    Do you also need to add /home/user to your path? That way, wherever you are, typing vim executes that script.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    meshsmooth | # 9 | 2005-12-21, 13:34 | Report

    my way requires root acess and i would recomend using aflegg's code to be inserted instaid.

    Get root acess then copy all this text in one go and paste it into Xterm and it will do half of the steps

    Code:
    cd /bin/
    LD_LIBRARY_PATH=/var/lib/install/usr/lib /var/lib/install/usr/bin/vim
    i#!/bin/sh
    LD_LIBRARY_PATH=/var/lib/install/usr/lib:$LD_LIBRARY_PATH exec /var/lib/install/usr/bin/vim "$@"
    now your in VIM so now hit the escape key on your nokia 770 and type or paste the text
    Code:
    :w vim
    :q
    and your done

    I dont know if what i have done is "the way to do it" but it works everywere. If some Linux guru will come along and tell us how to do it, and in an idiot proof kind of way, well good do it there way. But untill then us linux stumblers have this way to do it.

    That is what i am a "Linux Stumbler"

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by meshsmooth; 2005-12-21 at 13:58.

     
    Dusty | # 10 | 2005-12-21, 15:29 | Report

    No root access is needed. Save this:
    Originally Posted by
    export PATH=$PATH:/var/lib/install/usr/bin
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/var/lib/install/usr/lib
    as "~/.profile".
    MAKE SURE YOU GET THE TOP LINE RIGHT OR YOU WILL HAVE TO REFLASH YOUR 770. (Don't screw up your PATH.)
    Then reboot the 770, and any programs you install are in the PATH, including vim. Much better approach, because you don't have to write a script for every program you want to use.

    Edit | Forward | Quote | Quick Reply | Thanks

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