Results 1 to 2 of 2

Thread: run vim with some pre sets of commands

  1. #1
    Join Date
    Mar 2008
    Beans
    19

    run vim with some pre sets of commands

    Hi

    is it possible to run vim from terminal with some pre sets of commands ?


    I want to open file with vim and apply :set number & :set ruler

    some thing like this

    $vim myfile.extension :set number & :set ruler

  2. #2
    Join Date
    Jun 2007
    Location
    UK
    Beans
    1,386
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: run vim with some pre sets of commands

    The syntax is:
    Code:
    vim "+set number" "+set ruler" myfile.extension
    For more details type:
    Code:
    man vim
    Alternatively you could place the presets in your .vimrc file.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •