Deprecated: Assigning the return value of new by reference is deprecated in /s/parsons/b/others/gsa/public_html/cookbook/sourceblock.php on line 137 GSA Wiki - Vimshell

Vimshell

GSAWiki.Vimshell History

Show minor edits - Show changes to markup

July 27, 2007, at 02:13 PM by Adam Labadorf - updated bash code
Changed lines 13-26 from:

if [ `uname -p` = 'x86_64' ] # 64 bit linux machines then

        export VIM=/usr/share/vim
        export VIMRUNTIME=/usr/share/vim/vim70
        alias vim='~/bin/vim_linux64' # compiled on 64 bit machine

elif [ `uname -p` = 'i386' ] # 32 bit linux machines then

        export VIM=/usr/share/vim
        export VIMRUNTIME=/usr/share/vim/vim70
        alias vim='~/bin/vim_linux32' # compiled on 32 bit machine

elif [ `uname` = 'Darwin' ] # OS X machines then

        alias vim='~/bin/vim_darwin' # compiled on OS X

fi

to:

case "`uname -sp`" in

        "Linux x86_64") 
                export VIM=/usr/share/vim
                export VIMRUNTIME=/usr/share/vim/vim70
                alias vim='~/bin/vim_linux64';;
        "Linux i686")
                export VIM=/usr/share/vim
                export VIMRUNTIME=/usr/share/vim/vim70
                alias vim='~/bin/vim_linux32';;
        "Darwin i386")
                export VIM=/usr/share/vim
                export VIMRUNTIME=/usr/share/vim/vim62
                alias vim='~/bin/vim_darwin';;

esac

July 27, 2007, at 01:49 PM by Adam Labadorf - added precompiled vim versions
Changed lines 5-10 from:

Put all three of these executables into your ~/bin directoory and the following code to your .bashrc file to run the right version on the right machine:

to:

Put all three of these executables into your ~/bin directory and the following code to your .bashrc file to run the right version on the right machine:

July 27, 2007, at 01:33 PM by Adam Labadorf -
Changed lines 3-4 from:

One unfortunate thing about the extension is it requires you to compile vim from source after applying a patch, so if you want it to work on different architectures you need to compile different versions of the executable. If you are an avid vimmer this is well worth the effort, however, and here is a section of code you can add to your .bashrc file to run the right version on the right machine:

to:

One unfortunate thing about the extension is it requires you to compile vim from source after applying a patch, so you need different executables for different architectures. Below are three precompiled versions of vim with vimshell included:

Put all three of these executables into your ~/bin directoory and the following code to your .bashrc file to run the right version on the right machine:

July 27, 2007, at 12:55 PM by Adam Labadorf -
Added lines 1-21:

The vimshell extension is a handy customization that allows you to run a shell subprocess in a vim window. This is great for when you're editing a file or debugging a program and don't want to have two terminal windows open or pop in and out of vim to run things. The source and instructions can be found here.

One unfortunate thing about the extension is it requires you to compile vim from source after applying a patch, so if you want it to work on different architectures you need to compile different versions of the executable. If you are an avid vimmer this is well worth the effort, however, and here is a section of code you can add to your .bashrc file to run the right version on the right machine:

(:source lang=bash :)

  1. choose the appropriate executable for vimshell executable depending on architecture

if [ `uname -p` = 'x86_64' ] # 64 bit linux machines then

        export VIM=/usr/share/vim
        export VIMRUNTIME=/usr/share/vim/vim70
        alias vim='~/bin/vim_linux64' # compiled on 64 bit machine

elif [ `uname -p` = 'i386' ] # 32 bit linux machines then

        export VIM=/usr/share/vim
        export VIMRUNTIME=/usr/share/vim/vim70
        alias vim='~/bin/vim_linux32' # compiled on 32 bit machine

elif [ `uname` = 'Darwin' ] # OS X machines then

        alias vim='~/bin/vim_darwin' # compiled on OS X

fi (:sourceend:)